Compare commits
437 Commits
comm-brick
...
patch_2Aug
| Author | SHA1 | Date | |
|---|---|---|---|
| ce756540e8 | |||
| bb462b9ea3 | |||
| 63eda98779 | |||
| 0ca72bb58e | |||
| a6bcf507e1 | |||
| a1621a7229 | |||
| 62d41c6afb | |||
| 5480d25e36 | |||
| a4145ec852 | |||
| 5b16f15b25 | |||
| e77aaba3a4 | |||
| 7f08e8d11c | |||
| f62b129dec | |||
| db967a5bbf | |||
| f20af66312 | |||
| 01766c7631 | |||
| 7846bb59db | |||
| c27951cb1f | |||
| 4ab82d76ad | |||
| c6cbc1f965 | |||
| 88e58e9189 | |||
| e14005c443 | |||
| 9570c2fb50 | |||
| 180ce5277f | |||
| e81b86e114 | |||
| 6c6262a637 | |||
| 062bb88561 | |||
| cf5b653a9a | |||
| c5a5e4a099 | |||
| ccab900342 | |||
| fc400af724 | |||
| b1ea4d9601 | |||
| 2ca3be7b16 | |||
| 31b94aa1b0 | |||
| b1b94980fa | |||
| 770ad34267 | |||
| 10c523a950 | |||
| 62ef884564 | |||
| b3860a82de | |||
| 1deb3d8865 | |||
| 266e519013 | |||
| fffb86cb02 | |||
| fcaabe510e | |||
| a6043d92cb | |||
| ee16f6503e | |||
| 84168fc84d | |||
| 8a5fd08fa1 | |||
| 8944609419 | |||
| e90478e932 | |||
| 52c23785c5 | |||
| 088ff4ad27 | |||
| e32ae65aa1 | |||
| a5bf853c35 | |||
| b0a1b58c68 | |||
| bdaf3c64a6 | |||
| ccc478ad96 | |||
| fadb210052 | |||
| c105a187d9 | |||
| d74f86f2cd | |||
| c5b35970dc | |||
| 5626836995 | |||
| 53111f8c0e | |||
| e0ca512f50 | |||
| e87bad43f9 | |||
| 27d065a682 | |||
| f1dd7f1415 | |||
| 59e8b9370f | |||
| 39fa2021e2 | |||
| 83f492a195 | |||
| 933457acbe | |||
| 06f4099566 | |||
| 5624a78b17 | |||
| 47e875142f | |||
| 62c844d5ac | |||
| 263b6d4d6f | |||
| 4acca38a65 | |||
| 4cf642b526 | |||
| 52fc8f05ee | |||
| 047df9aa9e | |||
| fb3bd20dff | |||
| c7d62c4709 | |||
| b18008c58d | |||
| 9469321e3d | |||
| a4a9efeefc | |||
| 70744f10e0 | |||
| 9bea55bd77 | |||
| 73525b3bbc | |||
| 9cf67699cc | |||
| 666fe4cfbe | |||
| ed7bd50500 | |||
| d241e26d03 | |||
| 73e7163ed6 | |||
| 5a5a86684a | |||
| ae3f57e89a | |||
| fff7b2a859 | |||
| 83ba1c9d20 | |||
| ce10614cab | |||
| facbeac052 | |||
| 188ee5af15 | |||
| f176b8b14c | |||
| 2396b2feea | |||
| 4399c1b6c1 | |||
| fd046c8fd8 | |||
| 09b7694601 | |||
| df20503434 | |||
| f4aa24a36a | |||
| 007c04bc97 | |||
| 418d1e16e1 | |||
| 6471d781d0 | |||
| 97ddc5917c | |||
| a95ff20647 | |||
| 9e0a9e2601 | |||
| 8b34d65970 | |||
| 0a1c2bcccc | |||
| c9442c591c | |||
| b7d316031d | |||
| 361e9f3ea5 | |||
| 28120793b8 | |||
| f32ce8377e | |||
| 9021b8bc6a | |||
| 838fe3020d | |||
| b4d4dcbcbc | |||
| 52a892ec46 | |||
| 0ee3d9da5d | |||
| 50afb292b0 | |||
| 275ef9da17 | |||
| b6a87390a3 | |||
| 72178631c5 | |||
| f8859c5fca | |||
| 979119a29b | |||
| bc66572275 | |||
| 609231675f | |||
| d9675b5da4 | |||
| 7d32b4f42a | |||
| 697e5b15ec | |||
| ade0718c11 | |||
| 31033ff6e0 | |||
| 9a598ba5a8 | |||
| ff20448b1d | |||
| af5229ba58 | |||
| b180200c48 | |||
| 27441cf2ea | |||
| db61bf609b | |||
| 015fa4cb0a | |||
| 62f6f91146 | |||
| e163b0b1d7 | |||
| 169a886898 | |||
| cbd276c49d | |||
| 183c6c06ff | |||
| 93a46da58e | |||
| 6b6a47bd3c | |||
| 4a0a98a0fd | |||
| 369ea4fd26 | |||
| d63c002bf5 | |||
| e931d3153b | |||
| 2913c063d4 | |||
| 5606b57646 | |||
| 0fafe34008 | |||
| a9a1640d67 | |||
| 812363fb99 | |||
| b40e0be1c9 | |||
| 1be973da07 | |||
| aca2c52795 | |||
| 536b2ab7e5 | |||
| ccef293161 | |||
| 4b0de87813 | |||
| fa22aef31b | |||
| cb7544a615 | |||
| a9be4906b7 | |||
| 6f36d21a04 | |||
| c55a15c4dc | |||
| 8f01dad1a9 | |||
| db6e1aa20d | |||
| 3cee69a077 | |||
| 69ffe71595 | |||
| 16fa033111 | |||
| 8e494aa771 | |||
| d203cce8b5 | |||
| f8de1b1a75 | |||
| de89a25a25 | |||
| f982e95267 | |||
| 293d0cdb58 | |||
| 011f2651ee | |||
| a8d3c43a77 | |||
| c19641f8b3 | |||
| 6596b343ff | |||
| b6dbb0330c | |||
| 0dd138666a | |||
| 33b9fec150 | |||
| 32b020a165 | |||
| c1db230331 | |||
| 254c052ecc | |||
| 8e889dfa7c | |||
| 5b6a52a646 | |||
| 55f56deb63 | |||
| bfe127a720 | |||
| d95c8911a3 | |||
| 0380f9d854 | |||
| 71b1d60363 | |||
| 8b1f92fabd | |||
| 419af0cf28 | |||
| 9030c59932 | |||
| ee88078150 | |||
| 04451f6072 | |||
| 2364f7f08b | |||
| 7f82a58f51 | |||
| 1caf074ba1 | |||
| 34677f78c2 | |||
| e095609ac6 | |||
| 1122408957 | |||
| 5f9b78ca01 | |||
| fe138fc75c | |||
| 31c324ff61 | |||
| 30564ed8b7 | |||
| f05bfe45a8 | |||
| 88c8b6ec6f | |||
| f01e28f574 | |||
| 96627d27b1 | |||
| b3fc574a6a | |||
| 8a3f7560c9 | |||
| 8406e92a9a | |||
| 3b376b4448 | |||
| ca3b7be623 | |||
| c825c52d2f | |||
| 0ea0e4ce59 | |||
| d53d4b4d99 | |||
| b37cd14dd1 | |||
| a921a6bdc1 | |||
| 51a0345941 | |||
| 8d70960e2d | |||
| 5661703b30 | |||
| bc30304f72 | |||
| c76da483fb | |||
| 036a1e47d2 | |||
| 5430c3b592 | |||
| 9b7cb8200c | |||
| 550eedbb1f | |||
| 3a058f278d | |||
| 0f7f0b5f86 | |||
| 3de7534b84 | |||
| 7065462faf | |||
| 2e9d8e1ccb | |||
| 19b84f7cbd | |||
| 9b7c445a15 | |||
| 91e56444ce | |||
| 9b3c8c36bd | |||
| 3403520967 | |||
| d8f969f1df | |||
| 3487deccb6 | |||
| 0926fc627d | |||
| 7999778d94 | |||
| b4ef4c1ff2 | |||
| 72b08e4b87 | |||
| faa64a84e8 | |||
| 32b67fff2b | |||
| f3dbf4122d | |||
| e25ac786da | |||
| f30fba0061 | |||
| 03f319604f | |||
| 0782dab1ec | |||
| c43cce54ab | |||
| 281a368702 | |||
| f28d69b429 | |||
| e674e0c927 | |||
| eebabf99b8 | |||
| 23a19f4431 | |||
| d618b0ffc0 | |||
| ffc71b8733 | |||
| 564df78698 | |||
| 8db0b5ca39 | |||
| 79e26fe829 | |||
| 523d4b0242 | |||
| fe39a3e581 | |||
| 081cc1f992 | |||
| 53c80c2c00 | |||
| 554b64a147 | |||
| dc08dba592 | |||
| 0eaa2775cd | |||
| 852673ce41 | |||
| 8c711e405a | |||
| 25b9f95061 | |||
| ee66a6f8c1 | |||
| b694a5f582 | |||
| 7ab3fce93f | |||
| 1f9509cb6f | |||
| cad1d8ece4 | |||
| b709d75f80 | |||
| 5839909061 | |||
| 30f374de58 | |||
| 0f9fec05fb | |||
| 972a86f0ec | |||
| 7338ebfc94 | |||
| 7132152693 | |||
| c9925f64f7 | |||
| 6da523c8b8 | |||
| 0522284589 | |||
| e10a66dabc | |||
| 51dd631a76 | |||
| d37249787e | |||
| f44841de69 | |||
| 54c5337d2d | |||
| efb0e63bf6 | |||
| 13d78c3afa | |||
| f2910b1d9c | |||
| 78b22a64aa | |||
| 8bb1880c9d | |||
| e7b36c7b90 | |||
| d7804e3770 | |||
| 8d0f9695d2 | |||
| 52b2e4f364 | |||
| 41140149ea | |||
| 85e556ac8f | |||
| cd5437a7e2 | |||
| 00cc82ac94 | |||
| 20f87e3f1d | |||
| 97e34f0667 | |||
| 3e5da9b09a | |||
| a62fcca7a4 | |||
| 778d59fa6b | |||
| 3833a85d7a | |||
| 6d961ab29f | |||
| 001824e0f6 | |||
| 953d32f9b3 | |||
| edba922665 | |||
| 53806d4601 | |||
| 67597722d5 | |||
| 337794a9e9 | |||
| 5f5fb895ff | |||
| 0302d03bc6 | |||
| 0a4fef369f | |||
| 7d5fc356fe | |||
| 8103e5a18f | |||
| e5b56b67fe | |||
| 8ffb7e5f89 | |||
| cb9ab48ce7 | |||
| 1ebb1cee40 | |||
| f0e7101bd2 | |||
| 6fd8b2b177 | |||
| 6edaf42b3d | |||
| 79c047487d | |||
| ac5acb9abf | |||
| 87fbbd3b13 | |||
| 8ac0ec6473 | |||
| 8acba74c4d | |||
| 34bcbdf41d | |||
| d519ca0213 | |||
| a392e8dc09 | |||
| a4d4f77bc2 | |||
| 83a8f72d83 | |||
| 3c54b56cfe | |||
| ff1a08f148 | |||
| 5a53b0fc03 | |||
| e550600ebe | |||
| 7cb13be52a | |||
| ab56d7ecd7 | |||
| bd6ac3ee6d | |||
| 27ca0a8f41 | |||
| f688b9b6b5 | |||
| 16c61b3cc0 | |||
| fb480f22fc | |||
| d0507559a4 | |||
| 58eb331b08 | |||
| c68015ca87 | |||
| 583c22d6e0 | |||
| 58a4694d92 | |||
| 97cf345528 | |||
| 0658abbdd4 | |||
| 72026a58bf | |||
| 7152231a10 | |||
| 8fe8a667b6 | |||
| 560c543e69 | |||
| c5e6650924 | |||
| 10373ea5c9 | |||
| 992b1cf582 | |||
| 1505f3de06 | |||
| 566efe04f2 | |||
| 7586adbb6a | |||
| 69d6ddccc5 | |||
| 5ae496dcef | |||
| bc5d742623 | |||
| 882e699163 | |||
| 9c725d79d6 | |||
| 79fbf437a3 | |||
| d130aa4289 | |||
| 5d8b83a251 | |||
| 5a2548a83d | |||
| a85b310e1f | |||
| e51fd40547 | |||
| 62f271658b | |||
| 0aa742934f | |||
| a26a709a7b | |||
| 027293d285 | |||
| f7d049ac2d | |||
| ea0ff1c8f7 | |||
| 5c1bb5f13a | |||
| 24d9b4b611 | |||
| a0e75c9006 | |||
| 2435b953e1 | |||
| c042e12323 | |||
| e9efe46db9 | |||
| ecc14b7308 | |||
| 0152fe5cdf | |||
| 892d17af22 | |||
| 2cca00203e | |||
| 9f4626a62a | |||
| e890a0b45e | |||
| 68223f0385 | |||
| 1291a88bff | |||
| d9b687450a | |||
| bd950b37d7 | |||
| 21fcdf8c56 | |||
| 6b400fb4bf | |||
| d982298ab2 | |||
| 765fd7f763 | |||
| 0325047c01 | |||
| 2dce8923ee | |||
| 8d1ba074be | |||
| 4675a3b560 | |||
| 8999b1f69f | |||
| 6c2b19c11b | |||
| a425334928 | |||
| db2faf2789 | |||
| fdbb7d0da4 | |||
| 52cd99918f | |||
| a3e6a95ffb | |||
| 5b65169997 | |||
| 5f3bf69e30 | |||
| 507c02b9af | |||
| b7fe47ba48 | |||
| 7dfd11da4b | |||
| 97ba95f30e | |||
| c1945b4ec9 | |||
| c4291a4b8e | |||
| 5b5dfa86c5 | |||
| 3ca3f6959f | |||
| f7b7bfa406 | |||
| 3d2f29c92d |
40
.github/CODEOWNERS
vendored
40
.github/CODEOWNERS
vendored
@ -37,8 +37,7 @@ src/MESONT/* @iafoss
|
||||
src/ML-HDNNP/* @singraber
|
||||
src/ML-IAP/* @athomps
|
||||
src/ML-PACE/* @yury-lysogorskiy
|
||||
src/ML-POD/* @exapde
|
||||
src/ML-UF3/* @monk-04
|
||||
src/ML-POD/* @exapde @rohskopf
|
||||
src/MOFFF/* @hheenen
|
||||
src/MOLFILE/* @akohlmey
|
||||
src/NETCDF/* @pastewka
|
||||
@ -50,7 +49,6 @@ src/PTM/* @pmla
|
||||
src/QMMM/* @akohlmey
|
||||
src/REACTION/* @jrgissing
|
||||
src/REAXFF/* @hasanmetin @stanmoore1
|
||||
src/RHEO/* @jtclemm
|
||||
src/SCAFACOS/* @rhalver
|
||||
src/SNAP/* @athomps
|
||||
src/SPIN/* @julient31
|
||||
@ -60,26 +58,16 @@ src/VTK/* @rbberger
|
||||
|
||||
# individual files in packages
|
||||
src/GPU/pair_vashishta_gpu.* @andeplane
|
||||
src/KOKKOS/pair_vashishta_kokkos.* @andeplane @stanmoore1
|
||||
src/KOSSOS/pair_pod_kokkos.* @exapde @stanmoore1
|
||||
src/KOKKOS/pair_vashishta_kokkos.* @andeplane
|
||||
src/MANYBODY/pair_vashishta_table.* @andeplane
|
||||
src/MANYBODY/pair_atm.* @sergeylishchuk
|
||||
src/MANYBODY/pair_nb3b_screened.* @flodesani
|
||||
src/REPLICA/*_grem.* @dstelter92
|
||||
src/EXTRA-COMMAND/geturl.* @akohlmey
|
||||
src/EXTRA-COMMAND/group_ndx.* @akohlmey
|
||||
src/EXTRA-COMMAND/ndx_group.* @akohlmey
|
||||
src/EXTRA-COMPUTE/compute_stress_mop*.* @RomainVermorel
|
||||
src/EXTRA-COMPUTE/compute_born_matrix.* @Bibobu @athomps
|
||||
src/EXTRA-FIX/fix_deform_pressure.* @jtclemm
|
||||
src/MISC/*_tracker.* @jtclemm
|
||||
src/MC/fix_gcmc.* @athomps
|
||||
src/MC/fix_sgcmc.* @athomps
|
||||
src/REAXFF/compute_reaxff_atom.* @rbberger
|
||||
src/KOKKOS/compute_reaxff_atom_kokkos.* @rbberger
|
||||
src/REPLICA/fix_pimd_langevin.* @Yi-FanLi
|
||||
src/DPD-BASIC/pair_dpd_coul_slater_long.* @Eddy-Barraud
|
||||
src/GPU/pair_dpd_coul_slater_long.* @Eddy-Barraud
|
||||
|
||||
# core LAMMPS classes
|
||||
src/lammps.* @sjplimp
|
||||
@ -91,7 +79,7 @@ src/bond.* @sjplimp
|
||||
src/comm*.* @sjplimp
|
||||
src/compute.* @sjplimp
|
||||
src/dihedral.* @sjplimp
|
||||
src/domain.* @sjplimp @stanmoore1
|
||||
src/domain.* @sjplimp
|
||||
src/dump*.* @sjplimp
|
||||
src/error.* @sjplimp
|
||||
src/finish.* @sjplimp
|
||||
@ -99,10 +87,9 @@ src/fix.* @sjplimp
|
||||
src/force.* @sjplimp
|
||||
src/group.* @sjplimp
|
||||
src/improper.* @sjplimp
|
||||
src/info.* @akohlmey
|
||||
src/kspace.* @sjplimp
|
||||
src/lmptyp.h @sjplimp
|
||||
src/library.* @sjplimp @akohlmey
|
||||
src/library.* @sjplimp
|
||||
src/main.cpp @sjplimp
|
||||
src/min_*.* @sjplimp
|
||||
src/memory.* @sjplimp
|
||||
@ -110,12 +97,12 @@ src/modify.* @sjplimp @stanmoore1
|
||||
src/molecule.* @sjplimp
|
||||
src/my_page.h @sjplimp
|
||||
src/my_pool_chunk.h @sjplimp
|
||||
src/npair*.* @sjplimp @jtclemm
|
||||
src/ntopo*.* @sjplimp @jtclemm
|
||||
src/nstencil*.* @sjplimp @jtclemm
|
||||
src/neighbor.* @sjplimp @jtclemm
|
||||
src/nbin*.* @sjplimp @jtclemm
|
||||
src/neigh_*.* @sjplimp @jtclemm
|
||||
src/npair*.* @sjplimp
|
||||
src/ntopo*.* @sjplimp
|
||||
src/nstencil*.* @sjplimp
|
||||
src/neighbor.* @sjplimp
|
||||
src/nbin*.* @sjplimp
|
||||
src/neigh_*.* @sjplimp
|
||||
src/output.* @sjplimp
|
||||
src/pair.* @sjplimp
|
||||
src/rcb.* @sjplimp
|
||||
@ -148,7 +135,6 @@ src/timer.* @akohlmey
|
||||
src/utils.* @akohlmey @rbberger
|
||||
src/verlet.* @sjplimp @stanmoore1
|
||||
src/math_eigen_impl.h @jewettaij
|
||||
src/fix_press_langevin.* @Bibobu
|
||||
|
||||
# tools
|
||||
tools/coding_standard/* @akohlmey @rbberger
|
||||
@ -165,12 +151,12 @@ tools/vim/* @hammondkd
|
||||
unittest/* @akohlmey
|
||||
|
||||
# cmake
|
||||
cmake/* @akohlmey
|
||||
cmake/* @rbberger
|
||||
cmake/Modules/LAMMPSInterfacePlugin.cmake @akohlmey
|
||||
cmake/Modules/MPI4WIN.cmake @akohlmey
|
||||
cmake/Modules/OpenCLLoader.cmake @akohlmey
|
||||
cmake/Modules/Packages/COLVARS.cmake @giacomofiorin
|
||||
cmake/Modules/Packages/KIM.cmake @ellio167
|
||||
cmake/Modules/Packages/COLVARS.cmake @rbberger @giacomofiorin
|
||||
cmake/Modules/Packages/KIM.cmake @rbberger @ellio167
|
||||
cmake/presets/*.cmake @akohlmey
|
||||
|
||||
# python
|
||||
|
||||
22
.github/CONTRIBUTING.md
vendored
22
.github/CONTRIBUTING.md
vendored
@ -5,9 +5,9 @@ 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.
|
||||
|
||||
Thus please also have a look at:
|
||||
* [The guide for submitting new features in the LAMMPS manual](https://docs.lammps.org/Modify_contribute.html)
|
||||
* [The guide on programming style and requirement in the LAMMPS manual](https://docs.lammps.org/Modify_requirements.html)
|
||||
* [The GitHub tutorial in the LAMMPS manual](http://docs.lammps.org/Howto_github.html)
|
||||
* [The guide for submitting new features in the LAMMPS manual](https://www.lammps.org/doc/Modify_contribute.html)
|
||||
* [The guide on programming style and requirement in the LAMMPS manual](https://www.lammps.org/doc/Modify_style.html)
|
||||
* [The GitHub tutorial in the LAMMPS manual](http://lammps.sandia.gov/doc/Howto_github.html)
|
||||
|
||||
## Table of Contents
|
||||
|
||||
@ -27,17 +27,17 @@ __
|
||||
|
||||
## I don't want to read this whole thing I just have a question!
|
||||
|
||||
> **Note:** Please do not file an issue to ask a general question about LAMMPS, its features, how to use specific commands, or how perform simulations or analysis in LAMMPS. Instead post your question to the [LAMMPS Material Science Discourse forum](https://matsci.org/lammps). Before posting to the forum, please read the general [guidelines](https://www.lammps.org/guidelines.html) and the forum specific [suggestions](https://matsci.org/t/please-read-this-first-guidelines-and-suggestions-for-posting-lammps-questions/49913). Following those guidelines and suggestions will help greatly to get a helpful response. *Always* mention which LAMMPS version you are using. The MatSci website may be also used for discussions that would be off-topic for the LAMMPS categories. Those will just have to be posted to a different category.
|
||||
> **Note:** Please do not file an issue to ask a general question about LAMMPS, its features, how to use specific commands, or how perform simulations or analysis in LAMMPS. Instead post your question to either the ['lammps-users' mailing list](https://lammps.sandia.gov/mail.html) or the [LAMMPS Material Science Discourse forum](https://matsci.org/lammps). You do not need to be subscribed to post to the list (but a mailing list subscription avoids having your post delayed until it is approved by a mailing list moderator). Most posts to the mailing list receive a response within less than 24 hours. Before posting to the mailing list, please read the [mailing list guidelines](https://lammps.sandia.gov/guidelines.html). Following those guidelines will help greatly to get a helpful response. Always mention which LAMMPS version you are using. The LAMMPS forum was recently created as part of a larger effort to build a materials science community and have discussions not just about using LAMMPS. Thus the forum may be also used for discussions that would be off-topic for the mailing list. Those will just have to be posted to a more general category.
|
||||
|
||||
## How Can I Contribute?
|
||||
|
||||
There are several ways how you can actively contribute to the LAMMPS project: you can discuss compiling and using LAMMPS, and solving LAMMPS related problems with other LAMMPS users on the lammps-users mailing list or the forum, you can report bugs or suggest enhancements by creating issues on GitHub (or posting them to the lammps-users mailing list or posting in the LAMMPS Materials Science Discourse forum), and you can contribute by submitting pull requests on GitHub or e-mail your code
|
||||
to one of the [LAMMPS core developers](https://www.lammps.org/authors.html). As you may see from the aforementioned developer page, the LAMMPS software package includes the efforts of a very large number of contributors beyond the principal authors and maintainers.
|
||||
to one of the [LAMMPS core developers](https://lammps.sandia.gov/authors.html). As you may see from the aforementioned developer page, the LAMMPS software package includes the efforts of a very large number of contributors beyond the principal authors and maintainers.
|
||||
|
||||
### Discussing How To Use LAMMPS
|
||||
|
||||
The LAMMPS mailing list is hosted at SourceForge. The mailing list began in 2005, and now includes tens of thousands of messages in thousands of threads. LAMMPS developers try to respond to posted questions in a timely manner, but there are no guarantees. Please consider that people live in different timezone and may not have time to answer e-mails outside of their work hours.
|
||||
You can post to list by sending your email to lammps-users at lists.sourceforge.net (no subscription required), but before posting, please read the [mailing list guidelines](https://www.lammps.org/guidelines.html) to maximize your chances to receive a helpful response.
|
||||
You can post to list by sending your email to lammps-users at lists.sourceforge.net (no subscription required), but before posting, please read the [mailing list guidelines](https://lammps.sandia.gov/guidelines.html) to maximize your chances to receive a helpful response.
|
||||
|
||||
Anyone can browse/search previous questions/answers in the archives. You do not have to subscribe to the list to post questions, receive answers (to your questions), or browse/search the archives. You **do** need to subscribe to the list if you want emails for **all** the posts (as individual messages or in digest form), or to answer questions yourself. Feel free to sign up and help us out! Answering questions from fellow LAMMPS users is a great way to pay back the community for providing you a useful tool for free, and to pass on the advice you have received yourself to others. It improves your karma and helps you understand your own research better.
|
||||
|
||||
@ -47,7 +47,7 @@ The LAMMPS Materials Science Discourse forum was created recently to facilitate
|
||||
|
||||
### Reporting Bugs
|
||||
|
||||
While developers writing code for LAMMPS are careful to test their code, LAMMPS is such a large and complex software, that it is impossible to test for all combinations of features under all normal and not so normal circumstances. Thus bugs do happen, and if you suspect, that you have encountered one, please try to document it and report it as an [Issue](https://github.com/lammps/lammps/issues) on the LAMMPS GitHub project web page. However, before reporting a bug, you need to check whether this is something that may have already been corrected. The [Latest Features and Bug Fixes in LAMMPS](https://www.lammps.org/bug.html) web page lists all significant changes to LAMMPS over the years. It also tells you what the current latest development version of LAMMPS is, and you should test whether your issue still applies to that version.
|
||||
While developers writing code for LAMMPS are careful to test their code, LAMMPS is such a large and complex software, that it is impossible to test for all combinations of features under all normal and not so normal circumstances. Thus bugs do happen, and if you suspect, that you have encountered one, please try to document it and report it as an [Issue](https://github.com/lammps/lammps/issues) on the LAMMPS GitHub project web page. However, before reporting a bug, you need to check whether this is something that may have already been corrected. The [Latest Features and Bug Fixes in LAMMPS](https://lammps.sandia.gov/bug.html) web page lists all significant changes to LAMMPS over the years. It also tells you what the current latest development version of LAMMPS is, and you should test whether your issue still applies to that version.
|
||||
|
||||
When you click on the green "New Issue" button, you will be provided with a text field, where you can enter your message. That text field with contain a template with several headlines and some descriptions. Keep the headlines that are relevant to your reported potential bug and replace the descriptions with the information as suggested by the descriptions.
|
||||
You can also attach small text files (please add the file name extension `.txt` or it will be rejected), images, or small compressed text files (using gzip, do not use RAR or 7-ZIP or similar tools that are uncommon outside of Windows machines). In many cases, bugs are best illustrated by providing a small input deck (do **not** attach your entire production input, but remove everything that is not required to reproduce the issue, and scale down your system size, that the resulting calculation runs fast and can be run on small desktop quickly).
|
||||
@ -65,9 +65,9 @@ To be able to submit an issue on GitHub, you have to register for an account (fo
|
||||
|
||||
We encourage users to submit new features or modifications for LAMMPS. Instructions, guidelines, requirements,
|
||||
and recommendations are in the following sections of the LAMMPS manual:
|
||||
* [The guide for submitting new features in the LAMMPS manual](https://docs.lammps.org/Modify_contribute.html)
|
||||
* [The guide on programming style and requirement in the LAMMPS manual](https://docs.lammps.org/Modify_requirements.html)
|
||||
* [The GitHub tutorial in the LAMMPS manual](http://docs.lammps.org/Howto_github.html)
|
||||
* [The guide for submitting new features in the LAMMPS manual](https://lammps.sandia.gov/doc/Modify_contribute.html)
|
||||
* [The guide on programming style and requirement in the LAMMPS manual](https://lammps.sandia.gov/doc/Modify_contribute.html)
|
||||
* [The GitHub tutorial in the LAMMPS manual](http://lammps.sandia.gov/doc/Howto_github.html)
|
||||
|
||||
|
||||
## GitHub Workflows
|
||||
@ -85,7 +85,7 @@ For bug reports, the next step is that one of the core LAMMPS developers will se
|
||||
### Pull Requests
|
||||
|
||||
Pull requests are the **only** way that changes get made to the LAMMPS distribution. So also the LAMMPS core developers will submit pull requests for their own changes and discuss them on GitHub. Thus if you submit a pull request it will be treated in a similar fashion. When you submit a pull request you may opt to submit a "Draft" pull request. That means your changes are visible and will be subject to testing, but reviewers will not be (auto-)assigned and comments will take into account that this is not complete. On the other hand, this is a perfect way to ask the LAMMPS developers for comments on non-obvious changes and get feedback and possible suggestions for improvements or recommendations about what to avoid.
|
||||
Immediately after the submission, the LAMMPS continuing integration server at https://ci.lammps.org will download your submitted branch and perform a number of tests: it will tests whether it compiles cleanly under various conditions, it will also do a check on whether your included documentation translates cleanly and run some unit tests and other checks. Whether these tests are successful or fail will be recorded. If a test fails, please inspect the corresponding output on the CI server and take the necessary steps, if needed, so that the code can compile cleanly again. The test will be re-run each time the pull request is updated with a push to the remote branch on GitHub. If you are unsure about what you need to change, ask a question in the discussion area of the pull request.
|
||||
Immediately after the submission, the LAMMPS continuing integration server at ci.lammps.org will download your submitted branch and perform a number of tests: it will tests whether it compiles cleanly under various conditions, it will also do a check on whether your included documentation translates cleanly and run some unit tests and other checks. Whether these tests are successful or fail will be recorded. If a test fails, please inspect the corresponding output on the CI server and take the necessary steps, if needed, so that the code can compile cleanly again. The test will be re-run each time the pull request is updated with a push to the remote branch on GitHub. If you are unsure about what you need to change, ask a question in the discussion area of the pull request.
|
||||
Next a LAMMPS core developer will self-assign and do an overall technical assessment of the submission. If you submitted a draft pull request, this will not happen unless you mark it "ready for review". If you are not yet invited as a LAMMPS collaborator, and your contribution seems significant, you may also receive an invitation for collaboration on the LAMMPS repository. As part of the assessment, the pull request will be categorized with labels. There are two special labels: `needs_work` (indicates that work from the submitter of the pull request is needed) and `work_in_progress` (indicates, that the assigned LAMMPS developer will make changes, if not done by the contributor who made the submit).
|
||||
You may also receive comments and suggestions on the overall submission or specific details and on occasion specific requests for changes as part of the review. If permitted, also additional changes may be pushed into your pull request branch or a pull request may be filed in your LAMMPS fork on GitHub to include those changes.
|
||||
The LAMMPS developer may then decide to assign the pull request to another developer (e.g. when that developer is more knowledgeable about the submitted feature or enhancement or has written the modified code). It may also happen, that additional developers are requested to provide a review and approve the changes. For submissions, that may change the general behavior of LAMMPS, or where a possibility of unwanted side effects exists, additional tests may be requested by the assigned developer.
|
||||
|
||||
89
.github/workflows/check-vla.yml
vendored
89
.github/workflows/check-vla.yml
vendored
@ -1,89 +0,0 @@
|
||||
# GitHub action to build LAMMPS on Linux with gcc and -Werror=vla
|
||||
name: "Check for Variable Length Arrays"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- develop
|
||||
pull_request:
|
||||
branches:
|
||||
- develop
|
||||
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build with -Werror=vla
|
||||
if: ${{ github.repository == 'lammps/lammps' }}
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
CCACHE_DIR: ${{ github.workspace }}/.ccache
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 2
|
||||
|
||||
- name: Install extra packages
|
||||
run: |
|
||||
sudo apt-get install -y ccache \
|
||||
libeigen3-dev \
|
||||
libgsl-dev \
|
||||
libcurl4-openssl-dev \
|
||||
mold \
|
||||
mpi-default-bin \
|
||||
mpi-default-dev \
|
||||
ninja-build \
|
||||
python3-dev
|
||||
|
||||
- name: Create Build Environment
|
||||
run: mkdir build
|
||||
|
||||
- name: Set up ccache
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ${{ env.CCACHE_DIR }}
|
||||
key: linux-vla-ccache-${{ github.sha }}
|
||||
restore-keys: linux-vla-ccache-
|
||||
|
||||
- name: Building LAMMPS via CMake
|
||||
shell: bash
|
||||
run: |
|
||||
ccache -z
|
||||
python3 -m venv linuxenv
|
||||
source linuxenv/bin/activate
|
||||
python3 -m pip install numpy
|
||||
python3 -m pip install pyyaml
|
||||
cmake -S cmake -B build \
|
||||
-C cmake/presets/most.cmake \
|
||||
-D CMAKE_CXX_COMPILER=g++ \
|
||||
-D CMAKE_C_COMPILER=gcc \
|
||||
-D CMAKE_CXX_COMPILER_LAUNCHER=ccache \
|
||||
-D CMAKE_C_COMPILER_LAUNCHER=ccache \
|
||||
-D CMAKE_BUILD_TYPE=Debug \
|
||||
-D CMAKE_CXX_FLAGS_DEBUG="-Og -g -Werror=vla" \
|
||||
-D DOWNLOAD_POTENTIALS=off \
|
||||
-D BUILD_MPI=on \
|
||||
-D BUILD_SHARED_LIBS=off \
|
||||
-D BUILD_TOOLS=off \
|
||||
-D ENABLE_TESTING=off \
|
||||
-D MLIAP_ENABLE_ACE=on \
|
||||
-D MLIAP_ENABLE_PYTHON=off \
|
||||
-D PKG_AWPMD=on \
|
||||
-D PKG_GPU=on \
|
||||
-D GPU_API=opencl \
|
||||
-D PKG_LATBOLTZ=on \
|
||||
-D PKG_MDI=on \
|
||||
-D PKG_MANIFOLD=on \
|
||||
-D PKG_ML-PACE=on \
|
||||
-D PKG_ML-RANN=off \
|
||||
-D PKG_MOLFILE=on \
|
||||
-D PKG_RHEO=on \
|
||||
-D PKG_PTM=on \
|
||||
-D PKG_PYTHON=on \
|
||||
-D PKG_QTB=on \
|
||||
-D PKG_SMTBQ=on \
|
||||
-G Ninja
|
||||
cmake --build build
|
||||
ccache -s
|
||||
8
.github/workflows/codeql-analysis.yml
vendored
8
.github/workflows/codeql-analysis.yml
vendored
@ -25,17 +25,17 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 2
|
||||
|
||||
- name: Setup Python
|
||||
uses: actions/setup-python@v5
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.x'
|
||||
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v3
|
||||
uses: github/codeql-action/init@v2
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
config-file: ./.github/codeql/${{ matrix.language }}.yml
|
||||
@ -55,4 +55,4 @@ jobs:
|
||||
cmake --build . --parallel 2
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v3
|
||||
uses: github/codeql-action/analyze@v2
|
||||
|
||||
49
.github/workflows/compile-msvc.yml
vendored
49
.github/workflows/compile-msvc.yml
vendored
@ -1,5 +1,5 @@
|
||||
# GitHub action to build LAMMPS on Windows with Visual C++
|
||||
name: "Windows Unit Tests"
|
||||
name: "Native Windows Compilation and Unit Tests"
|
||||
|
||||
on:
|
||||
push:
|
||||
@ -16,50 +16,43 @@ jobs:
|
||||
name: Windows Compilation Test
|
||||
if: ${{ github.repository == 'lammps/lammps' }}
|
||||
runs-on: windows-latest
|
||||
env:
|
||||
CCACHE_DIR: ${{ github.workspace }}/.ccache
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 2
|
||||
|
||||
- name: Enable MSVC++
|
||||
uses: lammps/setup-msvc-dev@v3
|
||||
with:
|
||||
arch: x64
|
||||
|
||||
- name: Install Ccache
|
||||
run: |
|
||||
choco install ccache ninja -y
|
||||
|
||||
- name: Set up ccache
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ${{ env.CCACHE_DIR }}
|
||||
key: win-unit-ccache-${{ github.sha }}
|
||||
restore-keys: win-unit-ccache-
|
||||
|
||||
- name: Select Python version
|
||||
uses: actions/setup-python@v5
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.11'
|
||||
|
||||
- name: Building LAMMPS via CMake
|
||||
shell: bash
|
||||
run: |
|
||||
ccache -z
|
||||
python3 -m pip install numpy
|
||||
python3 -m pip install pyyaml
|
||||
cmake -C cmake\presets\windows.cmake -D CMAKE_CXX_COMPILER=cl -D CMAKE_CXX_COMPILER_LAUNCHER=ccache -D CMAKE_C_COMPILER=cl -D CMAKE_C_COMPILER_LAUNCHER=ccache -D CMAKE_Fortran_COMPILER="" -D DOWNLOAD_POTENTIALS=off -D PKG_PYTHON=on -D WITH_PNG=off -D WITH_JPEG=off -S cmake -B build -D BUILD_SHARED_LIBS=on -D ENABLE_TESTING=on -D CMAKE_BUILD_TYPE=Release -G Ninja
|
||||
cmake --build build
|
||||
ccache -s
|
||||
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 \
|
||||
-S cmake -B build \
|
||||
-D BUILD_SHARED_LIBS=on \
|
||||
-D LAMMPS_EXCEPTIONS=on \
|
||||
-D ENABLE_TESTING=on
|
||||
cmake --build build --config Release --parallel 2
|
||||
|
||||
- name: Run LAMMPS executable
|
||||
shell: bash
|
||||
run: |
|
||||
build\lmp.exe -h
|
||||
build\lmp.exe -in bench\in.lj
|
||||
./build/Release/lmp.exe -h
|
||||
./build/Release/lmp.exe -in bench/in.lj
|
||||
|
||||
- name: Run Unit Tests
|
||||
working-directory: build
|
||||
run: ctest -V -E FixTimestep:python_move_nve
|
||||
shell: bash
|
||||
run: ctest -V -C Release -E FixTimestep:python_move_nve
|
||||
|
||||
10
.github/workflows/coverity.yml
vendored
10
.github/workflows/coverity.yml
vendored
@ -16,7 +16,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 2
|
||||
|
||||
@ -25,7 +25,7 @@ jobs:
|
||||
|
||||
- name: Cache Coverity
|
||||
id: cache-coverity
|
||||
uses: actions/cache@v4
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: ./download/
|
||||
key: ${{ runner.os }}-download-${{ hashFiles('**/coverity_tool.*') }}
|
||||
@ -59,13 +59,16 @@ jobs:
|
||||
-D BUILD_SHARED_LIBS=on \
|
||||
-D LAMMPS_SIZES=SMALLBIG \
|
||||
-D LAMMPS_EXCEPTIONS=off \
|
||||
-D PKG_MESSAGE=on \
|
||||
-D PKG_MPIIO=on \
|
||||
-D PKG_ATC=on \
|
||||
-D PKG_AWPMD=on \
|
||||
-D PKG_BOCS=on \
|
||||
-D PKG_EFF=on \
|
||||
-D PKG_H5MD=on \
|
||||
-D PKG_INTEL=on \
|
||||
-D PKG_LATBOLTZ=on \
|
||||
-D PKG_MANIFOLD=on \
|
||||
-D PKG_MDI=on \
|
||||
-D PKG_MGPT=on \
|
||||
-D PKG_ML-PACE=on \
|
||||
-D PKG_ML-RANN=on \
|
||||
@ -74,6 +77,7 @@ jobs:
|
||||
-D PKG_PTM=on \
|
||||
-D PKG_QTB=on \
|
||||
-D PKG_SMTBQ=on \
|
||||
-D PKG_TALLY=on \
|
||||
../cmake
|
||||
|
||||
- name: Run Coverity Scan
|
||||
|
||||
82
.github/workflows/unittest-linux.yml
vendored
82
.github/workflows/unittest-linux.yml
vendored
@ -1,82 +0,0 @@
|
||||
# GitHub action to build LAMMPS on Linux and run standard unit tests
|
||||
name: "Unittest for Linux /w LAMMPS_BIGBIG"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- develop
|
||||
pull_request:
|
||||
branches:
|
||||
- develop
|
||||
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Linux Unit Test
|
||||
if: ${{ github.repository == 'lammps/lammps' }}
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
CCACHE_DIR: ${{ github.workspace }}/.ccache
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 2
|
||||
|
||||
- name: Install extra packages
|
||||
run: |
|
||||
sudo apt-get install -y ccache \
|
||||
libeigen3-dev \
|
||||
libgsl-dev \
|
||||
libcurl4-openssl-dev \
|
||||
mold \
|
||||
ninja-build \
|
||||
python3-dev
|
||||
|
||||
- name: Create Build Environment
|
||||
run: mkdir build
|
||||
|
||||
- name: Set up ccache
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ${{ env.CCACHE_DIR }}
|
||||
key: linux-unit-ccache-${{ github.sha }}
|
||||
restore-keys: linux-unit-ccache-
|
||||
|
||||
- name: Building LAMMPS via CMake
|
||||
shell: bash
|
||||
run: |
|
||||
ccache -z
|
||||
python3 -m venv linuxenv
|
||||
source linuxenv/bin/activate
|
||||
python3 -m pip install numpy
|
||||
python3 -m pip install pyyaml
|
||||
cmake -S cmake -B build \
|
||||
-C cmake/presets/gcc.cmake \
|
||||
-C cmake/presets/most.cmake \
|
||||
-D CMAKE_CXX_COMPILER_LAUNCHER=ccache \
|
||||
-D CMAKE_C_COMPILER_LAUNCHER=ccache \
|
||||
-D BUILD_SHARED_LIBS=on \
|
||||
-D LAMMPS_SIZES=bigbig \
|
||||
-D DOWNLOAD_POTENTIALS=off \
|
||||
-D ENABLE_TESTING=on \
|
||||
-D MLIAP_ENABLE_ACE=on \
|
||||
-D MLIAP_ENABLE_PYTHON=off \
|
||||
-D PKG_MANIFOLD=on \
|
||||
-D PKG_ML-PACE=on \
|
||||
-D PKG_ML-RANN=on \
|
||||
-D PKG_RHEO=on \
|
||||
-D PKG_PTM=on \
|
||||
-D PKG_PYTHON=on \
|
||||
-D PKG_QTB=on \
|
||||
-D PKG_SMTBQ=on \
|
||||
-G Ninja
|
||||
cmake --build build
|
||||
ccache -s
|
||||
|
||||
- name: Run Tests
|
||||
working-directory: build
|
||||
shell: bash
|
||||
run: ctest -V
|
||||
8
.github/workflows/unittest-macos.yml
vendored
8
.github/workflows/unittest-macos.yml
vendored
@ -15,13 +15,13 @@ jobs:
|
||||
build:
|
||||
name: MacOS Unit Test
|
||||
if: ${{ github.repository == 'lammps/lammps' }}
|
||||
runs-on: macos-13
|
||||
runs-on: macos-latest
|
||||
env:
|
||||
CCACHE_DIR: ${{ github.workspace }}/.ccache
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 2
|
||||
|
||||
@ -32,7 +32,7 @@ jobs:
|
||||
run: mkdir build
|
||||
|
||||
- name: Set up ccache
|
||||
uses: actions/cache@v4
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: ${{ env.CCACHE_DIR }}
|
||||
key: macos-ccache-${{ github.sha }}
|
||||
@ -43,8 +43,6 @@ jobs:
|
||||
working-directory: build
|
||||
run: |
|
||||
ccache -z
|
||||
python3 -m venv macosenv
|
||||
source macosenv/bin/activate
|
||||
python3 -m pip install numpy
|
||||
python3 -m pip install pyyaml
|
||||
cmake -C ../cmake/presets/clang.cmake \
|
||||
|
||||
11
.gitignore
vendored
11
.gitignore
vendored
@ -43,12 +43,12 @@ Thumbs.db
|
||||
|
||||
#cmake
|
||||
/build*
|
||||
CMakeCache.txt
|
||||
CMakeFiles
|
||||
/CMakeCache.txt
|
||||
/CMakeFiles/
|
||||
/Testing
|
||||
/Makefile
|
||||
Testing
|
||||
Temporary
|
||||
cmake_install.cmake
|
||||
/Testing
|
||||
/cmake_install.cmake
|
||||
/lmp
|
||||
out/Debug
|
||||
out/RelWithDebInfo
|
||||
@ -60,4 +60,3 @@ src/Makefile.package.settings-e
|
||||
/cmake/build/x64-Debug-Clang
|
||||
/install/x64-GUI-MSVC
|
||||
/install
|
||||
.Rhistory
|
||||
|
||||
@ -2,7 +2,8 @@
|
||||
########################################
|
||||
# CMake build system
|
||||
# This file is part of LAMMPS
|
||||
cmake_minimum_required(VERSION 3.16)
|
||||
# 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)
|
||||
@ -12,23 +13,23 @@ endif()
|
||||
if(POLICY CMP0075)
|
||||
cmake_policy(SET CMP0075 NEW)
|
||||
endif()
|
||||
# set policy to silence warnings about requiring execute permission for find_program
|
||||
# we use OLD because the python-config script for the Fedora MinGW cross-compiler requires it currently
|
||||
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)
|
||||
set(SOVERSION 0)
|
||||
get_property(BUILD_IS_MULTI_CONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
|
||||
|
||||
include(GNUInstallDirs)
|
||||
get_filename_component(LAMMPS_DIR ${CMAKE_CURRENT_SOURCE_DIR}/.. ABSOLUTE)
|
||||
get_filename_component(LAMMPS_LIB_BINARY_DIR ${CMAKE_BINARY_DIR}/lib ABSOLUTE)
|
||||
# collect all executables and shared libs in the top level build folder
|
||||
@ -111,7 +112,7 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
|
||||
if(CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 17.3 OR CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 17.4)
|
||||
set(CMAKE_TUNE_DEFAULT "-xCOMMON-AVX512")
|
||||
else()
|
||||
set(CMAKE_TUNE_DEFAULT "-xHost -fp-model fast=2 -no-prec-div -qoverride-limits -diag-disable=10441 -diag-disable=11074 -diag-disable=11076 -diag-disable=2196")
|
||||
set(CMAKE_TUNE_DEFAULT "-xHost -fp-model fast=2 -no-prec-div -qoverride-limits -diag-disable=10441 -diag-disable=2196")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
@ -126,33 +127,20 @@ if((CMAKE_CXX_COMPILER_ID STREQUAL "NVHPC") OR (CMAKE_CXX_COMPILER_ID STREQUAL "
|
||||
set(CMAKE_TUNE_DEFAULT "-Minform=severe")
|
||||
endif()
|
||||
|
||||
# this hack is required to compile fmt lib with CrayClang version 15.0.2
|
||||
# CrayClang is only directly recognized by version 3.28 and later
|
||||
if(CMAKE_VERSION VERSION_LESS 3.28)
|
||||
get_filename_component(_exe "${CMAKE_CXX_COMPILER}" NAME)
|
||||
if((CMAKE_CXX_COMPILER_ID STREQUAL "Clang") AND (_exe STREQUAL "crayCC"))
|
||||
set(CMAKE_TUNE_DEFAULT "-DFMT_STATIC_THOUSANDS_SEPARATOR")
|
||||
endif()
|
||||
else()
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "CrayClang")
|
||||
set(CMAKE_TUNE_DEFAULT "-DFMT_STATIC_THOUSANDS_SEPARATOR")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# silence nvcc warnings
|
||||
if((PKG_KOKKOS) AND (Kokkos_ENABLE_CUDA) AND NOT (CMAKE_CXX_COMPILER_ID STREQUAL "Clang"))
|
||||
set(CMAKE_TUNE_DEFAULT "${CMAKE_TUNE_DEFAULT} -Xcudafe --diag_suppress=unrecognized_pragma")
|
||||
endif()
|
||||
|
||||
# we require C++11 without extensions. Kokkos requires at least C++17 (currently)
|
||||
# we require C++11 without extensions. Kokkos requires at least C++14 (currently)
|
||||
if(NOT CMAKE_CXX_STANDARD)
|
||||
set(CMAKE_CXX_STANDARD 11)
|
||||
endif()
|
||||
if(CMAKE_CXX_STANDARD LESS 11)
|
||||
message(FATAL_ERROR "C++ standard must be set to at least 11")
|
||||
endif()
|
||||
if(PKG_KOKKOS AND (CMAKE_CXX_STANDARD LESS 17))
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
if(PKG_KOKKOS AND (CMAKE_CXX_STANDARD LESS 14))
|
||||
set(CMAKE_CXX_STANDARD 14)
|
||||
endif()
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
set(CMAKE_CXX_EXTENSIONS OFF CACHE BOOL "Use compiler extensions")
|
||||
@ -163,28 +151,11 @@ if(MSVC)
|
||||
add_compile_options(/Zc:__cplusplus)
|
||||
add_compile_options(/wd4244)
|
||||
add_compile_options(/wd4267)
|
||||
add_compile_options(/wd4250)
|
||||
add_compile_options(/EHsc)
|
||||
endif()
|
||||
add_compile_definitions(_CRT_SECURE_NO_WARNINGS)
|
||||
endif()
|
||||
|
||||
# warn about potentially problematic GCC compiler versions
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||
if (CMAKE_CXX_STANDARD GREATER_EQUAL 17)
|
||||
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 9.0)
|
||||
message(WARNING "Using ${CMAKE_CXX_COMPILER_ID} compiler version ${CMAKE_CXX_COMPILER_VERSION} "
|
||||
"with C++17 is not recommended. Please use ${CMAKE_CXX_COMPILER_ID} compiler version 9.x or later")
|
||||
endif()
|
||||
endif()
|
||||
if (CMAKE_CXX_STANDARD GREATER_EQUAL 11)
|
||||
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0)
|
||||
message(WARNING "Using ${CMAKE_CXX_COMPILER_ID} compiler version ${CMAKE_CXX_COMPILER_VERSION} "
|
||||
"with C++11 is not recommended. Please use ${CMAKE_CXX_COMPILER_ID} compiler version 5.x or later")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# export all symbols when building a .dll file on windows
|
||||
if((CMAKE_SYSTEM_NAME STREQUAL "Windows") AND BUILD_SHARED_LIBS)
|
||||
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
|
||||
@ -193,20 +164,17 @@ endif()
|
||||
########################################################################
|
||||
# User input options #
|
||||
########################################################################
|
||||
# backward compatibility with CMake before 3.12 and older LAMMPS documentation
|
||||
if (PYTHON_EXECUTABLE)
|
||||
set(Python_EXECUTABLE "${PYTHON_EXECUTABLE}")
|
||||
endif()
|
||||
# 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)
|
||||
# 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")
|
||||
set(PYTHON_EXECUTABLE "$ENV{VIRTUAL_ENV}/Scripts/python.exe")
|
||||
else()
|
||||
set(Python_EXECUTABLE "$ENV{VIRTUAL_ENV}/bin/python")
|
||||
set(PYTHON_EXECUTABLE "$ENV{VIRTUAL_ENV}/bin/python")
|
||||
endif()
|
||||
set(Python_EXECUTABLE "${PYTHON_EXECUTABLE}")
|
||||
message(STATUS "Running in virtual environment: $ENV{VIRTUAL_ENV}\n"
|
||||
" Setting Python interpreter to: ${Python_EXECUTABLE}")
|
||||
" Setting Python interpreter to: ${PYTHON_EXECUTABLE}")
|
||||
endif()
|
||||
|
||||
set(LAMMPS_MACHINE "" CACHE STRING "Suffix to append to lmp binary (WON'T enable any features automatically")
|
||||
@ -219,19 +187,20 @@ set(LAMMPS_BINARY lmp${LAMMPS_MACHINE})
|
||||
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")
|
||||
if(ENABLE_CLANG_TIDY)
|
||||
set(CMAKE_CXX_CLANG_TIDY "clang-tidy;-checks=-*,performance-trivially-destructible,performance-unnecessary-copy-initialization,performance-unnecessary-value-param,readability-redundant-control-flow,readability-redundant-declaration,readability-redundant-function-ptr-dereference,readability-redundant-member-init,readability-redundant-string-cstr,readability-redundant-string-init,readability-simplify-boolean-expr,readability-static-accessed-through-instance,readability-static-definition-in-anonymous-namespace,readability-qualified-auto,misc-unused-parameters,modernize-deprecated-ios-base-aliases,modernize-loop-convert,modernize-shrink-to-fit,modernize-use-auto,modernize-use-using,modernize-use-override,modernize-use-bool-literals,modernize-use-emplace,modernize-return-braced-init-list,modernize-use-equals-default,modernize-use-equals-delete,modernize-replace-random-shuffle,modernize-deprecated-headers,modernize-use-nullptr,modernize-use-noexcept,modernize-redundant-void-arg;-fix;-header-filter=.*,header-filter=library.h,header-filter=fmt/*.h" CACHE STRING "clang-tidy settings")
|
||||
set(CMAKE_CXX_CLANG_TIDY "clang-tidy;-checks=-*,performance-trivially-destructible,performance-unnecessary-copy-initialization,performance-unnecessary-value-param,readability-redundant-control-flow,readability-redundant-declaration,readability-redundant-function-ptr-dereference,readability-redundant-member-init,readability-redundant-string-cstr,readability-redundant-string-init,readability-simplify-boolean-expr,readability-static-accessed-through-instance,readability-static-definition-in-anonymous-namespace,modernize-use-override,modernize-use-bool-literals,modernize-use-emplace,modernize-return-braced-init-list,modernize-use-equals-default,modernize-use-equals-delete,modernize-replace-random-shuffle,modernize-deprecated-headers,modernize-use-nullptr,modernize-use-noexcept,modernize-redundant-void-arg;-fix;-header-filter=.*,header-filter=library.h,header-filter=fmt/*.h" CACHE STRING "clang-tidy settings")
|
||||
else()
|
||||
unset(CMAKE_CXX_CLANG_TIDY CACHE)
|
||||
endif()
|
||||
|
||||
|
||||
file(GLOB ALL_SOURCES CONFIGURE_DEPENDS ${LAMMPS_SOURCE_DIR}/[^.]*.cpp)
|
||||
file(GLOB MAIN_SOURCES CONFIGURE_DEPENDS ${LAMMPS_SOURCE_DIR}/main.cpp)
|
||||
include(GNUInstallDirs)
|
||||
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})
|
||||
|
||||
@ -243,10 +212,6 @@ endif()
|
||||
add_executable(lmp ${MAIN_SOURCES})
|
||||
target_link_libraries(lmp PRIVATE lammps)
|
||||
set_target_properties(lmp PROPERTIES OUTPUT_NAME ${LAMMPS_BINARY})
|
||||
# re-export all symbols for plugins
|
||||
if(PKG_PLUGIN AND (NOT ((CMAKE_SYSTEM_NAME STREQUAL "Windows"))))
|
||||
set_target_properties(lmp PROPERTIES ENABLE_EXPORTS TRUE)
|
||||
endif()
|
||||
install(TARGETS lmp EXPORT LAMMPS_Targets DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||
|
||||
option(CMAKE_VERBOSE_MAKEFILE "Generate verbose Makefiles" OFF)
|
||||
@ -277,7 +242,6 @@ set(STANDARD_PACKAGES
|
||||
DRUDE
|
||||
EFF
|
||||
ELECTRODE
|
||||
EXTRA-COMMAND
|
||||
EXTRA-COMPUTE
|
||||
EXTRA-DUMP
|
||||
EXTRA-FIX
|
||||
@ -303,14 +267,15 @@ set(STANDARD_PACKAGES
|
||||
ML-HDNNP
|
||||
ML-IAP
|
||||
ML-PACE
|
||||
ML-POD
|
||||
ML-QUIP
|
||||
ML-RANN
|
||||
ML-SNAP
|
||||
ML-UF3
|
||||
ML-POD
|
||||
MOFFF
|
||||
MOLECULE
|
||||
MOLFILE
|
||||
MPIIO
|
||||
MSCG
|
||||
NETCDF
|
||||
ORIENT
|
||||
PERI
|
||||
@ -326,7 +291,6 @@ set(STANDARD_PACKAGES
|
||||
REACTION
|
||||
REAXFF
|
||||
REPLICA
|
||||
RHEO
|
||||
RIGID
|
||||
SCAFACOS
|
||||
SHOCK
|
||||
@ -417,9 +381,15 @@ if(NOT ${LAMMPS_MEMALIGN} STREQUAL "0")
|
||||
target_compile_definitions(lammps PRIVATE -DLAMMPS_MEMALIGN=${LAMMPS_MEMALIGN})
|
||||
endif()
|
||||
|
||||
option(LAMMPS_EXCEPTIONS "enable the use of C++ exceptions for error messages (useful for library interface)" ${ENABLE_TESTING})
|
||||
if(LAMMPS_EXCEPTIONS)
|
||||
target_compile_definitions(lammps PUBLIC -DLAMMPS_EXCEPTIONS)
|
||||
endif()
|
||||
|
||||
# "hard" dependencies between packages resulting
|
||||
# in an error instead of skipping over files
|
||||
pkg_depends(ML-IAP ML-SNAP)
|
||||
pkg_depends(MPIIO MPI)
|
||||
pkg_depends(ATC MANYBODY)
|
||||
pkg_depends(LATBOLTZ MPI)
|
||||
pkg_depends(SCAFACOS MPI)
|
||||
@ -431,7 +401,6 @@ pkg_depends(CG-DNA ASPHERE)
|
||||
pkg_depends(ELECTRODE KSPACE)
|
||||
pkg_depends(EXTRA-MOLECULE MOLECULE)
|
||||
pkg_depends(MESONT MOLECULE)
|
||||
pkg_depends(RHEO BPM)
|
||||
|
||||
# detect if we may enable OpenMP support by default
|
||||
set(BUILD_OMP_DEFAULT OFF)
|
||||
@ -457,7 +426,6 @@ if(BUILD_OMP)
|
||||
(CMAKE_CXX_COMPILER_ID STREQUAL "IntelLLVM") OR (CMAKE_CXX_COMPILER_ID STREQUAL "XLClang") OR
|
||||
((CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang") AND (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 10.0)) OR
|
||||
((CMAKE_CXX_COMPILER_ID STREQUAL "Clang") AND (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 10.0)) OR
|
||||
((CMAKE_CXX_COMPILER_ID STREQUAL "CrayClang") AND (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 10.0)) OR
|
||||
((CMAKE_CXX_COMPILER_ID STREQUAL "Intel") AND (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 19.0)))
|
||||
# GCC 9.x and later plus Clang 10.x and later implement strict OpenMP 4.0 semantics for consts.
|
||||
# Intel 18.0 was tested to support both, so we switch to OpenMP 4+ from 19.x onward to be safe.
|
||||
@ -468,43 +436,16 @@ if(BUILD_OMP)
|
||||
target_compile_definitions(lammps PRIVATE -DLAMMPS_OMP_COMPAT=${LAMMPS_OMP_COMPAT_LEVEL})
|
||||
target_link_libraries(lammps PRIVATE OpenMP::OpenMP_CXX)
|
||||
target_link_libraries(lmp PRIVATE OpenMP::OpenMP_CXX)
|
||||
|
||||
# this hack is required to correctly link with OpenMP support when using CrayClang version 15.0.2
|
||||
# CrayClang is only directly recognized by version 3.28 and later
|
||||
if(CMAKE_VERSION VERSION_LESS 3.28)
|
||||
get_filename_component(_exe "${CMAKE_CXX_COMPILER}" NAME)
|
||||
if((CMAKE_CXX_COMPILER_ID STREQUAL "Clang") AND (_exe STREQUAL "crayCC"))
|
||||
set(CMAKE_SHARED_LINKER_FLAGS_${BTYPE} "${CMAKE_SHARED_LINKER_FLAGS_${BTYPE}} -fopenmp")
|
||||
set(CMAKE_STATIC_LINKER_FLAGS_${BTYPE} "${CMAKE_STATIC_LINKER_FLAGS_${BTYPE}} -fopenmp")
|
||||
endif()
|
||||
else()
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "CrayClang")
|
||||
set(CMAKE_SHARED_LINKER_FLAGS_${BTYPE} "${CMAKE_SHARED_LINKER_FLAGS_${BTYPE}} -fopenmp")
|
||||
set(CMAKE_STATIC_LINKER_FLAGS_${BTYPE} "${CMAKE_STATIC_LINKER_FLAGS_${BTYPE}} -fopenmp")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# lower C++ standard for fmtlib sources when using Intel classic compiler
|
||||
if((CMAKE_CXX_COMPILER_ID STREQUAL "Intel") AND (CMAKE_CXX_STANDARD GREATER_EQUAL 17)
|
||||
AND (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 2021.10))
|
||||
message(STATUS "Lowering C++ standard for compiling fmtlib sources with Intel Classic compiler")
|
||||
get_filename_component(LMP_UTILS_SRC "${LAMMPS_SOURCE_DIR}/utils.cpp" ABSOLUTE)
|
||||
get_filename_component(LMP_VARIABLE_SRC "${LAMMPS_SOURCE_DIR}/variable.cpp" ABSOLUTE)
|
||||
get_filename_component(FMT_FORMAT_SRC "${LAMMPS_SOURCE_DIR}/fmtlib_format.cpp" ABSOLUTE)
|
||||
get_filename_component(FMT_OS_SRC "${LAMMPS_SOURCE_DIR}/fmtlib_os.cpp" ABSOLUTE)
|
||||
set_source_files_properties("${FMT_FORMAT_SRC}" "${FMT_OS_SRC}" "${LMP_VARIABLE_SRC}" "${LMP_UTILS_SRC}"
|
||||
PROPERTIES COMPILE_OPTIONS "-std=c++14")
|
||||
endif()
|
||||
|
||||
if(PKG_ATC OR PKG_AWPMD OR PKG_ML-QUIP OR PKG_ML-POD OR PKG_ELECTRODE OR BUILD_TOOLS)
|
||||
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 CONFIGURE_DEPENDS ${LAMMPS_LIB_SOURCE_DIR}/linalg/[^.]*.cpp)
|
||||
file(GLOB LINALG_SOURCES ${CONFIGURE_DEPENDS} ${LAMMPS_LIB_SOURCE_DIR}/linalg/[^.]*.cpp)
|
||||
add_library(linalg STATIC ${LINALG_SOURCES})
|
||||
set_target_properties(linalg PROPERTIES OUTPUT_NAME lammps_linalg${LAMMPS_MACHINE})
|
||||
set(BLAS_LIBRARIES "$<TARGET_FILE:linalg>")
|
||||
@ -515,14 +456,6 @@ if(PKG_ATC OR PKG_AWPMD OR PKG_ML-QUIP OR PKG_ML-POD OR PKG_ELECTRODE OR BUILD_T
|
||||
endif()
|
||||
endif()
|
||||
|
||||
find_package(CURL QUIET COMPONENTS HTTP HTTPS)
|
||||
option(WITH_CURL "Enable libcurl support" ${CURL_FOUND})
|
||||
if(WITH_CURL)
|
||||
find_package(CURL REQUIRED COMPONENTS HTTP HTTPS)
|
||||
target_compile_definitions(lammps PRIVATE -DLAMMPS_CURL)
|
||||
target_link_libraries(lammps PRIVATE CURL::libcurl)
|
||||
endif()
|
||||
|
||||
# tweak jpeg library names to avoid linker errors with MinGW cross-compilation
|
||||
set(JPEG_NAMES libjpeg libjpeg-62)
|
||||
find_package(JPEG QUIET)
|
||||
@ -530,7 +463,12 @@ option(WITH_JPEG "Enable JPEG support" ${JPEG_FOUND})
|
||||
if(WITH_JPEG)
|
||||
find_package(JPEG REQUIRED)
|
||||
target_compile_definitions(lammps PRIVATE -DLAMMPS_JPEG)
|
||||
target_link_libraries(lammps PRIVATE JPEG::JPEG)
|
||||
if(CMAKE_VERSION VERSION_LESS 3.12)
|
||||
target_include_directories(lammps PRIVATE ${JPEG_INCLUDE_DIRS})
|
||||
target_link_libraries(lammps PRIVATE ${JPEG_LIBRARIES})
|
||||
else()
|
||||
target_link_libraries(lammps PRIVATE JPEG::JPEG)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
find_package(PNG QUIET)
|
||||
@ -580,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 COMPRESS ML-PACE LEPTON RHEO)
|
||||
PLUMED QMMM ML-QUIP SCAFACOS MACHDYN VTK KIM MSCG COMPRESS ML-PACE LEPTON)
|
||||
if(PKG_${PKG_WITH_INCL})
|
||||
include(Packages/${PKG_WITH_INCL})
|
||||
endif()
|
||||
@ -605,12 +543,12 @@ endforeach()
|
||||
########################################################################
|
||||
# Basic system tests (standard libraries, headers, functions, types) #
|
||||
########################################################################
|
||||
if (NOT ((CMAKE_CXX_COMPILER_ID STREQUAL "Intel") OR (CMAKE_CXX_COMPILER_ID STREQUAL "IntelLLVM")))
|
||||
check_include_file_cxx(cmath FOUND_CMATH)
|
||||
if(NOT FOUND_CMATH)
|
||||
message(FATAL_ERROR "Could not find the required 'cmath' header")
|
||||
endif(NOT FOUND_CMATH)
|
||||
endif()
|
||||
foreach(HEADER cmath)
|
||||
check_include_file_cxx(${HEADER} FOUND_${HEADER})
|
||||
if(NOT FOUND_${HEADER})
|
||||
message(FATAL_ERROR "Could not find needed header - ${HEADER}")
|
||||
endif(NOT FOUND_${HEADER})
|
||||
endforeach(HEADER)
|
||||
|
||||
# make the standard math library overrideable and autodetected (for systems that don't have it)
|
||||
find_library(STANDARD_MATH_LIB m DOC "Standard Math library")
|
||||
@ -642,8 +580,8 @@ endforeach()
|
||||
foreach(PKG ${STANDARD_PACKAGES})
|
||||
set(${PKG}_SOURCES_DIR ${LAMMPS_SOURCE_DIR}/${PKG})
|
||||
|
||||
file(GLOB ${PKG}_SOURCES CONFIGURE_DEPENDS ${${PKG}_SOURCES_DIR}/[^.]*.cpp)
|
||||
file(GLOB ${PKG}_HEADERS CONFIGURE_DEPENDS ${${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})
|
||||
@ -659,12 +597,19 @@ foreach(PKG ${STANDARD_PACKAGES})
|
||||
RegisterPackages(${${PKG}_SOURCES_DIR})
|
||||
endforeach()
|
||||
|
||||
# packages that need defines set
|
||||
foreach(PKG MPIIO)
|
||||
if(PKG_${PKG})
|
||||
target_compile_definitions(lammps PRIVATE -DLMP_${PKG})
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
# dedicated check for entire contents of accelerator packages
|
||||
foreach(PKG ${SUFFIX_PACKAGES})
|
||||
set(${PKG}_SOURCES_DIR ${LAMMPS_SOURCE_DIR}/${PKG})
|
||||
|
||||
file(GLOB ${PKG}_SOURCES CONFIGURE_DEPENDS ${${PKG}_SOURCES_DIR}/[^.]*.cpp)
|
||||
file(GLOB ${PKG}_HEADERS CONFIGURE_DEPENDS ${${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})
|
||||
@ -678,7 +623,7 @@ endforeach()
|
||||
foreach(PKG_LIB POEMS ATC AWPMD H5MD)
|
||||
if(PKG_${PKG_LIB})
|
||||
string(TOLOWER "${PKG_LIB}" PKG_LIB)
|
||||
file(GLOB_RECURSE ${PKG_LIB}_SOURCES CONFIGURE_DEPENDS
|
||||
file(GLOB_RECURSE ${PKG_LIB}_SOURCES ${CONFIGURE_DEPENDS}
|
||||
${LAMMPS_LIB_SOURCE_DIR}/${PKG_LIB}/[^.]*.c ${LAMMPS_LIB_SOURCE_DIR}/${PKG_LIB}/[^.]*.cpp)
|
||||
add_library(${PKG_LIB} STATIC ${${PKG_LIB}_SOURCES})
|
||||
set_target_properties(${PKG_LIB} PROPERTIES OUTPUT_NAME lammps_${PKG_LIB}${LAMMPS_MACHINE})
|
||||
@ -722,7 +667,7 @@ endif()
|
||||
# packages which selectively include variants based on enabled styles
|
||||
# e.g. accelerator packages
|
||||
######################################################################
|
||||
foreach(PKG_WITH_INCL CORESHELL DPD-BASIC DPD-SMOOTH MC MISC PHONON QEQ OPENMP KOKKOS OPT INTEL GPU)
|
||||
foreach(PKG_WITH_INCL CORESHELL DPD-SMOOTH MC MISC PHONON QEQ OPENMP KOKKOS OPT INTEL GPU)
|
||||
if(PKG_${PKG_WITH_INCL})
|
||||
include(Packages/${PKG_WITH_INCL})
|
||||
endif()
|
||||
@ -873,8 +818,20 @@ install(
|
||||
# This is primarily for people that only want to use the Python wrapper.
|
||||
###############################################################################
|
||||
if(BUILD_SHARED_LIBS)
|
||||
# backward compatibility
|
||||
find_package(Python COMPONENTS Interpreter)
|
||||
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(BUILD_IS_MULTI_CONFIG)
|
||||
set(MY_BUILD_DIR ${CMAKE_BINARY_DIR}/$<CONFIG>)
|
||||
else()
|
||||
@ -900,7 +857,7 @@ endif()
|
||||
include(Testing)
|
||||
include(CodeCoverage)
|
||||
include(CodingStandard)
|
||||
find_package(ClangFormat 11.0)
|
||||
find_package(ClangFormat 8.0)
|
||||
|
||||
if(ClangFormat_FOUND)
|
||||
add_custom_target(format-src
|
||||
@ -970,12 +927,8 @@ message(STATUS "<<< Compilers and Flags: >>>
|
||||
-- C++ Compiler: ${CMAKE_CXX_COMPILER}
|
||||
Type: ${CMAKE_CXX_COMPILER_ID}
|
||||
Version: ${CMAKE_CXX_COMPILER_VERSION}
|
||||
C++ Standard: ${CMAKE_CXX_STANDARD}
|
||||
C++ Flags: ${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_${BTYPE}}
|
||||
Defines: ${DEFINES}")
|
||||
if(CMAKE_CXX_COMPILER_LAUNCHER)
|
||||
message(STATUS " Launcher: ${CMAKE_CXX_COMPILER_LAUNCHER}")
|
||||
endif()
|
||||
get_target_property(OPTIONS lammps COMPILE_OPTIONS)
|
||||
if(OPTIONS)
|
||||
message(" Options: ${OPTIONS}")
|
||||
@ -994,15 +947,14 @@ if(_index GREATER -1)
|
||||
Type: ${CMAKE_C_COMPILER_ID}
|
||||
Version: ${CMAKE_C_COMPILER_VERSION}
|
||||
C Flags: ${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_${BTYPE}}")
|
||||
if(CMAKE_C_COMPILER_LAUNCHER)
|
||||
message(STATUS " Launcher: ${CMAKE_C_COMPILER_LAUNCHER}")
|
||||
endif()
|
||||
endif()
|
||||
message(STATUS "<<< Linker flags: >>>")
|
||||
message(STATUS "Executable name: ${LAMMPS_BINARY}")
|
||||
get_target_property(OPTIONS lammps LINK_OPTIONS)
|
||||
if(OPTIONS)
|
||||
message(STATUS "Linker options: ${OPTIONS}")
|
||||
if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.13)
|
||||
get_target_property(OPTIONS lammps LINK_OPTIONS)
|
||||
if(OPTIONS)
|
||||
message(STATUS "Linker options: ${OPTIONS}")
|
||||
endif()
|
||||
endif()
|
||||
if(CMAKE_EXE_LINKER_FLAGS)
|
||||
message(STATUS "Executable linker flags: ${CMAKE_EXE_LINKER_FLAGS}")
|
||||
@ -1044,37 +996,34 @@ if(PKG_KOKKOS)
|
||||
endif()
|
||||
endif()
|
||||
if(PKG_KSPACE)
|
||||
if (FFT_USE_HEFFTE)
|
||||
message(STATUS "<<< FFT settings >>>
|
||||
-- Primary FFT lib: heFFTe")
|
||||
if (FFT_HEFFTE_BACKEND)
|
||||
message(STATUS "heFFTe backend: ${FFT_HEFFTE_BACKEND}")
|
||||
else()
|
||||
message(STATUS "heFFTe backend: stock (builtin FFT implementation, tested for corrected but not optimized for production)")
|
||||
endif()
|
||||
message(STATUS "Using distributed FFT algorithms from heFTTe")
|
||||
if(FFT_SINGLE)
|
||||
message(STATUS "Using single precision FFTs")
|
||||
else()
|
||||
message(STATUS "Using double precision FFTs")
|
||||
endif()
|
||||
else()
|
||||
message(STATUS "<<< FFT settings >>>
|
||||
message(STATUS "<<< FFT settings >>>
|
||||
-- Primary FFT lib: ${FFT}")
|
||||
if(FFT_SINGLE)
|
||||
message(STATUS "Using single precision FFTs")
|
||||
else()
|
||||
message(STATUS "Using double precision FFTs")
|
||||
endif()
|
||||
if(FFT_FFTW_THREADS OR FFT_MKL_THREADS)
|
||||
message(STATUS "Using threaded FFTs")
|
||||
else()
|
||||
message(STATUS "Using non-threaded FFTs")
|
||||
endif()
|
||||
message(STATUS "Using builtin distributed FFT algorithms")
|
||||
if(FFT_SINGLE)
|
||||
message(STATUS "Using single precision FFTs")
|
||||
else()
|
||||
message(STATUS "Using double precision FFTs")
|
||||
endif()
|
||||
if(FFT_FFTW_THREADS OR FFT_MKL_THREADS)
|
||||
message(STATUS "Using threaded FFTs")
|
||||
else()
|
||||
message(STATUS "Using non-threaded FFTs")
|
||||
endif()
|
||||
if(PKG_KOKKOS)
|
||||
message(STATUS "Kokkos FFT: ${FFT_KOKKOS}")
|
||||
if(Kokkos_ENABLE_CUDA)
|
||||
if(FFT STREQUAL "KISS")
|
||||
message(STATUS "Kokkos FFT: KISS")
|
||||
else()
|
||||
message(STATUS "Kokkos FFT: cuFFT")
|
||||
endif()
|
||||
elseif(Kokkos_ENABLE_HIP)
|
||||
if(FFT STREQUAL "KISS")
|
||||
message(STATUS "Kokkos FFT: KISS")
|
||||
else()
|
||||
message(STATUS "Kokkos FFT: hipFFT")
|
||||
endif()
|
||||
else()
|
||||
message(STATUS "Kokkos FFT: ${FFT}")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
if(BUILD_DOC)
|
||||
@ -1083,6 +1032,9 @@ endif()
|
||||
if(BUILD_TOOLS)
|
||||
message(STATUS "<<< Building Tools >>>")
|
||||
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)
|
||||
|
||||
@ -1,11 +1,19 @@
|
||||
# use default (or custom) Python executable, if version is sufficient
|
||||
if(Python_VERSION VERSION_GREATER_EQUAL 3.6)
|
||||
set(Python3_EXECUTABLE ${Python_EXECUTABLE})
|
||||
if(CMAKE_VERSION VERSION_LESS 3.12)
|
||||
find_package(PythonInterp 3.5 QUIET) # Deprecated since version 3.12
|
||||
if(PYTHONINTERP_FOUND)
|
||||
set(Python3_EXECUTABLE ${PYTHON_EXECUTABLE})
|
||||
set(Python3_VERSION ${PYTHON_VERSION_STRING})
|
||||
endif()
|
||||
else()
|
||||
# use default (or custom) Python executable, if version is sufficient
|
||||
if(Python_VERSION VERSION_GREATER_EQUAL 3.5)
|
||||
set(Python3_EXECUTABLE ${Python_EXECUTABLE})
|
||||
endif()
|
||||
find_package(Python3 COMPONENTS Interpreter QUIET)
|
||||
endif()
|
||||
find_package(Python3 COMPONENTS Interpreter)
|
||||
|
||||
if(Python3_EXECUTABLE)
|
||||
if(Python3_VERSION VERSION_GREATER_EQUAL 3.6)
|
||||
if(Python3_VERSION VERSION_GREATER_EQUAL 3.5)
|
||||
add_custom_target(
|
||||
check-whitespace
|
||||
${Python3_EXECUTABLE} ${LAMMPS_TOOLS_DIR}/coding_standard/whitespace.py .
|
||||
|
||||
@ -1,3 +1,11 @@
|
||||
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")
|
||||
@ -5,4 +13,4 @@ if(NOT DEFINED ROCM_PATH)
|
||||
set(ROCM_PATH $ENV{ROCM_PATH} CACHE PATH "Path to ROCm installation")
|
||||
endif()
|
||||
endif()
|
||||
list(APPEND CMAKE_PREFIX_PATH ${ROCM_PATH})
|
||||
list(APPEND CMAKE_PREFIX_PATH ${HIP_PATH} ${ROCM_PATH})
|
||||
|
||||
@ -5,18 +5,24 @@ option(BUILD_DOC "Build LAMMPS HTML documentation" OFF)
|
||||
|
||||
if(BUILD_DOC)
|
||||
# Current Sphinx versions require at least Python 3.8
|
||||
# use default (or custom) Python executable, if version is sufficient
|
||||
if(Python_VERSION VERSION_GREATER_EQUAL 3.8)
|
||||
set(Python3_EXECUTABLE ${Python_EXECUTABLE})
|
||||
if(CMAKE_VERSION VERSION_LESS 3.12)
|
||||
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.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(Python3 REQUIRED COMPONENTS Interpreter)
|
||||
if(Python3_VERSION VERSION_LESS 3.8)
|
||||
message(FATAL_ERROR "Python 3.8 and up is required to build the HTML documentation")
|
||||
endif()
|
||||
set(VIRTUALENV ${Python3_EXECUTABLE} -m venv)
|
||||
|
||||
find_package(Doxygen 1.8.10 REQUIRED)
|
||||
file(GLOB DOC_SOURCES CONFIGURE_DEPENDS ${LAMMPS_DOC_DIR}/src/[^.]*.rst)
|
||||
|
||||
file(GLOB DOC_SOURCES ${CONFIGURE_DEPENDS} ${LAMMPS_DOC_DIR}/src/[^.]*.rst)
|
||||
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT docenv
|
||||
@ -74,7 +80,7 @@ if(BUILD_DOC)
|
||||
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 CONFIGURE_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/MathJax-*)
|
||||
file(GLOB MATHJAX_VERSION_DIR ${CONFIGURE_DEPENDS} ${CMAKE_CURRENT_BINARY_DIR}/MathJax-*)
|
||||
execute_process(COMMAND ${CMAKE_COMMAND} -E rename ${MATHJAX_VERSION_DIR} ${DOC_BUILD_STATIC_DIR}/mathjax)
|
||||
endif()
|
||||
|
||||
|
||||
@ -43,5 +43,5 @@ function(ExternalCMakeProject target url hash basedir cmakedir cmakefile)
|
||||
"${CMAKE_BINARY_DIR}/_deps/${target}-src/${cmakedir}/CMakeLists.txt")
|
||||
endif()
|
||||
add_subdirectory("${CMAKE_BINARY_DIR}/_deps/${target}-src/${cmakedir}"
|
||||
"${CMAKE_BINARY_DIR}/_deps/${target}-build" EXCLUDE_FROM_ALL)
|
||||
"${CMAKE_BINARY_DIR}/_deps/${target}-build")
|
||||
endfunction(ExternalCMakeProject)
|
||||
|
||||
@ -1,8 +1,5 @@
|
||||
# Find clang-format
|
||||
find_program(ClangFormat_EXECUTABLE NAMES clang-format
|
||||
clang-format-20.0
|
||||
clang-format-19.0
|
||||
clang-format-18.0
|
||||
clang-format-17.0
|
||||
clang-format-16.0
|
||||
clang-format-15.0
|
||||
|
||||
@ -7,7 +7,15 @@
|
||||
# adapted from https://github.com/cmarshall108/cython-cmake-example/blob/master/cmake/FindCython.cmake
|
||||
#=============================================================================
|
||||
|
||||
find_package(Python 3.6 COMPONENTS Interpreter QUIET)
|
||||
if(CMAKE_VERSION VERSION_LESS 3.12)
|
||||
set(Python_ADDITIONAL_VERSIONS 3.12 3.11 3.10 3.9 3.8 3.7 3.6)
|
||||
find_package(PythonInterp 3.6 QUIET) # Deprecated since version 3.12
|
||||
if(PYTHONINTERP_FOUND)
|
||||
set(Python_EXECUTABLE ${PYTHON_EXECUTABLE})
|
||||
endif()
|
||||
else()
|
||||
find_package(Python 3.6 COMPONENTS Interpreter QUIET)
|
||||
endif()
|
||||
|
||||
# Use the Cython executable that lives next to the Python executable
|
||||
# if it is a local installation.
|
||||
|
||||
@ -28,8 +28,9 @@ if(MSVC)
|
||||
add_compile_options(/Zc:__cplusplus)
|
||||
add_compile_options(/wd4244)
|
||||
add_compile_options(/wd4267)
|
||||
add_compile_options(/wd4250)
|
||||
add_compile_options(/EHsc)
|
||||
if(LAMMPS_EXCEPTIONS)
|
||||
add_compile_options(/EHsc)
|
||||
endif()
|
||||
endif()
|
||||
add_compile_definitions(_CRT_SECURE_NO_WARNINGS)
|
||||
endif()
|
||||
@ -64,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 CONFIGURE_DEPENDS ${path})
|
||||
file(GLOB _dirs ${CONFIGURE_DEPENDS} ${path})
|
||||
set(_besttime 2000-01-01T00:00:00)
|
||||
set(_bestfile "<unknown>")
|
||||
foreach(_dir ${_dirs})
|
||||
|
||||
@ -32,13 +32,7 @@ function(check_omp_h_include)
|
||||
set(CMAKE_REQUIRED_INCLUDES ${OpenMP_CXX_INCLUDE_DIRS})
|
||||
set(CMAKE_REQUIRED_LINK_OPTIONS ${OpenMP_CXX_FLAGS})
|
||||
set(CMAKE_REQUIRED_LIBRARIES ${OpenMP_CXX_LIBRARIES})
|
||||
# there are all kinds of problems with finding omp.h
|
||||
# for Clang and derived compilers so we pretend it is there.
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||
set(_have_omp_h TRUE)
|
||||
else()
|
||||
check_include_file_cxx(omp.h _have_omp_h)
|
||||
endif()
|
||||
check_include_file_cxx(omp.h _have_omp_h)
|
||||
else()
|
||||
set(_have_omp_h FALSE)
|
||||
endif()
|
||||
@ -47,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 CONFIGURE_DEPENDS ${path})
|
||||
file(GLOB _dirs ${CONFIGURE_DEPENDS} ${path})
|
||||
set(_besttime 2000-01-01T00:00:00)
|
||||
set(_bestfile "<unknown>")
|
||||
foreach(_dir ${_dirs})
|
||||
@ -86,20 +80,20 @@ 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 CONFIGURE_DEPENDS ${source_dir}/style_*.h)
|
||||
file(GLOB SRC_AUTOGEN_PACKAGES CONFIGURE_DEPENDS ${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 ${source_dir}/mliap_model_python_couple.h ${source_dir}/mliap_model_python_couple.cpp)
|
||||
list(APPEND SRC_AUTOGEN_FILES ${SRC_AUTOGEN_PACKAGES} ${source_dir}/mliap_model_python_couple.h ${source_dir}/mliap_model_python_couple.cpp)
|
||||
foreach(_SRC ${SRC_AUTOGEN_FILES})
|
||||
get_filename_component(FILENAME "${_SRC}" NAME)
|
||||
if(EXISTS ${source_dir}/${FILENAME})
|
||||
message(FATAL_ERROR "\n########################################################################\n"
|
||||
"Found header file ${source_dir}/${FILENAME} generated by the make-based build system\n"
|
||||
"\n"
|
||||
"Please run\n"
|
||||
"make -C ${source_dir} purge\n"
|
||||
"to remove\n"
|
||||
"########################################################################")
|
||||
"Found header file(s) generated by the make-based build system\n"
|
||||
"\n"
|
||||
"Please run\n"
|
||||
"make -C ${source_dir} purge\n"
|
||||
"to remove\n"
|
||||
"########################################################################")
|
||||
endif()
|
||||
endforeach()
|
||||
endfunction()
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
message(STATUS "Downloading and building OpenCL loader library")
|
||||
set(OPENCL_LOADER_URL "${LAMMPS_THIRDPARTY_URL}/opencl-loader-2024.05.09.tar.gz" CACHE STRING "URL for OpenCL loader tarball")
|
||||
set(OPENCL_LOADER_MD5 "e7796826b21c059224fabe997e0f2075" CACHE STRING "MD5 checksum of OpenCL loader tarball")
|
||||
set(OPENCL_LOADER_URL "${LAMMPS_THIRDPARTY_URL}/opencl-loader-2022.01.04.tar.gz" CACHE STRING "URL for OpenCL loader tarball")
|
||||
set(OPENCL_LOADER_MD5 "8d3a801e87a2c6653bf0e27707063914" CACHE STRING "MD5 checksum of OpenCL loader tarball")
|
||||
mark_as_advanced(OPENCL_LOADER_URL)
|
||||
mark_as_advanced(OPENCL_LOADER_MD5)
|
||||
|
||||
@ -8,3 +8,4 @@ set(INSTALL_LIBOPENCL OFF CACHE BOOL "" FORCE)
|
||||
include(ExternalCMakeProject)
|
||||
ExternalCMakeProject(opencl_loader ${OPENCL_LOADER_URL} ${OPENCL_LOADER_MD5} opencl-loader . "")
|
||||
|
||||
add_library(OpenCL::OpenCL ALIAS OpenCL)
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
set(COLVARS_SOURCE_DIR ${LAMMPS_LIB_SOURCE_DIR}/colvars)
|
||||
|
||||
file(GLOB COLVARS_SOURCES CONFIGURE_DEPENDS ${COLVARS_SOURCE_DIR}/[^.]*.cpp)
|
||||
file(GLOB COLVARS_SOURCES ${CONFIGURE_DEPENDS} ${COLVARS_SOURCE_DIR}/[^.]*.cpp)
|
||||
|
||||
option(COLVARS_DEBUG "Enable debugging messages for Colvars (quite verbose)" OFF)
|
||||
|
||||
@ -24,12 +24,6 @@ target_include_directories(colvars PUBLIC ${LAMMPS_LIB_SOURCE_DIR}/colvars)
|
||||
target_include_directories(colvars PRIVATE ${LAMMPS_SOURCE_DIR})
|
||||
target_link_libraries(lammps PRIVATE colvars)
|
||||
|
||||
if(BUILD_OMP)
|
||||
# Enable OpenMP for Colvars as well
|
||||
target_compile_options(colvars PRIVATE ${OpenMP_CXX_FLAGS})
|
||||
target_link_libraries(colvars PRIVATE OpenMP::OpenMP_CXX)
|
||||
endif()
|
||||
|
||||
if(COLVARS_DEBUG)
|
||||
# Need to export the define publicly to be valid in interface code
|
||||
target_compile_definitions(colvars PUBLIC -DCOLVARS_DEBUG)
|
||||
|
||||
@ -1,9 +0,0 @@
|
||||
# pair style dpd/coul/slater/long may only be installed if also KSPACE is installed
|
||||
if(NOT PKG_KSPACE)
|
||||
get_property(LAMMPS_PAIR_HEADERS GLOBAL PROPERTY PAIR)
|
||||
list(REMOVE_ITEM LAMMPS_PAIR_HEADERS ${LAMMPS_SOURCE_DIR}/DPD-BASIC/pair_dpd_coul_slater_long.h)
|
||||
set_property(GLOBAL PROPERTY PAIR "${LAMMPS_PAIR_HEADERS}")
|
||||
get_target_property(LAMMPS_SOURCES lammps SOURCES)
|
||||
list(REMOVE_ITEM LAMMPS_SOURCES ${LAMMPS_SOURCE_DIR}/DPD-BASIC/pair_dpd_coul_slater_long.cpp)
|
||||
set_property(TARGET lammps PROPERTY SOURCES "${LAMMPS_SOURCES}")
|
||||
endif()
|
||||
@ -1,10 +1,3 @@
|
||||
|
||||
# Silence CMake warnings about FindCUDA being obsolete.
|
||||
# We may need to eventually rewrite this section to use enable_language(CUDA)
|
||||
if(POLICY CMP0146)
|
||||
cmake_policy(SET CMP0146 OLD)
|
||||
endif()
|
||||
|
||||
set(GPU_SOURCES_DIR ${LAMMPS_SOURCE_DIR}/GPU)
|
||||
set(GPU_SOURCES ${GPU_SOURCES_DIR}/gpu_extra.h
|
||||
${GPU_SOURCES_DIR}/fix_gpu.h
|
||||
@ -46,7 +39,7 @@ if (PKG_AMOEBA)
|
||||
${GPU_SOURCES_DIR}/amoeba_convolution_gpu.cpp)
|
||||
endif()
|
||||
|
||||
file(GLOB GPU_LIB_SOURCES CONFIGURE_DEPENDS ${LAMMPS_LIB_SOURCE_DIR}/gpu/[^.]*.cpp)
|
||||
file(GLOB GPU_LIB_SOURCES ${CONFIGURE_DEPENDS} ${LAMMPS_LIB_SOURCE_DIR}/gpu/[^.]*.cpp)
|
||||
file(MAKE_DIRECTORY ${LAMMPS_LIB_BINARY_DIR}/gpu)
|
||||
|
||||
if(GPU_API STREQUAL "CUDA")
|
||||
@ -77,7 +70,7 @@ if(GPU_API STREQUAL "CUDA")
|
||||
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 CONFIGURE_DEPENDS ${LAMMPS_LIB_SOURCE_DIR}/gpu/*_cubin.h)
|
||||
file(GLOB GPU_LIB_OLD_CUBIN_HEADERS ${CONFIGURE_DEPENDS} ${LAMMPS_LIB_SOURCE_DIR}/gpu/*_cubin.h)
|
||||
if(GPU_LIB_OLD_CUBIN_HEADERS)
|
||||
message(FATAL_ERROR "########################################################################\n"
|
||||
"Found file(s) generated by the make-based build system in lib/gpu\n"
|
||||
@ -87,15 +80,15 @@ if(GPU_API STREQUAL "CUDA")
|
||||
"########################################################################")
|
||||
endif()
|
||||
|
||||
file(GLOB GPU_LIB_CU CONFIGURE_DEPENDS ${LAMMPS_LIB_SOURCE_DIR}/gpu/[^.]*.cu ${CMAKE_CURRENT_SOURCE_DIR}/gpu/[^.]*.cu)
|
||||
file(GLOB GPU_LIB_CU ${CONFIGURE_DEPENDS} ${LAMMPS_LIB_SOURCE_DIR}/gpu/[^.]*.cu ${CMAKE_CURRENT_SOURCE_DIR}/gpu/[^.]*.cu)
|
||||
list(REMOVE_ITEM GPU_LIB_CU ${LAMMPS_LIB_SOURCE_DIR}/gpu/lal_pppm.cu)
|
||||
|
||||
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 CONFIGURE_DEPENDS ${LAMMPS_LIB_SOURCE_DIR}/gpu/cudpp_mini/[^.]*.cpp)
|
||||
file(GLOB GPU_LIB_CUDPP_CU CONFIGURE_DEPENDS ${LAMMPS_LIB_SOURCE_DIR}/gpu/cudpp_mini/[^.]*.cu)
|
||||
file(GLOB GPU_LIB_CUDPP_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
|
||||
@ -158,10 +151,10 @@ if(GPU_API STREQUAL "CUDA")
|
||||
endif()
|
||||
|
||||
cuda_compile_fatbin(GPU_GEN_OBJS ${GPU_LIB_CU} OPTIONS ${CUDA_REQUEST_PIC}
|
||||
-DUNIX -O3 --use_fast_math -Wno-deprecated-gpu-targets -allow-unsupported-compiler -DNV_KERNEL -DUCL_CUDADR ${GPU_CUDA_GENCODE} -D_${GPU_PREC_SETTING} -DLAMMPS_${LAMMPS_SIZES})
|
||||
-DUNIX -O3 --use_fast_math -Wno-deprecated-gpu-targets -DNV_KERNEL -DUCL_CUDADR ${GPU_CUDA_GENCODE} -D_${GPU_PREC_SETTING} -DLAMMPS_${LAMMPS_SIZES})
|
||||
|
||||
cuda_compile(GPU_OBJS ${GPU_LIB_CUDPP_CU} OPTIONS ${CUDA_REQUEST_PIC}
|
||||
-DUNIX -O3 --use_fast_math -Wno-deprecated-gpu-targets -allow-unsupported-compiler -DUCL_CUDADR ${GPU_CUDA_GENCODE} -D_${GPU_PREC_SETTING} -DLAMMPS_${LAMMPS_SIZES})
|
||||
-DUNIX -O3 --use_fast_math -Wno-deprecated-gpu-targets -DUCL_CUDADR ${GPU_CUDA_GENCODE} -D_${GPU_PREC_SETTING} -DLAMMPS_${LAMMPS_SIZES})
|
||||
|
||||
foreach(CU_OBJ ${GPU_GEN_OBJS})
|
||||
get_filename_component(CU_NAME ${CU_OBJ} NAME_WE)
|
||||
@ -212,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 CONFIGURE_DEPENDS ${LAMMPS_LIB_SOURCE_DIR}/gpu/[^.]*.cu)
|
||||
file(GLOB GPU_LIB_CU ${CONFIGURE_DEPENDS} ${LAMMPS_LIB_SOURCE_DIR}/gpu/[^.]*.cu)
|
||||
list(REMOVE_ITEM GPU_LIB_CU
|
||||
${LAMMPS_LIB_SOURCE_DIR}/gpu/lal_gayberne.cu
|
||||
${LAMMPS_LIB_SOURCE_DIR}/gpu/lal_gayberne_lj.cu
|
||||
@ -342,7 +335,7 @@ elseif(GPU_API STREQUAL "HIP")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
file(GLOB GPU_LIB_CU CONFIGURE_DEPENDS ${LAMMPS_LIB_SOURCE_DIR}/gpu/[^.]*.cu ${CMAKE_CURRENT_SOURCE_DIR}/gpu/[^.]*.cu)
|
||||
file(GLOB GPU_LIB_CU ${CONFIGURE_DEPENDS} ${LAMMPS_LIB_SOURCE_DIR}/gpu/[^.]*.cu ${CMAKE_CURRENT_SOURCE_DIR}/gpu/[^.]*.cu)
|
||||
list(REMOVE_ITEM GPU_LIB_CU ${LAMMPS_LIB_SOURCE_DIR}/gpu/lal_pppm.cu)
|
||||
|
||||
set(GPU_LIB_CU_HIP "")
|
||||
|
||||
@ -111,9 +111,6 @@ if(PKG_KSPACE)
|
||||
list(APPEND INTEL_SOURCES ${INTEL_SOURCES_DIR}/verlet_lrt_intel.cpp)
|
||||
RegisterIntegrateStyle(${INTEL_SOURCES_DIR}/verlet_lrt_intel.h)
|
||||
endif()
|
||||
if(PKG_ML-SNAP)
|
||||
list(APPEND INTEL_SOURCES ${INTEL_SOURCES_DIR}/sna_intel.cpp)
|
||||
endif()
|
||||
|
||||
target_sources(lammps PRIVATE ${INTEL_SOURCES})
|
||||
target_include_directories(lammps PRIVATE ${INTEL_SOURCES_DIR})
|
||||
|
||||
@ -1,7 +1,12 @@
|
||||
set(KIM-API_MIN_VERSION 2.1.3)
|
||||
find_package(CURL)
|
||||
if(CURL_FOUND)
|
||||
target_link_libraries(lammps PRIVATE CURL::libcurl)
|
||||
if(CMAKE_VERSION VERSION_LESS 3.12)
|
||||
target_include_directories(lammps PRIVATE ${CURL_INCLUDE_DIRS})
|
||||
target_link_libraries(lammps PRIVATE ${CURL_LIBRARIES})
|
||||
else()
|
||||
target_link_libraries(lammps PRIVATE CURL::libcurl)
|
||||
endif()
|
||||
target_compile_definitions(lammps PRIVATE -DLMP_KIM_CURL)
|
||||
set(LMP_DEBUG_CURL OFF CACHE STRING "Set libcurl verbose mode on/off. If on, it displays a lot of verbose information about its operations.")
|
||||
mark_as_advanced(LMP_DEBUG_CURL)
|
||||
|
||||
@ -1,8 +1,7 @@
|
||||
########################################################################
|
||||
# As of version 4.0.0 Kokkos requires C++17
|
||||
if(CMAKE_CXX_STANDARD LESS 17)
|
||||
message(FATAL_ERROR "The KOKKOS package requires the C++ standard to
|
||||
be set to at least C++17")
|
||||
# As of version 3.3.0 Kokkos requires C++14
|
||||
if(CMAKE_CXX_STANDARD LESS 14)
|
||||
message(FATAL_ERROR "The KOKKOS package requires the C++ standard to be set to at least C++14")
|
||||
endif()
|
||||
|
||||
########################################################################
|
||||
@ -16,6 +15,11 @@ endif()
|
||||
if(Kokkos_ENABLE_OPENMP)
|
||||
if(NOT BUILD_OMP)
|
||||
message(FATAL_ERROR "Must enable BUILD_OMP with Kokkos_ENABLE_OPENMP")
|
||||
else()
|
||||
# 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()
|
||||
endif()
|
||||
########################################################################
|
||||
@ -45,8 +49,8 @@ if(DOWNLOAD_KOKKOS)
|
||||
list(APPEND KOKKOS_LIB_BUILD_ARGS "-DCMAKE_CXX_EXTENSIONS=${CMAKE_CXX_EXTENSIONS}")
|
||||
list(APPEND KOKKOS_LIB_BUILD_ARGS "-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}")
|
||||
include(ExternalProject)
|
||||
set(KOKKOS_URL "https://github.com/kokkos/kokkos/archive/4.3.01.tar.gz" CACHE STRING "URL for KOKKOS tarball")
|
||||
set(KOKKOS_MD5 "243de871b3dc2cf3990c1c404032df83" 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)
|
||||
@ -71,7 +75,7 @@ if(DOWNLOAD_KOKKOS)
|
||||
add_dependencies(LAMMPS::KOKKOSCORE kokkos_build)
|
||||
add_dependencies(LAMMPS::KOKKOSCONTAINERS kokkos_build)
|
||||
elseif(EXTERNAL_KOKKOS)
|
||||
find_package(Kokkos 4.3.01 REQUIRED CONFIG)
|
||||
find_package(Kokkos 3.7.02 REQUIRED CONFIG)
|
||||
target_link_libraries(lammps PRIVATE Kokkos::kokkos)
|
||||
else()
|
||||
set(LAMMPS_LIB_KOKKOS_SRC_DIR ${LAMMPS_LIB_SOURCE_DIR}/kokkos)
|
||||
@ -103,8 +107,7 @@ set(KOKKOS_PKG_SOURCES ${KOKKOS_PKG_SOURCES_DIR}/kokkos.cpp
|
||||
${KOKKOS_PKG_SOURCES_DIR}/atom_kokkos.cpp
|
||||
${KOKKOS_PKG_SOURCES_DIR}/atom_map_kokkos.cpp
|
||||
${KOKKOS_PKG_SOURCES_DIR}/atom_vec_kokkos.cpp
|
||||
${KOKKOS_PKG_SOURCES_DIR}/comm_brick_kokkos.cpp
|
||||
${KOKKOS_PKG_SOURCES_DIR}/comm_brick_direct_kokkos.cpp
|
||||
${KOKKOS_PKG_SOURCES_DIR}/comm_kokkos.cpp
|
||||
${KOKKOS_PKG_SOURCES_DIR}/comm_tiled_kokkos.cpp
|
||||
${KOKKOS_PKG_SOURCES_DIR}/min_kokkos.cpp
|
||||
${KOKKOS_PKG_SOURCES_DIR}/min_linesearch_kokkos.cpp
|
||||
@ -127,33 +130,16 @@ if(PKG_KSPACE)
|
||||
list(APPEND KOKKOS_PKG_SOURCES ${KOKKOS_PKG_SOURCES_DIR}/fft3d_kokkos.cpp
|
||||
${KOKKOS_PKG_SOURCES_DIR}/grid3d_kokkos.cpp
|
||||
${KOKKOS_PKG_SOURCES_DIR}/remap_kokkos.cpp)
|
||||
set(FFT_KOKKOS "KISS" CACHE STRING "FFT library for Kokkos-enabled KSPACE package")
|
||||
set(FFT_KOKKOS_VALUES KISS FFTW3 MKL HIPFFT CUFFT)
|
||||
set_property(CACHE FFT_KOKKOS PROPERTY STRINGS ${FFT_KOKKOS_VALUES})
|
||||
validate_option(FFT_KOKKOS FFT_KOKKOS_VALUES)
|
||||
string(TOUPPER ${FFT_KOKKOS} FFT_KOKKOS)
|
||||
|
||||
if(Kokkos_ENABLE_CUDA)
|
||||
if(NOT ((FFT_KOKKOS STREQUAL "KISS") OR (FFT_KOKKOS STREQUAL "CUFFT")))
|
||||
message(FATAL_ERROR "The CUDA backend of Kokkos requires either KISS FFT or CUFFT.")
|
||||
elseif(FFT_KOKKOS STREQUAL "KISS")
|
||||
message(WARNING "Using KISS FFT with the CUDA backend of Kokkos may be sub-optimal.")
|
||||
target_compile_definitions(lammps PRIVATE -DFFT_KOKKOS_KISS)
|
||||
elseif(FFT_KOKKOS STREQUAL "CUFFT")
|
||||
find_package(CUDAToolkit REQUIRED)
|
||||
target_compile_definitions(lammps PRIVATE -DFFT_KOKKOS_CUFFT)
|
||||
target_link_libraries(lammps PRIVATE CUDA::cufft)
|
||||
if(NOT (FFT STREQUAL "KISS"))
|
||||
target_compile_definitions(lammps PRIVATE -DFFT_CUFFT)
|
||||
target_link_libraries(lammps PRIVATE cufft)
|
||||
endif()
|
||||
elseif(Kokkos_ENABLE_HIP)
|
||||
if(NOT ((FFT_KOKKOS STREQUAL "KISS") OR (FFT_KOKKOS STREQUAL "HIPFFT")))
|
||||
message(FATAL_ERROR "The HIP backend of Kokkos requires either KISS FFT or HIPFFT.")
|
||||
elseif(FFT_KOKKOS STREQUAL "KISS")
|
||||
message(WARNING "Using KISS FFT with the HIP backend of Kokkos may be sub-optimal.")
|
||||
target_compile_definitions(lammps PRIVATE -DFFT_KOKKOS_KISS)
|
||||
elseif(FFT_KOKKOS STREQUAL "HIPFFT")
|
||||
if(NOT (FFT STREQUAL "KISS"))
|
||||
include(DetectHIPInstallation)
|
||||
find_package(hipfft REQUIRED)
|
||||
target_compile_definitions(lammps PRIVATE -DFFT_KOKKOS_HIPFFT)
|
||||
target_compile_definitions(lammps PRIVATE -DFFT_HIPFFT)
|
||||
target_link_libraries(lammps PRIVATE hip::hipfft)
|
||||
endif()
|
||||
endif()
|
||||
@ -169,7 +155,7 @@ if(PKG_ML-IAP)
|
||||
|
||||
# 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 CONFIGURE_DEPENDS ${LAMMPS_SOURCE_DIR}/KOKKOS/*.pyx)
|
||||
file(GLOB MLIAP_KOKKOS_CYTHON_SRC ${CONFIGURE_DEPENDS} ${LAMMPS_SOURCE_DIR}/KOKKOS/*.pyx)
|
||||
foreach(MLIAP_CYTHON_FILE ${MLIAP_KOKKOS_CYTHON_SRC})
|
||||
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
|
||||
|
||||
@ -46,61 +46,6 @@ else()
|
||||
target_compile_definitions(lammps PRIVATE -DFFT_KISS)
|
||||
endif()
|
||||
|
||||
option(FFT_USE_HEFFTE "Use heFFTe as the distributed FFT engine, overrides the FFT option." OFF)
|
||||
if(FFT_USE_HEFFTE)
|
||||
# if FFT_HEFFTE is enabled, use the heFFTe parallel engine instead of the builtin fftMPI engine
|
||||
|
||||
# map standard FFT choices to available heFFTe backends: FFTW3 -> FFTW, KISS -> BUILTIN
|
||||
set(FFT_HEFFTE_BACKEND_VALUES FFTW MKL BUILTIN)
|
||||
string(REPLACE FFTW3 FFTW FFT_HEFFTE_BACKEND_DEFAULT ${FFT})
|
||||
string(REPLACE KISS BUILTIN FFT_HEFFTE_BACKEND_DEFAULT ${FFT_HEFFTE_BACKEND_DEFAULT})
|
||||
set(FFT_HEFFTE_BACKEND "${FFT_HEFFTE_BACKEND_DEFAULT}" CACHE STRING "Select heFFTe backend, e.g., FFTW or MKL")
|
||||
set_property(CACHE FFT_HEFFTE_BACKEND PROPERTY STRINGS ${FFT_HEFFTE_BACKEND_VALUES})
|
||||
validate_option(FFT_HEFFTE_BACKEND FFT_HEFFTE_BACKEND_VALUES)
|
||||
|
||||
if(FFT_HEFFTE_BACKEND STREQUAL "FFTW") # respect the backend choice, FFTW or MKL
|
||||
set(HEFFTE_COMPONENTS "FFTW")
|
||||
set(Heffte_ENABLE_FFTW "ON" CACHE BOOL "Enables FFTW backend for heFFTe")
|
||||
elseif(FFT_HEFFTE_BACKEND STREQUAL "MKL")
|
||||
set(HEFFTE_COMPONENTS "MKL")
|
||||
set(Heffte_ENABLE_MKL "ON" CACHE BOOL "Enables MKL backend for heFFTe")
|
||||
else()
|
||||
set(HEFFTE_COMPONENTS "BUILTIN")
|
||||
message(WARNING "FFT_HEFFTE_BACKEND not selected, defaulting to the builtin 'stock' backend, which is intended for testing and is not optimized for production runs")
|
||||
endif()
|
||||
|
||||
find_package(Heffte 2.4.0 QUIET COMPONENTS ${HEFFTE_COMPONENTS})
|
||||
if (NOT Heffte_FOUND) # download and build
|
||||
if(BUILD_SHARED_LIBS)
|
||||
set(BUILD_SHARED_LIBS_WAS_ON YES)
|
||||
set(BUILD_SHARED_LIBS OFF)
|
||||
endif()
|
||||
if(CMAKE_REQUEST_PIC)
|
||||
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
||||
endif()
|
||||
set(Heffte_ENABLE_${FFT_HEFFTE_BACKEND} ON)
|
||||
include(FetchContent)
|
||||
FetchContent_Declare(HEFFTE_PROJECT # using v2.4.0
|
||||
URL "https://github.com/icl-utk-edu/heffte/archive/refs/tags/v2.4.0.tar.gz"
|
||||
URL_HASH SHA256=02310fb4f9688df02f7181667e61c3adb7e38baf79611d80919d47452ff7881d
|
||||
)
|
||||
FetchContent_Populate(HEFFTE_PROJECT)
|
||||
|
||||
# fixup git hash to show "(unknown)" to avoid compilation failures.
|
||||
file(READ ${heffte_project_SOURCE_DIR}/include/heffte_config.cmake.h HEFFTE_CFG_FILE_TEXT)
|
||||
string(REPLACE "@Heffte_GIT_HASH@" "(unknown)" HEFFTE_CFG_FILE_TEXT "${HEFFTE_CFG_FILE_TEXT}")
|
||||
file(WRITE ${heffte_project_SOURCE_DIR}/include/heffte_config.cmake.h "${HEFFTE_CFG_FILE_TEXT}")
|
||||
|
||||
add_subdirectory(${heffte_project_SOURCE_DIR} ${heffte_project_BINARY_DIR} EXCLUDE_FROM_ALL)
|
||||
add_library(Heffte::Heffte ALIAS Heffte)
|
||||
if(BUILD_SHARED_LIBS_WAS_ON)
|
||||
set(BUILD_SHARED_LIBS ON)
|
||||
endif()
|
||||
endif()
|
||||
target_compile_definitions(lammps PRIVATE -DFFT_HEFFTE "-DFFT_HEFFTE_${FFT_HEFFTE_BACKEND}")
|
||||
target_link_libraries(lammps PRIVATE Heffte::Heffte)
|
||||
endif()
|
||||
|
||||
set(FFT_PACK "array" CACHE STRING "Optimization for FFT")
|
||||
set(FFT_PACK_VALUES array pointer memcpy)
|
||||
set_property(CACHE FFT_PACK PROPERTY STRINGS ${FFT_PACK_VALUES})
|
||||
|
||||
@ -4,7 +4,7 @@ if(LEPTON_SOURCE_DIR)
|
||||
endif()
|
||||
set(LEPTON_SOURCE_DIR ${LAMMPS_LIB_SOURCE_DIR}/lepton)
|
||||
|
||||
file(GLOB LEPTON_SOURCES CONFIGURE_DEPENDS ${LEPTON_SOURCE_DIR}/src/[^.]*.cpp)
|
||||
file(GLOB LEPTON_SOURCES ${CONFIGURE_DEPENDS} ${LEPTON_SOURCE_DIR}/src/[^.]*.cpp)
|
||||
|
||||
if((CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "amd64") OR
|
||||
(CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "AMD64") OR
|
||||
@ -15,7 +15,7 @@ else()
|
||||
endif()
|
||||
|
||||
if(LEPTON_ENABLE_JIT)
|
||||
file(GLOB ASMJIT_SOURCES CONFIGURE_DEPENDS ${LEPTON_SOURCE_DIR}/asmjit/*/[^.]*.cpp)
|
||||
file(GLOB ASMJIT_SOURCES ${CONFIGURE_DEPENDS} ${LEPTON_SOURCE_DIR}/asmjit/*/[^.]*.cpp)
|
||||
endif()
|
||||
|
||||
add_library(lepton STATIC ${LEPTON_SOURCES} ${ASMJIT_SOURCES})
|
||||
|
||||
@ -8,8 +8,8 @@ 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.26.tar.gz" CACHE STRING "URL for MDI tarball")
|
||||
set(MDI_MD5 "3124bb85259471e2a53a891f04bf697a" 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)
|
||||
@ -26,9 +26,29 @@ if(DOWNLOAD_MDI)
|
||||
|
||||
# detect if we have python development support and thus can enable python plugins
|
||||
set(MDI_USE_PYTHON_PLUGINS OFF)
|
||||
find_package(Python QUIET COMPONENTS Development)
|
||||
if(Python_Development_FOUND)
|
||||
set(MDI_USE_PYTHON_PLUGINS ON)
|
||||
if(CMAKE_VERSION VERSION_LESS 3.12)
|
||||
if(NOT PYTHON_VERSION_STRING)
|
||||
set(Python_ADDITIONAL_VERSIONS 3.12 3.11 3.10 3.9 3.8 3.7 3.6)
|
||||
# search for interpreter first, so we have a consistent library
|
||||
find_package(PythonInterp) # Deprecated since version 3.12
|
||||
if(PYTHONINTERP_FOUND)
|
||||
set(Python_EXECUTABLE ${PYTHON_EXECUTABLE})
|
||||
endif()
|
||||
endif()
|
||||
# search for the library matching the selected interpreter
|
||||
set(Python_ADDITIONAL_VERSIONS ${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR})
|
||||
find_package(PythonLibs QUIET) # Deprecated since version 3.12
|
||||
if(PYTHONLIBS_FOUND)
|
||||
if(NOT (PYTHON_VERSION_STRING STREQUAL PYTHONLIBS_VERSION_STRING))
|
||||
message(FATAL_ERROR "Python Library version ${PYTHONLIBS_VERSION_STRING} does not match Interpreter version ${PYTHON_VERSION_STRING}")
|
||||
endif()
|
||||
set(MDI_USE_PYTHON_PLUGINS ON)
|
||||
endif()
|
||||
else()
|
||||
find_package(Python QUIET COMPONENTS Development)
|
||||
if(Python_Development_FOUND)
|
||||
set(MDI_USE_PYTHON_PLUGINS ON)
|
||||
endif()
|
||||
endif()
|
||||
# python plugins are not supported and thus must be always off on Windows
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
||||
@ -82,9 +102,13 @@ if(DOWNLOAD_MDI)
|
||||
# if compiling with python plugins we need
|
||||
# to add python libraries as dependency.
|
||||
if(MDI_USE_PYTHON_PLUGINS)
|
||||
list(APPEND MDI_DEP_LIBS Python::Python)
|
||||
endif()
|
||||
if(CMAKE_VERSION VERSION_LESS 3.12)
|
||||
list(APPEND MDI_DEP_LIBS ${PYTHON_LIBRARIES})
|
||||
else()
|
||||
list(APPEND MDI_DEP_LIBS Python::Python)
|
||||
endif()
|
||||
|
||||
endif()
|
||||
# need to add support for dlopen/dlsym, except when compiling for Windows.
|
||||
if(NOT (CMAKE_SYSTEM_NAME STREQUAL "Windows"))
|
||||
list(APPEND MDI_DEP_LIBS "${CMAKE_DL_LIBS}")
|
||||
|
||||
@ -2,7 +2,12 @@
|
||||
set(MLIAP_ENABLE_PYTHON_DEFAULT OFF)
|
||||
if(PKG_PYTHON)
|
||||
find_package(Cythonize QUIET)
|
||||
find_package(Python COMPONENTS NumPy QUIET)
|
||||
if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.14)
|
||||
find_package(Python COMPONENTS NumPy QUIET)
|
||||
else()
|
||||
# assume we have NumPy
|
||||
set(Python_NumPy_FOUND ON)
|
||||
endif()
|
||||
if(Cythonize_FOUND AND Python_NumPy_FOUND)
|
||||
set(MLIAP_ENABLE_PYTHON_DEFAULT ON)
|
||||
endif()
|
||||
@ -10,26 +15,26 @@ endif()
|
||||
|
||||
option(MLIAP_ENABLE_PYTHON "Build ML-IAP package with Python support" ${MLIAP_ENABLE_PYTHON_DEFAULT})
|
||||
|
||||
# if ML-PACE package *and* MLIAP with Python is enabled is included we may also include ML-PACE support in ML-IAP
|
||||
set(MLIAP_ENABLE_ACE_DEFAULT OFF)
|
||||
if(PKG_ML-PACE)
|
||||
set(MLIAP_ENABLE_ACE_DEFAULT ON)
|
||||
endif()
|
||||
|
||||
option(MLIAP_ENABLE_ACE "Build ML-IAP package with ACE support" ${MLIAP_ENABLE_ACE_DEFAULT})
|
||||
|
||||
if(MLIAP_ENABLE_PYTHON)
|
||||
find_package(Cythonize REQUIRED)
|
||||
find_package(Python COMPONENTS NumPy REQUIRED)
|
||||
if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.14)
|
||||
find_package(Python COMPONENTS NumPy REQUIRED)
|
||||
endif()
|
||||
if(NOT PKG_PYTHON)
|
||||
message(FATAL_ERROR "Must enable PYTHON package for including Python support in ML-IAP")
|
||||
endif()
|
||||
if(Python_VERSION VERSION_LESS 3.6)
|
||||
message(FATAL_ERROR "Python support in ML-IAP requires Python 3.6 or later")
|
||||
if(CMAKE_VERSION VERSION_LESS 3.12)
|
||||
if(PYTHONLIBS_VERSION_STRING VERSION_LESS 3.6)
|
||||
message(FATAL_ERROR "Python support in ML-IAP requires Python 3.6 or later")
|
||||
endif()
|
||||
else()
|
||||
if(Python_VERSION VERSION_LESS 3.6)
|
||||
message(FATAL_ERROR "Python support in ML-IAP requires Python 3.6 or later")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(MLIAP_BINARY_DIR ${CMAKE_BINARY_DIR}/cython)
|
||||
file(GLOB MLIAP_CYTHON_SRC CONFIGURE_DEPENDS ${LAMMPS_SOURCE_DIR}/ML-IAP/*.pyx)
|
||||
file(GLOB MLIAP_CYTHON_SRC ${CONFIGURE_DEPENDS} ${LAMMPS_SOURCE_DIR}/ML-IAP/*.pyx)
|
||||
file(MAKE_DIRECTORY ${MLIAP_BINARY_DIR})
|
||||
foreach(MLIAP_CYTHON_FILE ${MLIAP_CYTHON_SRC})
|
||||
get_filename_component(MLIAP_CYTHON_BASE ${MLIAP_CYTHON_FILE} NAME_WE)
|
||||
@ -44,10 +49,3 @@ if(MLIAP_ENABLE_PYTHON)
|
||||
target_compile_definitions(lammps PRIVATE -DMLIAP_PYTHON)
|
||||
target_include_directories(lammps PRIVATE ${MLIAP_BINARY_DIR})
|
||||
endif()
|
||||
|
||||
if(MLIAP_ENABLE_ACE)
|
||||
if(NOT PKG_ML-PACE)
|
||||
message(FATAL_ERROR "Must enable ML-PACE package for including ACE support in ML-IAP")
|
||||
endif()
|
||||
target_compile_definitions(lammps PRIVATE -DMLIAP_ACE)
|
||||
endif()
|
||||
|
||||
@ -1,46 +1,33 @@
|
||||
# PACE library support for ML-PACE package
|
||||
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 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()
|
||||
|
||||
set(PACELIB_URL "https://github.com/ICAMS/lammps-user-pace/archive/refs/tags/v.2023.11.25.fix.tar.gz" CACHE STRING "URL for PACE evaluator library sources")
|
||||
set(PACELIB_MD5 "b45de9a633f42ed65422567e3ce56f9f" 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)
|
||||
|
||||
# LOCAL_ML-PACE points to top-level dir with local lammps-user-pace repo,
|
||||
# to make it easier to check local build without going through the public github releases
|
||||
if(LOCAL_ML-PACE)
|
||||
set(lib-pace "${LOCAL_ML-PACE}")
|
||||
else()
|
||||
# download library sources to build folder
|
||||
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(
|
||||
COMMAND ${CMAKE_COMMAND} -E remove_directory lammps-user-pace*
|
||||
COMMAND ${CMAKE_COMMAND} -E tar xzf libpace.tar.gz
|
||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
||||
)
|
||||
get_newest_file(${CMAKE_BINARY_DIR}/lammps-user-pace-* lib-pace)
|
||||
# download library sources to build folder
|
||||
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(
|
||||
COMMAND ${CMAKE_COMMAND} -E remove_directory lammps-user-pace*
|
||||
COMMAND ${CMAKE_COMMAND} -E tar xzf libpace.tar.gz
|
||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
||||
)
|
||||
get_newest_file(${CMAKE_BINARY_DIR}/lammps-user-pace-* lib-pace)
|
||||
|
||||
add_subdirectory(${lib-pace} build-pace)
|
||||
set_target_properties(pace PROPERTIES CXX_EXTENSIONS ON OUTPUT_NAME lammps_pace${LAMMPS_MACHINE})
|
||||
|
||||
@ -18,16 +18,14 @@ if(DOWNLOAD_QUIP)
|
||||
set(temp "${temp}F77FLAGS += -fpp -fixed -fPIC\n")
|
||||
set(temp "${temp}F95_PRE_FILENAME_FLAG = -Tf\n")
|
||||
elseif(CMAKE_Fortran_COMPILER_ID STREQUAL GNU)
|
||||
# quip library uses GNU fortran extensions. If any more restrictive standards are set, reset them
|
||||
string(REGEX REPLACE -std=f[0-9]+ -std=gnu _fopt "${CMAKE_Fortran_FLAGS_${BTYPE}}")
|
||||
set(temp "${temp}FPP=${CMAKE_Fortran_COMPILER} -E -x f95-cpp-input\nOPTIM=${_fopt} -fmax-stack-var-size=6553600\n")
|
||||
set(temp "${temp}FPP=${CMAKE_Fortran_COMPILER} -E -x f95-cpp-input\nOPTIM=${CMAKE_Fortran_FLAGS_${BTYPE}}\n")
|
||||
set(temp "${temp}DEFINES += -DGETARG_F2003 -DGETENV_F2003 -DGFORTRAN -DFORTRAN_UNDERSCORE\n")
|
||||
set(temp "${temp}F95FLAGS += -x f95-cpp-input -ffree-line-length-none -ffree-form -fno-second-underscore -fPIC\n")
|
||||
set(temp "${temp}F77FLAGS += -x f77-cpp-input -fno-second-underscore -fPIC\n")
|
||||
else()
|
||||
message(FATAL_ERROR "The ${CMAKE_Fortran_COMPILER_ID} Fortran compiler is not (yet) supported for building QUIP")
|
||||
endif()
|
||||
set(temp "${temp}CFLAGS += -fPIC -Wno-return-mismatch \nCPLUSPLUSFLAGS += -fPIC -Wno-return-mismatch\nAR_ADD=src\n")
|
||||
set(temp "${temp}CFLAGS += -fPIC \nCPLUSPLUSFLAGS += -fPIC\nAR_ADD=src\n")
|
||||
set(temp "${temp}MATH_LINKOPTS=")
|
||||
foreach(flag ${BLAS_LIBRARIES})
|
||||
set(temp "${temp} ${flag}")
|
||||
@ -58,7 +56,7 @@ if(DOWNLOAD_QUIP)
|
||||
GIT_SUBMODULES "src/fox;src/GAP"
|
||||
PATCH_COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_BINARY_DIR}/quip.config <SOURCE_DIR>/arch/Makefile.lammps
|
||||
CONFIGURE_COMMAND env QUIP_ARCH=lammps make config
|
||||
BUILD_COMMAND env QUIP_ARCH=lammps make -j1 libquip
|
||||
BUILD_COMMAND env QUIP_ARCH=lammps make libquip
|
||||
INSTALL_COMMAND ""
|
||||
BUILD_IN_SOURCE YES
|
||||
BUILD_BYPRODUCTS <SOURCE_DIR>/build/lammps/${CMAKE_STATIC_LIBRARY_PREFIX}quip${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
|
||||
28
cmake/Modules/Packages/MSCG.cmake
Normal file
28
cmake/Modules/Packages/MSCG.cmake
Normal file
@ -0,0 +1,28 @@
|
||||
find_package(GSL REQUIRED)
|
||||
find_package(MSCG QUIET)
|
||||
if(MSGC_FOUND)
|
||||
set(DOWNLOAD_MSCG_DEFAULT OFF)
|
||||
else()
|
||||
set(DOWNLOAD_MSCG_DEFAULT ON)
|
||||
endif()
|
||||
option(DOWNLOAD_MSCG "Download MSCG library instead of using an already installed one)" ${DOWNLOAD_MSCG_DEFAULT})
|
||||
if(DOWNLOAD_MSCG)
|
||||
set(MSCG_URL "https://github.com/uchicago-voth/MSCG-release/archive/491270a73539e3f6951e76f7dbe84e258b3ebb45.tar.gz" CACHE STRING "URL for MSCG tarball")
|
||||
set(MSCG_MD5 "7ea50748fba5c3a372e0266bd31d2f11" CACHE STRING "MD5 checksum of MSCG tarball")
|
||||
mark_as_advanced(MSCG_URL)
|
||||
mark_as_advanced(MSCG_MD5)
|
||||
|
||||
include(ExternalCMakeProject)
|
||||
ExternalCMakeProject(mscg ${MSCG_URL} ${MSCG_MD5} MSCG-release src/CMake "")
|
||||
|
||||
# set include and link library
|
||||
target_include_directories(lammps PRIVATE "${CMAKE_BINARY_DIR}/_deps/mscg-src/src")
|
||||
target_link_libraries(lammps PRIVATE mscg)
|
||||
else()
|
||||
find_package(MSCG)
|
||||
if(NOT MSCG_FOUND)
|
||||
message(FATAL_ERROR "MSCG not found, help CMake to find it by setting MSCG_LIBRARY and MSCG_INCLUDE_DIR, or set DOWNLOAD_MSCG=ON to download it")
|
||||
endif()
|
||||
target_link_libraries(lammps PRIVATE MSCG::MSCG)
|
||||
endif()
|
||||
target_link_libraries(lammps PRIVATE GSL::gsl ${LAPACK_LIBRARIES})
|
||||
@ -1,14 +1,5 @@
|
||||
# Plumed2 support for PLUMED package
|
||||
|
||||
# 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()
|
||||
|
||||
# for supporting multiple concurrent plumed2 installations for debugging and testing
|
||||
set(PLUMED_SUFFIX "" CACHE STRING "Suffix for Plumed2 library")
|
||||
mark_as_advanced(PLUMED_SUFFIX)
|
||||
|
||||
if(BUILD_MPI)
|
||||
set(PLUMED_CONFIG_MPI "--enable-mpi")
|
||||
set(PLUMED_CONFIG_CC ${CMAKE_MPI_C_COMPILER})
|
||||
@ -30,11 +21,9 @@ else()
|
||||
set(PLUMED_CONFIG_OMP "--disable-openmp")
|
||||
endif()
|
||||
|
||||
# Note: must also adjust check for supported API versions in
|
||||
# fix_plumed.cpp when version changes from v2.n.x to v2.n+1.y
|
||||
set(PLUMED_URL "https://github.com/plumed/plumed2/releases/download/v2.9.1/plumed-src-2.9.1.tgz"
|
||||
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 "c3b2d31479c1e9ce211719d40e9efbd7" CACHE STRING "MD5 checksum of PLUMED tarball")
|
||||
set(PLUMED_MD5 "599092b6a0aa6fff992612537ad98994" CACHE STRING "MD5 checksum of PLUMED tarball")
|
||||
|
||||
mark_as_advanced(PLUMED_URL)
|
||||
mark_as_advanced(PLUMED_MD5)
|
||||
@ -86,9 +75,6 @@ if((CMAKE_SYSTEM_NAME STREQUAL "Windows") AND (CMAKE_CROSSCOMPILING))
|
||||
DEPENDS plumed_build
|
||||
COMMENT "Copying Plumed files"
|
||||
)
|
||||
if(CMAKE_PROJECT_NAME STREQUAL "lammps")
|
||||
target_link_libraries(lammps INTERFACE LAMMPS::PLUMED)
|
||||
endif()
|
||||
|
||||
else()
|
||||
|
||||
@ -163,26 +149,21 @@ else()
|
||||
endif()
|
||||
set_target_properties(LAMMPS::PLUMED PROPERTIES INTERFACE_INCLUDE_DIRECTORIES ${INSTALL_DIR}/include)
|
||||
file(MAKE_DIRECTORY ${INSTALL_DIR}/include)
|
||||
if(CMAKE_PROJECT_NAME STREQUAL "lammps")
|
||||
target_link_libraries(lammps PRIVATE LAMMPS::PLUMED)
|
||||
endif()
|
||||
else()
|
||||
find_package(PkgConfig REQUIRED)
|
||||
pkg_check_modules(PLUMED REQUIRED plumed${PLUMED_SUFFIX})
|
||||
pkg_check_modules(PLUMED REQUIRED plumed)
|
||||
add_library(LAMMPS::PLUMED INTERFACE IMPORTED)
|
||||
if(PLUMED_MODE STREQUAL "STATIC")
|
||||
include(${PLUMED_LIBDIR}/plumed${PLUMED_SUFFIX}/src/lib/Plumed.cmake.static)
|
||||
include(${PLUMED_LIBDIR}/plumed/src/lib/Plumed.cmake.static)
|
||||
elseif(PLUMED_MODE STREQUAL "SHARED")
|
||||
include(${PLUMED_LIBDIR}/plumed${PLUMED_SUFFIX}/src/lib/Plumed.cmake.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}plumed${PLUMED_SUFFIX}Kernel${CMAKE_SHARED_LIBRARY_SUFFIX}")
|
||||
include(${PLUMED_LIBDIR}/plumed${PLUMED_SUFFIX}/src/lib/Plumed.cmake.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}")
|
||||
if(CMAKE_PROJECT_NAME STREQUAL "lammps")
|
||||
target_link_libraries(lammps PUBLIC LAMMPS::PLUMED)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
target_link_libraries(lammps PRIVATE LAMMPS::PLUMED)
|
||||
|
||||
@ -1,11 +1,29 @@
|
||||
|
||||
if(NOT Python_INTERPRETER)
|
||||
# backward compatibility with CMake before 3.12 and older LAMMPS documentation
|
||||
if(PYTHON_EXECUTABLE)
|
||||
set(Python_EXECUTABLE ${PYTHON_EXECUTABLE})
|
||||
if(CMAKE_VERSION VERSION_LESS 3.12)
|
||||
if(NOT PYTHON_VERSION_STRING)
|
||||
set(Python_ADDITIONAL_VERSIONS 3.12 3.11 3.10 3.9 3.8 3.7 3.6)
|
||||
# search for interpreter first, so we have a consistent library
|
||||
find_package(PythonInterp) # Deprecated since version 3.12
|
||||
if(PYTHONINTERP_FOUND)
|
||||
set(Python_EXECUTABLE ${PYTHON_EXECUTABLE})
|
||||
endif()
|
||||
endif()
|
||||
find_package(Python COMPONENTS Interpreter)
|
||||
# search for the library matching the selected interpreter
|
||||
set(Python_ADDITIONAL_VERSIONS ${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR})
|
||||
find_package(PythonLibs REQUIRED) # Deprecated since version 3.12
|
||||
if(NOT (PYTHON_VERSION_STRING STREQUAL PYTHONLIBS_VERSION_STRING))
|
||||
message(FATAL_ERROR "Python Library version ${PYTHONLIBS_VERSION_STRING} does not match Interpreter version ${PYTHON_VERSION_STRING}")
|
||||
endif()
|
||||
target_include_directories(lammps PRIVATE ${PYTHON_INCLUDE_DIRS})
|
||||
target_link_libraries(lammps PRIVATE ${PYTHON_LIBRARIES})
|
||||
else()
|
||||
if(NOT Python_INTERPRETER)
|
||||
# backward compatibility
|
||||
if(PYTHON_EXECUTABLE)
|
||||
set(Python_EXECUTABLE ${PYTHON_EXECUTABLE})
|
||||
endif()
|
||||
find_package(Python COMPONENTS Interpreter)
|
||||
endif()
|
||||
find_package(Python REQUIRED COMPONENTS Interpreter Development)
|
||||
target_link_libraries(lammps PRIVATE Python::Python)
|
||||
endif()
|
||||
find_package(Python REQUIRED COMPONENTS Interpreter Development)
|
||||
target_link_libraries(lammps PRIVATE Python::Python)
|
||||
target_compile_definitions(lammps PRIVATE -DLMP_PYTHON)
|
||||
|
||||
@ -1,2 +0,0 @@
|
||||
find_package(GSL 2.6 REQUIRED)
|
||||
target_link_libraries(lammps PRIVATE GSL::gsl)
|
||||
@ -1,5 +1,5 @@
|
||||
function(FindStyleHeaders path style_class file_pattern headers)
|
||||
file(GLOB files CONFIGURE_DEPENDS "${path}/${file_pattern}*.h")
|
||||
file(GLOB files ${CONFIGURE_DEPENDS} "${path}/${file_pattern}*.h")
|
||||
get_property(hlist GLOBAL PROPERTY ${headers})
|
||||
|
||||
foreach(file_name ${files})
|
||||
@ -187,7 +187,7 @@ endfunction(DetectBuildSystemConflict)
|
||||
|
||||
|
||||
function(FindPackagesHeaders path style_class file_pattern headers)
|
||||
file(GLOB files CONFIGURE_DEPENDS "${path}/${file_pattern}*.h")
|
||||
file(GLOB files ${CONFIGURE_DEPENDS} "${path}/${file_pattern}*.h")
|
||||
get_property(plist GLOBAL PROPERTY ${headers})
|
||||
|
||||
foreach(file_name ${files})
|
||||
|
||||
@ -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 CONFIGURE_DEPENDS ${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}")
|
||||
@ -19,7 +19,7 @@ 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 or 22.04+(Ubuntu 20.04 fails)
|
||||
if((CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
if((CMAKE_SYSTEM_NAME STREQUAL "Linux") AND (CMAKE_VERSION VERSION_GREATER_EQUAL 3.13)
|
||||
AND ((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") OR (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")))
|
||||
if(((CMAKE_LINUX_DISTRO STREQUAL "Ubuntu") AND
|
||||
((CMAKE_DISTRO_VERSION VERSION_LESS_EQUAL 18.04) OR (CMAKE_DISTRO_VERSION VERSION_GREATER_EQUAL 22.04)))
|
||||
@ -66,8 +66,16 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||
option(ENABLE_COVERAGE "Enable collecting code coverage data" OFF)
|
||||
mark_as_advanced(ENABLE_COVERAGE)
|
||||
if(ENABLE_COVERAGE)
|
||||
target_compile_options(lammps PUBLIC --coverage)
|
||||
target_link_options(lammps PUBLIC --coverage)
|
||||
if(CMAKE_VERSION VERSION_LESS 3.13)
|
||||
if(CMAKE_CXX_FLAGS)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --coverage")
|
||||
else()
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_${CMAKE_BUILD_TYPE}_FLAGS} --coverage")
|
||||
endif()
|
||||
else()
|
||||
target_compile_options(lammps PUBLIC --coverage)
|
||||
target_link_options(lammps PUBLIC --coverage)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@ -102,16 +110,24 @@ endif()
|
||||
#######################################
|
||||
# select code sanitizer options
|
||||
#######################################
|
||||
set(ENABLE_SANITIZER "none" CACHE STRING "Select a code sanitizer option (none (default), address, hwaddress, leak, thread, undefined)")
|
||||
set(ENABLE_SANITIZER "none" CACHE STRING "Select a code sanitizer option (none (default), address, leak, thread, undefined)")
|
||||
mark_as_advanced(ENABLE_SANITIZER)
|
||||
set(ENABLE_SANITIZER_VALUES none address hwaddress leak thread undefined)
|
||||
set(ENABLE_SANITIZER_VALUES none address leak thread undefined)
|
||||
set_property(CACHE ENABLE_SANITIZER PROPERTY STRINGS ${ENABLE_SANITIZER_VALUES})
|
||||
validate_option(ENABLE_SANITIZER ENABLE_SANITIZER_VALUES)
|
||||
string(TOLOWER ${ENABLE_SANITIZER} ENABLE_SANITIZER)
|
||||
if(NOT ENABLE_SANITIZER STREQUAL "none")
|
||||
if((${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU") OR (${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang"))
|
||||
target_compile_options(lammps PUBLIC -fsanitize=${ENABLE_SANITIZER})
|
||||
target_link_options(lammps PUBLIC -fsanitize=${ENABLE_SANITIZER})
|
||||
if(CMAKE_VERSION VERSION_LESS 3.13)
|
||||
if(CMAKE_CXX_FLAGS)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=${ENABLE_SANITIZER}")
|
||||
else()
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_${CMAKE_BUILD_TYPE}_FLAGS} -fsanitize=${ENABLE_SANITIZER}")
|
||||
endif()
|
||||
else()
|
||||
target_compile_options(lammps PUBLIC -fsanitize=${ENABLE_SANITIZER})
|
||||
target_link_options(lammps PUBLIC -fsanitize=${ENABLE_SANITIZER})
|
||||
endif()
|
||||
else()
|
||||
message(WARNING "ENABLE_SANITIZER option not supported by ${CMAKE_CXX_COMPILER_ID} compilers. Ignoring.")
|
||||
set(ENABLE_SANITIZER "none")
|
||||
|
||||
@ -26,7 +26,7 @@ if(BUILD_TOOLS)
|
||||
|
||||
enable_language(C)
|
||||
get_filename_component(MSI2LMP_SOURCE_DIR ${LAMMPS_TOOLS_DIR}/msi2lmp/src ABSOLUTE)
|
||||
file(GLOB MSI2LMP_SOURCES CONFIGURE_DEPENDS ${MSI2LMP_SOURCE_DIR}/[^.]*.c)
|
||||
file(GLOB MSI2LMP_SOURCES ${CONFIGURE_DEPENDS} ${MSI2LMP_SOURCE_DIR}/[^.]*.c)
|
||||
add_executable(msi2lmp ${MSI2LMP_SOURCES})
|
||||
if(STANDARD_MATH_LIB)
|
||||
target_link_libraries(msi2lmp PRIVATE ${STANDARD_MATH_LIB})
|
||||
@ -37,6 +37,40 @@ if(BUILD_TOOLS)
|
||||
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)
|
||||
message(WARNING "The LAMMPS shell needs LAMMPS_EXCEPTIONS enabled for full functionality")
|
||||
endif()
|
||||
|
||||
# include resource compiler to embed icons into the executable on Windows
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
||||
enable_language(RC)
|
||||
set(ICON_RC_FILE ${LAMMPS_TOOLS_DIR}/lammps-shell/lmpicons.rc)
|
||||
endif()
|
||||
|
||||
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()
|
||||
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)
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 86 KiB After Width: | Height: | Size: 85 KiB |
Binary file not shown.
@ -17,7 +17,7 @@
|
||||
<key>CFBundleLongVersionString</key>
|
||||
<string>${MACOSX_BUNDLE_LONG_VERSION_STRING}</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>LAMMPS_GUI</string>
|
||||
<string>LAMMPS</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
|
||||
@ -9,7 +9,7 @@ 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
|
||||
After copying the lammps-gui folder into your Applications folder, please follow
|
||||
these steps:
|
||||
|
||||
1. Open the Terminal app
|
||||
@ -23,7 +23,7 @@ these steps:
|
||||
|
||||
3. Add the following lines to the end of the file, save it, and close the editor
|
||||
|
||||
LAMMPS_INSTALL_DIR=/Applications/LAMMPS_GUI.app/Contents
|
||||
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
|
||||
@ -38,9 +38,9 @@ these steps:
|
||||
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.
|
||||
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)
|
||||
|
||||
@ -50,10 +50,10 @@ these steps:
|
||||
|
||||
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
|
||||
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
|
||||
|
||||
@ -61,9 +61,9 @@ these steps:
|
||||
|
||||
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
|
||||
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.
|
||||
|
||||
@ -2,10 +2,9 @@
|
||||
|
||||
APP_NAME=lammps-gui
|
||||
DESTDIR=${PWD}/../LAMMPS_GUI
|
||||
VERSION="$1"
|
||||
|
||||
echo "Delete old files, if they exist"
|
||||
rm -rf ${DESTDIR} ../LAMMPS_GUI-Linux-amd64*.tar.gz
|
||||
rm -rf ${DESTDIR} ../LAMMPS-Linux-amd64.tar.gz
|
||||
|
||||
echo "Create staging area for deployment and populate"
|
||||
DESTDIR=${DESTDIR} cmake --install . --prefix "/"
|
||||
@ -60,19 +59,17 @@ done
|
||||
|
||||
echo "Set up wrapper script"
|
||||
MYDIR=$(dirname "$0")
|
||||
cp ${MYDIR}/xdg-open ${DESTDIR}/bin
|
||||
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
|
||||
test ${EXE} = xdg-open && continue
|
||||
ln -s bin/linux_wrapper.sh ${DESTDIR}/${EXE}
|
||||
done
|
||||
|
||||
pushd ..
|
||||
tar -czvvf LAMMPS_GUI-Linux-amd64-${VERSION}.tar.gz LAMMPS_GUI
|
||||
tar -czvvf LAMMPS-Linux-amd64.tar.gz LAMMPS_GUI
|
||||
popd
|
||||
|
||||
echo "Cleanup dir"
|
||||
|
||||
@ -1,10 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
APP_NAME=lammps-gui
|
||||
VERSION="$1"
|
||||
|
||||
echo "Delete old files, if they exist"
|
||||
rm -f ${APP_NAME}.dmg ${APP_NAME}-rw.dmg LAMMPS_GUI-macOS-multiarch*.dmg
|
||||
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
|
||||
@ -23,8 +22,8 @@ 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_GUI.app
|
||||
cd LAMMPS_GUI.app/Contents
|
||||
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
|
||||
@ -76,7 +75,7 @@ echo '
|
||||
set statusbar visible to false
|
||||
set toolbar visible to false
|
||||
set the bounds to { 100, 40, 868, 640 }
|
||||
set position of item "'LAMMPS_GUI'.app" to { 190, 216 }
|
||||
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
|
||||
@ -97,12 +96,12 @@ 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_GUI-macOS-multiarch-${VERSION}.dmg"
|
||||
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_GUI-macOS-multiarch-${VERSION}.dmg
|
||||
SetFile -a C LAMMPS_GUI-macOS-multiarch-${VERSION}.dmg
|
||||
Rez -a icon.rsrc -o LAMMPS-macOS-multiarch.dmg
|
||||
SetFile -a C LAMMPS-macOS-multiarch.dmg
|
||||
rm icon.rsrc
|
||||
|
||||
echo "Delete temporary disk images"
|
||||
|
||||
@ -3,10 +3,9 @@
|
||||
APP_NAME=lammps-gui
|
||||
DESTDIR=${PWD}/LAMMPS_GUI
|
||||
SYSROOT="$1"
|
||||
VERSION="$2"
|
||||
|
||||
echo "Delete old files, if they exist"
|
||||
rm -rvf ${DESTDIR}/LAMMPS_GUI ${DESTDIR}/LAMMPS-Win10-amd64*.zip
|
||||
rm -rvf ${DESTDIR}/LAMMPS_GUI ${DESTDIR}/LAMMPS-Win10-amd64.zip
|
||||
|
||||
echo "Create staging area for deployment and populate"
|
||||
DESTDIR=${DESTDIR} cmake --install . --prefix "/"
|
||||
@ -61,5 +60,5 @@ cat > ${DESTDIR}/bin/qt.conf <<EOF
|
||||
[Paths]
|
||||
Plugins = ../qt5plugins
|
||||
EOF
|
||||
zip -9rvD LAMMPS-Win10-amd64-${VERSION}.zip LAMMPS_GUI
|
||||
zip -9rvD LAMMPS-Win10-amd64.zip LAMMPS_GUI
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
# CMake script to be run post installation to build zipped package
|
||||
|
||||
# clean up old zipfile and deployment tree
|
||||
file(REMOVE LAMMPS_GUI-Win10-amd64.zip)
|
||||
file(REMOVE LAMMPS-Win10-amd64.zip)
|
||||
file(REMOVE_RECURSE LAMMPS_GUI)
|
||||
file(RENAME ${INSTNAME} LAMMPS_GUI)
|
||||
|
||||
@ -21,15 +21,8 @@ file(WRITE qtdeploy.bat "@ECHO OFF\r\nset VSCMD_DEBUG=0\r\nCALL ${VC_INIT} x64\r
|
||||
execute_process(COMMAND cmd.exe /c qtdeploy.bat COMMAND_ECHO STDERR)
|
||||
file(REMOVE qtdeploy.bat)
|
||||
|
||||
# download and uncompress static FFMpeg and gzip binaries
|
||||
file(DOWNLOAD "https://download.lammps.org/thirdparty/ffmpeg-gzip.zip" ffmpeg-gzip.zip)
|
||||
file(WRITE unpackzip.ps1 "Expand-Archive -Path ffmpeg-gzip.zip -DestinationPath LAMMPS_GUI")
|
||||
execute_process(COMMAND powershell -ExecutionPolicy Bypass -File unpackzip.ps1)
|
||||
file(REMOVE unpackzip.ps1)
|
||||
file(REMOVE ffmpeg-gzip.zip)
|
||||
|
||||
# create zip archive
|
||||
file(WRITE makearchive.ps1 "Compress-Archive -Path LAMMPS_GUI -CompressionLevel Optimal -DestinationPath LAMMPS_GUI-Win10-amd64.zip")
|
||||
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)
|
||||
|
||||
@ -4,17 +4,15 @@
|
||||
# reset locale to avoid problems with decimal numbers
|
||||
export LC_ALL=C
|
||||
|
||||
BASEDIR="$(dirname "$0")"
|
||||
EXENAME="$(basename "$0")"
|
||||
|
||||
PATH="${BASEDIR}/bin:${PATH}"
|
||||
BASEDIR=$(dirname "$0")
|
||||
EXENAME=$(basename "$0")
|
||||
|
||||
# append to LD_LIBRARY_PATH to prefer local (newer) libs
|
||||
LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${BASEDIR}/lib"
|
||||
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 PATH
|
||||
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}" "$@"
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -26,9 +26,8 @@ set(ALL_PACKAGES
|
||||
DPD-REACT
|
||||
DPD-SMOOTH
|
||||
DRUDE
|
||||
EFF
|
||||
ELECTRODE
|
||||
EXTRA-COMMAND
|
||||
EFF
|
||||
EXTRA-COMPUTE
|
||||
EXTRA-DUMP
|
||||
EXTRA-FIX
|
||||
@ -61,10 +60,11 @@ set(ALL_PACKAGES
|
||||
ML-QUIP
|
||||
ML-RANN
|
||||
ML-SNAP
|
||||
ML-UF3
|
||||
MOFFF
|
||||
MOLECULE
|
||||
MOLFILE
|
||||
MPIIO
|
||||
MSCG
|
||||
NETCDF
|
||||
OPENMP
|
||||
OPT
|
||||
@ -82,7 +82,6 @@ set(ALL_PACKAGES
|
||||
REACTION
|
||||
REAXFF
|
||||
REPLICA
|
||||
RHEO
|
||||
RIGID
|
||||
SCAFACOS
|
||||
SHOCK
|
||||
|
||||
@ -28,9 +28,8 @@ set(ALL_PACKAGES
|
||||
DPD-REACT
|
||||
DPD-SMOOTH
|
||||
DRUDE
|
||||
EFF
|
||||
ELECTRODE
|
||||
EXTRA-COMMAND
|
||||
EFF
|
||||
EXTRA-COMPUTE
|
||||
EXTRA-DUMP
|
||||
EXTRA-FIX
|
||||
@ -63,10 +62,11 @@ set(ALL_PACKAGES
|
||||
ML-QUIP
|
||||
ML-RANN
|
||||
ML-SNAP
|
||||
ML-UF3
|
||||
MOFFF
|
||||
MOLECULE
|
||||
MOLFILE
|
||||
MPIIO
|
||||
MSCG
|
||||
NETCDF
|
||||
OPENMP
|
||||
OPT
|
||||
@ -84,7 +84,6 @@ set(ALL_PACKAGES
|
||||
REACTION
|
||||
REAXFF
|
||||
REPLICA
|
||||
RHEO
|
||||
RIGID
|
||||
SCAFACOS
|
||||
SHOCK
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
# preset that will enable clang/clang++ with support for MPI and OpenMP (on Linux boxes)
|
||||
|
||||
# prefer flang over gfortran, if available
|
||||
find_program(CLANG_FORTRAN NAMES flang-new flang gfortran f95)
|
||||
find_program(CLANG_FORTRAN NAMES flang gfortran f95)
|
||||
set(ENV{OMPI_FC} ${CLANG_FORTRAN})
|
||||
get_filename_component(_tmp_fc ${CLANG_FORTRAN} NAME)
|
||||
if ((_tmp_fc STREQUAL "flang") OR (_tmp_fc STREQUAL "flang-new"))
|
||||
if (_tmp_fc STREQUAL "flang")
|
||||
set(FC_STD_VERSION "-std=f2018")
|
||||
set(BUILD_MPI OFF)
|
||||
else()
|
||||
|
||||
@ -9,6 +9,7 @@ endforeach()
|
||||
|
||||
set(DOWNLOAD_KIM ON CACHE BOOL "" FORCE)
|
||||
set(DOWNLOAD_MDI ON CACHE BOOL "" FORCE)
|
||||
set(DOWNLOAD_MSCG ON CACHE BOOL "" FORCE)
|
||||
set(DOWNLOAD_VORO ON CACHE BOOL "" FORCE)
|
||||
set(DOWNLOAD_EIGEN3 ON CACHE BOOL "" FORCE)
|
||||
set(DOWNLOAD_PACE ON CACHE BOOL "" FORCE)
|
||||
|
||||
@ -1,11 +0,0 @@
|
||||
# preset that enables GPU and selects CUDA API
|
||||
|
||||
set(PKG_GPU ON CACHE BOOL "Build GPU package" FORCE)
|
||||
set(GPU_API "cuda" CACHE STRING "APU used by GPU package" FORCE)
|
||||
set(GPU_PREC "mixed" CACHE STRING "" FORCE)
|
||||
|
||||
set(CUDA_NVCC_FLAGS "-allow-unsupported-compiler" CACHE STRING "" FORCE)
|
||||
set(CUDA_NVCC_FLAGS_DEBUG "-allow-unsupported-compiler" CACHE STRING "" FORCE)
|
||||
set(CUDA_NVCC_FLAGS_MINSIZEREL "-allow-unsupported-compiler" CACHE STRING "" FORCE)
|
||||
set(CUDA_NVCC_FLAGS_RELWITHDEBINFO "-allow-unsupported-compiler" CACHE STRING "" FORCE)
|
||||
set(CUDA_NVCC_FLAGS_RELEASE "-allow-unsupported-compiler" CACHE STRING "" FORCE)
|
||||
@ -6,11 +6,6 @@ set(Kokkos_ENABLE_SERIAL ON CACHE BOOL "" FORCE)
|
||||
set(Kokkos_ENABLE_CUDA ON CACHE BOOL "" FORCE)
|
||||
set(Kokkos_ARCH_PASCAL60 ON CACHE BOOL "" FORCE)
|
||||
set(BUILD_OMP ON CACHE BOOL "" FORCE)
|
||||
get_filename_component(NVCC_WRAPPER_CMD ${CMAKE_CURRENT_SOURCE_DIR}/../lib/kokkos/bin/nvcc_wrapper ABSOLUTE)
|
||||
set(CMAKE_CXX_COMPILER ${NVCC_WRAPPER_CMD} CACHE FILEPATH "" FORCE)
|
||||
|
||||
# If KSPACE is also enabled, use CUFFT for FFTs
|
||||
set(FFT_KOKKOS "CUFFT" CACHE STRING "" FORCE)
|
||||
|
||||
# hide deprecation warnings temporarily for stable release
|
||||
set(Kokkos_ENABLE_DEPRECATION_WARNINGS OFF CACHE BOOL "" FORCE)
|
||||
|
||||
@ -12,9 +12,6 @@ set(BUILD_OMP ON CACHE BOOL "" FORCE)
|
||||
set(CMAKE_CXX_COMPILER hipcc CACHE STRING "" FORCE)
|
||||
set(CMAKE_TUNE_FLAGS "-munsafe-fp-atomics" CACHE STRING "" FORCE)
|
||||
|
||||
# If KSPACE is also enabled, use CUFFT for FFTs
|
||||
set(FFT_KOKKOS "HIPFFT" CACHE STRING "" FORCE)
|
||||
|
||||
# hide deprecation warnings temporarily for stable release
|
||||
set(Kokkos_ENABLE_DEPRECATION_WARNINGS OFF CACHE BOOL "" FORCE)
|
||||
|
||||
|
||||
@ -10,3 +10,5 @@ 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)
|
||||
|
||||
@ -22,9 +22,8 @@ set(WIN_PACKAGES
|
||||
DPD-REACT
|
||||
DPD-SMOOTH
|
||||
DRUDE
|
||||
EFF
|
||||
ELECTRODE
|
||||
EXTRA-COMMAND
|
||||
EFF
|
||||
EXTRA-COMPUTE
|
||||
EXTRA-DUMP
|
||||
EXTRA-FIX
|
||||
@ -33,6 +32,7 @@ set(WIN_PACKAGES
|
||||
FEP
|
||||
GPU
|
||||
GRANULAR
|
||||
INTEL
|
||||
INTERLAYER
|
||||
KSPACE
|
||||
LEPTON
|
||||
@ -50,7 +50,6 @@ set(WIN_PACKAGES
|
||||
ML-POD
|
||||
ML-RANN
|
||||
ML-SNAP
|
||||
ML-UF3
|
||||
MOFFF
|
||||
MOLECULE
|
||||
MOLFILE
|
||||
@ -84,6 +83,7 @@ endforeach()
|
||||
|
||||
# these two packages require a full MPI implementation
|
||||
if(BUILD_MPI)
|
||||
set(PKG_MPIIO ON CACHE BOOL "" FORCE)
|
||||
set(PKG_LATBOLTZ ON CACHE BOOL "" FORCE)
|
||||
endif()
|
||||
|
||||
|
||||
@ -24,9 +24,8 @@ set(ALL_PACKAGES
|
||||
DPD-REACT
|
||||
DPD-SMOOTH
|
||||
DRUDE
|
||||
EFF
|
||||
ELECTRODE
|
||||
EXTRA-COMMAND
|
||||
EFF
|
||||
EXTRA-COMPUTE
|
||||
EXTRA-DUMP
|
||||
EXTRA-FIX
|
||||
@ -46,7 +45,6 @@ set(ALL_PACKAGES
|
||||
ML-IAP
|
||||
ML-POD
|
||||
ML-SNAP
|
||||
ML-UF3
|
||||
MOFFF
|
||||
MOLECULE
|
||||
OPENMP
|
||||
|
||||
@ -19,6 +19,8 @@ set(PACKAGES_WITH_LIB
|
||||
ML-PACE
|
||||
ML-QUIP
|
||||
MOLFILE
|
||||
MPIIO
|
||||
MSCG
|
||||
NETCDF
|
||||
PLUMED
|
||||
PYTHON
|
||||
|
||||
@ -18,11 +18,11 @@ set(MPI_CXX_COMPILER "mpicxx" CACHE STRING "" FORCE)
|
||||
|
||||
unset(HAVE_OMP_H_INCLUDE CACHE)
|
||||
set(OpenMP_C "icx" CACHE STRING "" FORCE)
|
||||
set(OpenMP_C_FLAGS "-qopenmp;-qopenmp-simd" CACHE STRING "" FORCE)
|
||||
set(OpenMP_C_FLAGS "-qopenmp -qopenmp-simd" CACHE STRING "" FORCE)
|
||||
set(OpenMP_C_LIB_NAMES "omp" CACHE STRING "" FORCE)
|
||||
set(OpenMP_CXX "icpx" CACHE STRING "" FORCE)
|
||||
set(OpenMP_CXX_FLAGS "-qopenmp;-qopenmp-simd" CACHE STRING "" FORCE)
|
||||
set(OpenMP_CXX_FLAGS "-qopenmp -qopenmp-simd" CACHE STRING "" FORCE)
|
||||
set(OpenMP_CXX_LIB_NAMES "omp" CACHE STRING "" FORCE)
|
||||
set(OpenMP_Fortran_FLAGS "-qopenmp;-qopenmp-simd" CACHE STRING "" FORCE)
|
||||
set(OpenMP_Fortran_FLAGS "-qopenmp -qopenmp-simd" CACHE STRING "" FORCE)
|
||||
set(OpenMP_omp_LIBRARY "libiomp5.so" CACHE PATH "" FORCE)
|
||||
|
||||
|
||||
@ -22,7 +22,6 @@ set(WIN_PACKAGES
|
||||
DRUDE
|
||||
EFF
|
||||
ELECTRODE
|
||||
EXTRA-COMMAND
|
||||
EXTRA-COMPUTE
|
||||
EXTRA-DUMP
|
||||
EXTRA-FIX
|
||||
@ -43,7 +42,6 @@ set(WIN_PACKAGES
|
||||
ML-IAP
|
||||
ML-POD
|
||||
ML-SNAP
|
||||
ML-UF3
|
||||
MOFFF
|
||||
MOLECULE
|
||||
MOLFILE
|
||||
@ -52,8 +50,8 @@ set(WIN_PACKAGES
|
||||
ORIENT
|
||||
PERI
|
||||
PHONON
|
||||
PLUGIN
|
||||
POEMS
|
||||
PLUGIN
|
||||
PTM
|
||||
QEQ
|
||||
QTB
|
||||
|
||||
@ -63,7 +63,6 @@ help:
|
||||
@echo " anchor_check scan for duplicate anchor labels"
|
||||
@echo " style_check check for complete and consistent style lists"
|
||||
@echo " package_check check for complete and consistent package lists"
|
||||
@echo " role_check check for misformatted role keywords"
|
||||
@echo " spelling spell-check the manual"
|
||||
|
||||
# ------------------------------------------
|
||||
@ -99,8 +98,6 @@ html: xmlgen $(VENV) $(SPHINXCONFIG)/conf.py $(ANCHORCHECK) $(MATHJAX)
|
||||
env LC_ALL=C grep -n '[^ -~]' $(RSTDIR)/*.rst ;\
|
||||
env LC_ALL=C grep -n ' :[a-z]\+`' $(RSTDIR)/*.rst ;\
|
||||
env LC_ALL=C grep -n ' `[^`]\+<[a-z][^`]\+`[^_]' $(RSTDIR)/*.rst ;\
|
||||
env LC_ALL=C grep -n ':\(ref\|doc\):[^`]' $(RSTDIR)/*.rst ;\
|
||||
env LC_ALL=C grep -n '\(ref\|doc\)`[^`]' $(RSTDIR)/*.rst ;\
|
||||
$(PYTHON) $(BUILDDIR)/utils/check-styles.py -s ../src -d src ;\
|
||||
echo "############################################" ;\
|
||||
deactivate ;\
|
||||
@ -182,8 +179,6 @@ pdf: xmlgen $(VENV) $(SPHINXCONFIG)/conf.py $(ANCHORCHECK)
|
||||
env LC_ALL=C grep -n '[^ -~]' $(RSTDIR)/*.rst ;\
|
||||
env LC_ALL=C grep -n ' :[a-z]\+`' $(RSTDIR)/*.rst ;\
|
||||
env LC_ALL=C grep -n ' `[^`]\+<[a-z][^`]\+`[^_]' $(RSTDIR)/*.rst ;\
|
||||
env LC_ALL=C grep -n ':\(ref\|doc\):[^`]' $(RSTDIR)/*.rst ;\
|
||||
env LC_ALL=C grep -n '\(ref\|doc\)`[^`]' $(RSTDIR)/*.rst ;\
|
||||
$(PYTHON) utils/check-styles.py -s ../src -d src ;\
|
||||
echo "############################################" ;\
|
||||
deactivate ;\
|
||||
@ -232,8 +227,6 @@ 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 || : )
|
||||
@( env LC_ALL=C grep -n ':\(ref\|doc\):[^`]' $(RSTDIR)/*.rst && exit 1 || : )
|
||||
@( env LC_ALL=C grep -n '\(ref\|doc\)`[^`]' $(RSTDIR)/*.rst && exit 1 || : )
|
||||
|
||||
link_check : $(VENV) html
|
||||
@(\
|
||||
|
||||
@ -36,10 +36,10 @@ requests.
|
||||
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 releases" or "stable releases" based on the
|
||||
associated tags. Updates to the stable release in between stable releases
|
||||
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 "stable update releases".
|
||||
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
|
||||
@ -131,7 +131,7 @@ 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 feature
|
||||
releases of LAMMPS made about every 4-8 weeks at a point, when the LAMMPS
|
||||
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
|
||||
|
||||
@ -16,11 +16,8 @@ clean:
|
||||
rm -f $(IMGSVG) $(IMGPDF) $(IMGPNG) *~
|
||||
|
||||
ifeq ($(HAS_DOT),YES)
|
||||
$(IMGDIR)/lammps-classes.png : lammps-classes.dot
|
||||
dot -Tpng -Kneato -o $@ $<
|
||||
|
||||
$(IMGDIR)/%.png: %.dot
|
||||
dot -Tpng -Kdot -o $@ $<
|
||||
dot -Tpng -Kneato -o $@ $<
|
||||
endif
|
||||
|
||||
ifeq ($(HAS_DOT),NO)
|
||||
|
||||
@ -1,34 +0,0 @@
|
||||
// LAMMPS branches and releases
|
||||
digraph releases {
|
||||
rankdir="LR";
|
||||
github [shape="box" label="Pull Requests\non GitHub" height=0.75];
|
||||
github -> develop [label="Merge commits"];
|
||||
{
|
||||
rank = "same";
|
||||
work [shape="none" label="Development branches:"]
|
||||
develop [label="'develop' branch" height=0.75];
|
||||
maintenance [label="'maintenance' branch" height=0.75];
|
||||
};
|
||||
{
|
||||
rank = "same";
|
||||
upload [shape="none" label="Release branches:"]
|
||||
release [label="'release' branch" height=0.75];
|
||||
stable [label="'stable' branch" height=0.75];
|
||||
};
|
||||
develop -> release [label="Feature release\n(every 4-8 weeks)"];
|
||||
release -> stable [label="Stable release\n(once per year)"];
|
||||
stable -> maintenance [label="Reset on stable release" style="setlinewidth(2)"];
|
||||
develop -> maintenance [label="Backports of bugfixes" style="dashed"];
|
||||
maintenance -> stable [label="Updates to stable release"];
|
||||
{
|
||||
rank = "same";
|
||||
tag [shape="none" label="Applied tags:"];
|
||||
patchtag [shape="box" label="patch_<date>"];
|
||||
stabletag [shape="box" label="stable_<date>"];
|
||||
updatetag [shape="box" label="stable_<date>_update<num>"];
|
||||
};
|
||||
release -> patchtag [label="feature release" style="dotted"];
|
||||
stable -> stabletag [label="stable release" style="dotted"];
|
||||
stable -> updatetag [label="update release" style="dotted"];
|
||||
}
|
||||
|
||||
20
doc/lammps.1
20
doc/lammps.1
@ -1,7 +1,7 @@
|
||||
.TH LAMMPS "1" "29 August 2024" "2024-08-29"
|
||||
.TH LAMMPS "1" "2 August 2023" "2023-08-2"
|
||||
.SH NAME
|
||||
.B LAMMPS
|
||||
\- Molecular Dynamics Simulator. Version 29 August 2024
|
||||
\- Molecular Dynamics Simulator. Version 2 August 2023
|
||||
|
||||
.SH SYNOPSIS
|
||||
.B lmp
|
||||
@ -226,20 +226,6 @@ arguments of the "dump" command. See the
|
||||
.B LAMMPS
|
||||
manual for details on either of the two commands.
|
||||
.TP
|
||||
\fB\-r2info <restart file> <keyword> ...\fR or
|
||||
\fB\-restart2info <restart file> <keyword> ...\fR
|
||||
Write information about the <restart file> previously written by
|
||||
.B LAMMPS
|
||||
to the screen and immediately exit. Following <restart file>
|
||||
argument, additional keywords for the
|
||||
.B LAMMPS
|
||||
"info" command may be added to increase the amount of information
|
||||
written. By default "system" "group" "fix" "compute" are already
|
||||
set. See the
|
||||
.B LAMMPS
|
||||
manual for details on the "info" command.
|
||||
.TP
|
||||
.TP
|
||||
\fB\-sc <file name>\fR or \fB\-screen <file name>\fR
|
||||
Specify a file for
|
||||
.B LAMMPS
|
||||
@ -311,7 +297,7 @@ the chapter on errors in the
|
||||
manual gives some additional information about error messages, if possible.
|
||||
|
||||
.SH COPYRIGHT
|
||||
© 2003--2024 Sandia Corporation
|
||||
© 2003--2022 Sandia Corporation
|
||||
|
||||
This package is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License version 2 as
|
||||
|
||||
@ -1,12 +1,6 @@
|
||||
Bibliography
|
||||
************
|
||||
|
||||
**(Abascal1)**
|
||||
Abascal, Sanz, Fernandez, Vega, J Chem Phys, 122, 234511 (2005)
|
||||
|
||||
**(Abascal2)**
|
||||
Abascal, J Chem Phys, 123, 234505 (2005)
|
||||
|
||||
**(Ackland)**
|
||||
Ackland, Jones, Phys Rev B, 73, 054104 (2006).
|
||||
|
||||
@ -28,24 +22,21 @@ Bibliography
|
||||
**(Agnolin and Roux 2007)**
|
||||
Agnolin, I. & Roux, J-N. (2007). Internal states of model isotropic granular packings. I. Assembling process, geometry, and contact networks. Phys. Rev. E, 76, 061302.
|
||||
|
||||
**(Ahrens-Iwers2022)**
|
||||
Ahrens-Iwers *et al.*, J. Chem. Phys. 157, 084801 (2022).
|
||||
|
||||
**(Ahrens-Iwers)**
|
||||
Ahrens-Iwers and Meissner, J. Chem. Phys. 155, 104104 (2021).
|
||||
|
||||
**(Aktulga)**
|
||||
Aktulga, Fogarty, Pandit, Grama, Parallel Computing, 38, 245-259 (2012).
|
||||
|
||||
**(Albe)**
|
||||
J.\ Nord, K. Albe, P. Erhart, and K. Nordlund, J. Phys.: Condens. Matter, 15, 5649(2003).
|
||||
|
||||
**(Albe1)**
|
||||
**(Albe)**
|
||||
K.\ Albe, K. Nordlund, J. Nord, and A. Kuronen, Phys. Rev. B, 66, 035205 (2002).
|
||||
|
||||
**(Allen)**
|
||||
Allen and Germano, Mol Phys 104, 3225-3235 (2006).
|
||||
|
||||
**(Allen)**
|
||||
Allen and Tildesley, Computer Simulation of Liquids, Clarendon Press, Oxford, 1987.
|
||||
|
||||
**(AllenTildesley)**
|
||||
Allen and Tildesley, Computer Simulation of Liquids, Oxford University Press (1987)
|
||||
|
||||
@ -58,9 +49,6 @@ Bibliography
|
||||
**(Anderson)**
|
||||
Anderson, Mukherjee, Critchley, Ziegler, and Lipton "POEMS: Parallelizable Open-source Efficient Multibody Software ", Engineering With Computers (2006).
|
||||
|
||||
**(Appshaw)**
|
||||
Appshaw, Seddon, Hanna, Soft. Matter,18, 1747(2022).
|
||||
|
||||
**(Avendano)**
|
||||
C.\ Avendano, T. Lafitte, A. Galindo, C. S. Adjiman, G. Jackson, E. Muller, J Phys Chem B, 115, 11154 (2011).
|
||||
|
||||
@ -70,7 +58,7 @@ Bibliography
|
||||
**(Babadi)**
|
||||
Babadi, Ejtehadi, Everaers, J Comp Phys, 219, 770-779 (2006).
|
||||
|
||||
**(Babadi2)**
|
||||
**(Babadi)**
|
||||
Babadi and Ejtehadi, EPL, 77 (2007) 23002.
|
||||
|
||||
**(Baczewski)**
|
||||
@ -85,23 +73,23 @@ Bibliography
|
||||
**(Ballenegger)**
|
||||
Ballenegger, Arnold, Cerda, J Chem Phys, 131, 094107 (2009).
|
||||
|
||||
**(Banna)**
|
||||
Volkov, Banna, Comp. Mater. Sci. 176, 109410 (2020).
|
||||
|
||||
**(Barrat)**
|
||||
Barrat and Rodney, J. Stat. Phys, 144, 679 (2011).
|
||||
|
||||
**(Barrett)**
|
||||
Barrett, Tschopp, El Kadiri, Scripta Mat. 66, p.666 (2012).
|
||||
|
||||
**(Barros)**
|
||||
Barros, Sinkovits, Luijten, J. Chem. Phys, 140, 064903 (2014)
|
||||
|
||||
**(Bartok)**
|
||||
Bartok, Payne, Risi, Csanyi, Phys Rev Lett, 104, 136403 (2010).
|
||||
|
||||
**(Bartok2010)**
|
||||
Bartok, Payne, Risi, Csanyi, Phys Rev Lett, 104, 136403 (2010).
|
||||
|
||||
**(Bartok2013)**
|
||||
Bartok, Kondor, Csanyi, Phys Rev B, 87, 184115 (2013).
|
||||
**(Bartok_2010)**
|
||||
AP Bartok, MC Payne, R Kondor, and G Csanyi, Physical Review Letters 104, 136403 (2010).
|
||||
|
||||
**(Bartok_PhD)**
|
||||
A Bartok-Partay, PhD Thesis, University of Cambridge, (2010).
|
||||
@ -109,18 +97,9 @@ Bibliography
|
||||
**(Baskes)**
|
||||
Baskes, Phys Rev B, 46, 2727-2742 (1992).
|
||||
|
||||
**(Baskes2)**
|
||||
Baskes, Phys Rev B, 75, 094113 (2007).
|
||||
|
||||
**(Beck)**
|
||||
Beck, Molecular Physics, 14, 311 (1968).
|
||||
|
||||
**(Becton)**
|
||||
Becton, Averett, Wang, Biomech. Model. Mechanobiology, 18, 425-433(2019).
|
||||
|
||||
**(Behler and Parrinello 2007)**
|
||||
Behler, J.; Parrinello, M. Phys. Rev. Lett. 2007, 98 (14), 146401.
|
||||
|
||||
**(Bennet)**
|
||||
Bennet, J Comput Phys, 22, 245 (1976)
|
||||
|
||||
@ -128,32 +107,26 @@ Bibliography
|
||||
Berardi, Fava, Zannoni, Chem Phys Lett, 297, 8-14 (1998). Berardi, Muccioli, Zannoni, J Chem Phys, 128, 024905 (2008).
|
||||
|
||||
**(Berendsen)**
|
||||
Berendsen, Postma, van Gunsteren, DiNola, Haak, J Chem Phys, 81, 3684 (1984).
|
||||
|
||||
**(Berendsen2)**
|
||||
Berendsen, Grigera, Straatsma, J Phys Chem, 91, 6269-6271 (1987).
|
||||
|
||||
**(Berendsen)**
|
||||
Berendsen, Postma, van Gunsteren, DiNola, Haak, J Chem Phys, 81, 3684 (1984).
|
||||
|
||||
**(Bessarab)**
|
||||
Bessarab, Uzdin, Jonsson, Comp Phys Comm, 196, 335-347 (2015).
|
||||
|
||||
**(Beutler)**
|
||||
Beutler, Mark, van Schaik, Gerber, van Gunsteren, Chem Phys Lett, 222, 529 (1994).
|
||||
|
||||
**(Bialke)**
|
||||
J.\ Bialke, T. Speck, and H Loewen, Phys. Rev. Lett. 108, 168301, 2012.
|
||||
|
||||
**(Bird)**
|
||||
G.\ A. Bird, "Molecular Gas Dynamics and the Direct Simulation of Gas Flows" (1994).
|
||||
|
||||
**(Bitzek)**
|
||||
Bitzek, Koskinen, Gahler, Moseler, Gumbsch, Phys Rev Lett, 97, 170201 (2006).
|
||||
|
||||
**(Bolintineanu1)**
|
||||
Bolintineanu, Lechman, Plimpton, Grest, Phys Rev E, 86, 066703 (2012).
|
||||
|
||||
**(Bolintineanu2)**
|
||||
Bolintineanu, Grest, Lechman, Pierce, Plimpton, Schunk, Comp Particle Mechanics, 1, 321-356 (2014).
|
||||
|
||||
**(Bomont)**
|
||||
Bomont, Bretonnet, J. Chem. Phys. 124, 054504 (2006).
|
||||
|
||||
**(Bond)**
|
||||
Bond and Leimkuhler, SIAM J Sci Comput, 30, p 134 (2007).
|
||||
|
||||
@ -161,7 +134,7 @@ Bibliography
|
||||
Boone, Babaei, Wilmer, J Chem Theory Comput, 15, 5579--5587 (2019).
|
||||
|
||||
**(BoreschKarplus)**
|
||||
Boresch and Karplus, J Phys Chem A, 103, 103 (1999).
|
||||
Boresch and Karplus, J Phys Chem A, 103, 103 (1999)
|
||||
|
||||
**(Botu1)**
|
||||
V.\ Botu and R. Ramprasad, Int. J. Quant. Chem., 115(16), 1074 (2015).
|
||||
@ -196,11 +169,8 @@ Bibliography
|
||||
**(Buck)**
|
||||
Buck, Bouguet-Bonnet, Pastor, MacKerell Jr., Biophys J, 90, L36 (2006).
|
||||
|
||||
**(Bulacu)**
|
||||
Bulacu, Goga, Zhao, Rossi, Monticelli, Periole, Tieleman, Marrink, J Chem Theory Comput, 9, 3282-3292
|
||||
|
||||
**(Bussi)**
|
||||
G. Bussi, T. Zykova-Timan, M. Parrinello, J Chem Phys, 130, 074101 (2009).
|
||||
G.\ Bussi, M. Parrinello, Phs. Rev. E 75, 056707 (2007)
|
||||
|
||||
**(Bussi1)**
|
||||
Bussi, Donadio and Parrinello, J. Chem. Phys. 126, 014101(2007)
|
||||
@ -208,20 +178,20 @@ Bibliography
|
||||
**(Bussi2)**
|
||||
Bussi and Parrinello, Phys. Rev. E 75, 056707 (2007)
|
||||
|
||||
**(COMB_1)**
|
||||
J.\ Yu, S. B. Sinnott, S. R. Phillpot, Phys Rev B, 75, 085311 (2007),
|
||||
|
||||
**(COMB_2)**
|
||||
**(COMB)**
|
||||
T.-R. Shan, B. D. Devine, T. W. Kemper, S. B. Sinnott, and S. R. Phillpot, Phys. Rev. B 81, 125328 (2010)
|
||||
|
||||
**(COMB3)**
|
||||
T.\ Liang, T.-R. Shan, Y.-T. Cheng, B. D. Devine, M. Noordhoek, Y. Li, Z. Lu, S. R. Phillpot, and S. B. Sinnott, Mat. Sci. & Eng: R 74, 255-279 (2013).
|
||||
|
||||
**(COMB_1)**
|
||||
J.\ Yu, S. B. Sinnott, S. R. Phillpot, Phys Rev B, 75, 085311 (2007),
|
||||
|
||||
**(Calhoun)**
|
||||
A.\ Calhoun, M. Pavese, G. Voth, Chem Phys Letters, 262, 415 (1996).
|
||||
|
||||
**(Campana)**
|
||||
C.\ Campana and M. H. Muser, Phys. Rev. B [74], 075420 (2006).
|
||||
C.\ Campana and M. H. Muser, *Practical Green's function approach to the simulation of elastic semi-infinite solids*, `Phys. Rev. B [74], 075420 (2006) <https://doi.org/10.1103/PhysRevB.74.075420>`_
|
||||
|
||||
**(Cao1)**
|
||||
J.\ Cao and B. Berne, J Chem Phys, 99, 2902 (1993).
|
||||
@ -245,9 +215,6 @@ Bibliography
|
||||
Cerda, Ballenegger, Lenz, Holm, J Chem Phys 129, 234104 (2008)
|
||||
|
||||
**(Ceriotti)**
|
||||
M. Ceriotti, M. Parrinello, T. Markland, D. Manolopoulos, J. Chem. Phys. 133, 124104 (2010).
|
||||
|
||||
**(Ceriotti1)**
|
||||
Ceriotti, Bussi and Parrinello, J Chem Theory Comput 6, 1170-80 (2010)
|
||||
|
||||
**(Ceriotti2)**
|
||||
@ -265,18 +232,6 @@ Bibliography
|
||||
**(Clarke)**
|
||||
Clarke and Smith, J Chem Phys, 84, 2290 (1986).
|
||||
|
||||
**(Clavier)**
|
||||
G. Clavier, N. Desbiens, E. Bourasseau, V. Lachet, N. Brusselle-Dupend and B. Rousseau, Mol Sim, 43, 1413 (2017).
|
||||
|
||||
**(Clemmer)**
|
||||
Clemmer and Robbins, Phys. Rev. Lett. (2022).
|
||||
|
||||
**(Clemmer1)**
|
||||
Clemmer, Monti, Lechman, Soft Matter, 20, 1702 (2024).
|
||||
|
||||
**(Clemmer2)**
|
||||
Clemmer, Pierce, O'Connor, Nevins, Jones, Lechman, Tencer, Appl. Math. Model., 130, 310-326 (2024).
|
||||
|
||||
**(Coleman)**
|
||||
Coleman, Spearot, Capolungo, MSMSE, 21, 055020 (2013).
|
||||
|
||||
@ -289,17 +244,8 @@ Bibliography
|
||||
**(Cornell)**
|
||||
Cornell, Cieplak, Bayly, Gould, Merz, Ferguson, Spellmeyer, Fox, Caldwell, Kollman, JACS 117, 5179-5197 (1995).
|
||||
|
||||
**(Cundall, 1987)**
|
||||
Cundall, P. A. Distinct Element Models of Rock and Soil
|
||||
|
||||
**(Curk1)**
|
||||
T. Curk, J. Yuan, and E. Luijten, JCP 156 (2022).
|
||||
|
||||
**(Curk2)**
|
||||
T. Curk and E. Luijten, PRL 126 (2021)
|
||||
|
||||
**(Cusentino)**
|
||||
Cusentino, Wood, Thompson, J Phys Chem A, 124, 5456, (2020)
|
||||
Cusentino, Wood, and Thompson, J Phys Chem A, xxx, xxxxx, (2020)
|
||||
|
||||
**(Daivis and Todd)**
|
||||
Daivis and Todd, J Chem Phys, 124, 194103 (2006).
|
||||
@ -322,15 +268,6 @@ Bibliography
|
||||
**(Daw2)**
|
||||
M.\ S. Daw, and M. I. Baskes, Phys. Rev. B, 29, 6443 (1984).
|
||||
|
||||
**(de Buyl)**
|
||||
de Buyl, Colberg and Hofling, Comp. Phys. Comm. 185(6), 1546-1553 (2014) -
|
||||
|
||||
**(Deissenbeck)**
|
||||
Deissenbeck *et al.*, Phys. Rev. Letters 126, 136803 (2021).
|
||||
|
||||
**(de Koning)**
|
||||
de Koning and Antonelli, Phys Rev E, 53, 465 (1996).
|
||||
|
||||
**(DeVane)**
|
||||
Shinoda, DeVane, Klein, Soft Matter, 4, 2453-2462 (2008).
|
||||
|
||||
@ -340,24 +277,12 @@ Bibliography
|
||||
**(Destree)**
|
||||
M.\ Destree, F. Laupretre, A. Lyulin, and J.-P. Ryckaert, J Chem Phys, 112, 9632 (2000).
|
||||
|
||||
**(Dickel)**
|
||||
Dickel, Francis, and Barrett, Computational Materials Science 171 (2020): 109157.
|
||||
|
||||
**(Dietz)**
|
||||
Dietz and Hoy, J. Chem Phys, 156, 014103 (2022).
|
||||
|
||||
**(Dobson)**
|
||||
Dobson, J Chem Phys, 141, 184103 (2014).
|
||||
|
||||
**(Drautz)**
|
||||
Drautz, Phys Rev B, 99, 014104 (2019).
|
||||
|
||||
**(Duffy)**
|
||||
D M Duffy and A M Rutherford, J. Phys.: Condens. Matter, 19, 016207-016218 (2007).
|
||||
|
||||
**(Dufils)**
|
||||
Dufils *et al.*, Phys. Rev. Letters 123, 195501 (2019).
|
||||
|
||||
**(Dullweber)**
|
||||
Dullweber, Leimkuhler and McLachlan, J Chem Phys, 107, 5840 (1997).
|
||||
|
||||
@ -370,9 +295,6 @@ Bibliography
|
||||
**(Dunweg)**
|
||||
Dunweg and Paul, Int J of Modern Physics C, 2, 817-27 (1991).
|
||||
|
||||
**(EcheverriRestrepo)**
|
||||
Echeverri Restrepo, Andric, Comput Mater Sci, 218, 111978 (2023).
|
||||
|
||||
**(EDIP)**
|
||||
J F Justo et al, Phys Rev B 58, 2539 (1998).
|
||||
|
||||
@ -382,21 +304,12 @@ Bibliography
|
||||
**(Elliott)**
|
||||
Elliott, Tadmor and Bernstein, `https://openkim.org/kim-api <https://openkim.org/kim-api>`_ (2011) doi: `https://doi.org/10.25950/FF8F563A <https://doi.org/10.25950/FF8F563A>`_
|
||||
|
||||
**(Ellis)**
|
||||
Ellis, Fiedler, Popoola, Modine, Stephens, Thompson, Cangi, Rajamanickam, Phys Rev B, 104, 035120, (2021)
|
||||
|
||||
**(Emmrich)**
|
||||
Emmrich, Weckner, Commun. Math. Sci., 5, 851-864 (2007),
|
||||
|
||||
**(Elstner)**
|
||||
M.\ Elstner, D. Poresag, G. Jungnickel, J. Elsner, M. Haugk, T. Frauenheim, S. Suhai, and G. Seifert, Phys. Rev. B, 58, 7260 (1998).
|
||||
|
||||
**(Erdmann)**
|
||||
U.\ Erdmann , W. Ebeling, L. Schimansky-Geier, and F. Schweitzer, Eur. Phys. J. B 15, 105-113, 2000.
|
||||
|
||||
**(Eshelby)**
|
||||
J.D. Eshelby, Philos. Trans. Royal Soc. London A, Math. Phys. Sci., Vol. 244, No. 877 (1951) pp. 87-112; J. Elasticity, Vol. 5, Nos. 3-4 (1975) pp. 321-335]
|
||||
|
||||
**(Espanol and Revenga)**
|
||||
Espanol, Revenga, Physical Review E, 67, 026705 (2003).
|
||||
|
||||
@ -415,18 +328,9 @@ Bibliography
|
||||
**(Faken)**
|
||||
Faken, Jonsson, Comput Mater Sci, 2, 279 (1994).
|
||||
|
||||
**(Falk)**
|
||||
Falk and Langer PRE, 57, 7192 (1998).
|
||||
|
||||
**(Fath)**
|
||||
Fath, Hochbruck, Singh, J Comp Phys, 333, 180-198 (2017).
|
||||
|
||||
**(Feng1)**
|
||||
Z. Feng, ..., and W. Ouyang, J. Phys. Chem. C. 127(18), 8704-8713 (2023).
|
||||
|
||||
**(Feng2)**
|
||||
Z. Feng, ..., and W. Ouyang, Langmuir 39(50), 18198-18207 (2023).
|
||||
|
||||
**(Fennell)**
|
||||
C.\ J. Fennell, J. D. Gezelter, J Chem Phys, 124, 234104 (2006).
|
||||
|
||||
@ -463,36 +367,18 @@ Bibliography
|
||||
**(Frenkel)**
|
||||
Frenkel and Smit, Understanding Molecular Simulation, Academic Press, London, 2002.
|
||||
|
||||
**(Fu)**
|
||||
Fu, Peng, Yuan, Kfoury, Young, Comput. Phys. Commun, 210, 193-203(2017).
|
||||
**(GLE4MD)**
|
||||
`https://gle4md.org/ <https://gle4md.org/>`_
|
||||
|
||||
**(Gao)**
|
||||
Gao and Weber, Nuclear Instruments and Methods in Physics Research B 191 (2012) 504.
|
||||
|
||||
**(Gingrich)**
|
||||
Gingrich, `MSc thesis` <https://gingrich.chem.northwestern.edu/papers/ThesiswCorrections.pdf>` (2010).
|
||||
|
||||
**(Gissinger2017)**
|
||||
Gissinger, Jensen and Wise, Polymer, 128, 211-217 (2017).
|
||||
|
||||
**(Gissinger2020)**
|
||||
Gissinger, Jensen and Wise, Macromolecules, 53, 22, 9953-9961 (2020).
|
||||
|
||||
**(Gissinger)**
|
||||
Jacob R. Gissinger, Scott R. Zavada, Joseph G. Smith, Josh Kemppainen, Ivan Gallegos, Gregory M. Odegard, Emilie J. Siochi, and Kristopher E. Wise, Carbon, 202, 336-347 (2023).
|
||||
|
||||
**(Gissinger2024)**
|
||||
J. R. Gissinger, I. Nikiforov, Y. Afshar, B. Waters, M. Choi, D. S. Karls, A. Stukowski, W. Im, H. Heinz, A. Kohlmeyer, and E. B. Tadmor, J Phys Chem B, 128, 3282-3297 (2024).
|
||||
|
||||
**(Gloor)**
|
||||
Gloor, J Chem Phys, 123, 134703 (2005)
|
||||
Gissinger, Jensen and Wise, Polymer, 128, 211 (2017).
|
||||
|
||||
**(Glosli)**
|
||||
Glosli, unpublished, 2005. Streitz, Glosli, Patel, Chan, Yates, de Supinski, Sexton and Gunnels, Journal of Physics: Conference Series, 46, 254 (2006).
|
||||
|
||||
**(Goff)**
|
||||
Goff, Zhang, Negre, Rohskopf, Niklasson, Journal of Chemical Theory and Computation 19, no. 13 (2023).
|
||||
|
||||
**(Goldman1)**
|
||||
Goldman, Reed and Fried, J. Chem. Phys. 131, 204103 (2009)
|
||||
|
||||
@ -526,9 +412,6 @@ Bibliography
|
||||
**(Guo)**
|
||||
Guo and Thirumalai, Journal of Molecular Biology, 263, 323-43 (1996).
|
||||
|
||||
**(Gupta)**
|
||||
Gupta ,Phys Rev. B, 23, 6265-6270 (1981).
|
||||
|
||||
**(Hardy)**
|
||||
David Hardy thesis: Multilevel Summation for the Fast Evaluation of Forces for the Simulation of Biomolecules, University of Illinois at Urbana-Champaign, (2006).
|
||||
|
||||
@ -550,9 +433,6 @@ Bibliography
|
||||
**(Henrich)**
|
||||
O.\ Henrich, Y. A. Gutierrez-Fosado, T. Curk, T. E. Ouldridge, Eur. Phys. J. E 41, 57 (2018).
|
||||
|
||||
**(Herman)**
|
||||
M. F. Herman, E. J. Bruskin, B. J. Berne, J Chem Phys, 76, 5150 (1982).
|
||||
|
||||
**(Hess)**
|
||||
Hess, B. The Journal of Chemical Physics 2002, 116 (1), 209-217.
|
||||
|
||||
@ -574,42 +454,24 @@ Bibliography
|
||||
**(Hoover)**
|
||||
Hoover, Phys Rev A, 31, 1695 (1985).
|
||||
|
||||
**(Huang)**
|
||||
Huang, Zhang, Yuan, Gao, Zhang, Nano Lett. 13, 4546(2013).
|
||||
|
||||
**(Huang2014)**
|
||||
X. Huang, "Exploring critical-state behavior using DEM", Doctoral dissertation, Imperial College. (2014). https://doi.org/10.25560/25316
|
||||
|
||||
**(Hu)**
|
||||
Hu, and Adams J. Comp. Physics, 213, 844-861 (2006).
|
||||
|
||||
**(Hu)**
|
||||
Hu, J. Chem. Theory Comput. 10, 5254 (2014).
|
||||
|
||||
**(Hummer)**
|
||||
Hummer, Gronbech-Jensen, Neumann, J Chem Phys, 109, 2791 (1998)
|
||||
|
||||
**(Hunt)**
|
||||
Hunt, Mol Simul, 42, 347 (2016).
|
||||
|
||||
**(Ikeshoji)**
|
||||
Ikeshoji and Hafskjold, Molecular Physics, 81, 251-261 (1994).
|
||||
|
||||
**(Ikeshoji2)**
|
||||
Ikeshoji, Hafskjold, Furuholt, Mol Sim, 29, 101-109, (2003).
|
||||
|
||||
**(Ilie)**
|
||||
Ilie, Briels, den Otter, Journal of Chemical Physics, 142, 114103 (2015).
|
||||
|
||||
**(In 't Veld)**
|
||||
In 't Veld, Ismail, Grest, J Chem Phys (accepted) (2007).
|
||||
|
||||
**(IPI)**
|
||||
`https://ipi-code.org/ <https://ipi-code.org/>`
|
||||
|
||||
**(IPI-CPC)**
|
||||
Ceriotti, More and Manolopoulos, Comp Phys Comm, 185, 1019-1026 (2014).
|
||||
|
||||
**(Ikeshoji)**
|
||||
Ikeshoji and Hafskjold, Molecular Physics, 81, 251-261 (1994).
|
||||
|
||||
**(In 't Veld)**
|
||||
In 't Veld, Ismail, Grest, J Chem Phys (accepted) (2007).
|
||||
|
||||
**(Isele-Holder)**
|
||||
Isele-Holder, Mitchell, Ismail, J Chem Phys, 137, 174107 (2012).
|
||||
|
||||
@ -628,9 +490,6 @@ Bibliography
|
||||
**(Izvekov)**
|
||||
Izvekov, Voth, J Chem Phys 123, 134105 (2005).
|
||||
|
||||
**(Jadhao)**
|
||||
Jadhao, Solis, Olvera de la Cruz, J Chem Phys, 138, 054119 (2013)
|
||||
|
||||
**(Janssens)**
|
||||
Janssens, Olmsted, Holm, Foiles, Plimpton, Derlet, Nature Materials, 5, 124-127 (2006).
|
||||
|
||||
@ -643,15 +502,6 @@ Bibliography
|
||||
**(Jiang)**
|
||||
Jiang, Hardy, Phillips, MacKerell, Schulten, and Roux, J Phys Chem Lett, 2, 87-92 (2011).
|
||||
|
||||
**(Jiang1)**
|
||||
Jiang, Hardy, Phillips, MacKerell, Schulten, and Roux, J Phys Chem Lett, 2, 87-92 (2011).
|
||||
|
||||
**(Jiang2)**
|
||||
J.-W. Jiang, Nanotechnology 26, 315706 (2015).
|
||||
|
||||
**(Jiang3)**
|
||||
J.-W. Jiang, Acta Mech. Solida. Sin 32, 17 (2019).
|
||||
|
||||
**(Johnson et al, 1971)**
|
||||
Johnson, K. L., Kendall, K., & Roberts, A. D. (1971). Surface energy and the contact of elastic solids. Proc. R. Soc. Lond. A, 324(1558), 301-313.
|
||||
|
||||
@ -712,33 +562,27 @@ Bibliography
|
||||
**(Kumar)**
|
||||
Kumar and Skinner, J. Phys. Chem. B, 112, 8311 (2008)
|
||||
|
||||
**(Lafourcade)**
|
||||
Lafourcade, Maillet, Denoual, Duval, Allera, Goryaeva, and Marinica, `Comp. Mat. Science, 230, 112534 (2023) <https://doi.org/10.1016/j.commatsci.2023.112534>`_
|
||||
|
||||
**(Lamoureux and Roux)**
|
||||
G.\ Lamoureux, B. Roux, J. Chem. Phys 119, 3025 (2003)
|
||||
|
||||
**(Lamoureux)**
|
||||
Lamoureux and Roux, J Chem Phys, 119, 3025-3039 (2003).
|
||||
|
||||
**(Landsgesell)**
|
||||
J. Landsgesell, P. Hebbeker, O. Rud, R. Lunkad, P. Kosovan, and C. Holm, Macromolecules 53, 3007-3020 (2020).
|
||||
**(Larentzos)**
|
||||
J.P. Larentzos, J.K. Brennan, J.D. Moore, and W.D. Mattson, "LAMMPS Implementation of Constant Energy Dissipative Particle Dynamics (DPD-E)", ARL-TR-6863, U.S. Army Research
|
||||
|
||||
**(Larentzos1)**
|
||||
J.P. Larentzos, J.K. Brennan, J.D. Moore, M. Lisal and W.D. Mattson, Comput. Phys. Commun., 185, 1987-1998 (2014).
|
||||
J.P. Larentzos, J.K. Brennan, J.D. Moore, M. Lisal and W.D. Mattson, "Parallel Implementation of Isothermal and Isoenergetic Dissipative Particle Dynamics Using Shardlow-Like Splitting
|
||||
|
||||
**(Larentzos2)**
|
||||
J.P. Larentzos, J.K. Brennan, J.D. Moore, and W.D. Mattson, ARL-TR-6863, U.S. Army Research Laboratory, Aberdeen Proving Ground, MD (2014).
|
||||
J.P. Larentzos, J.K. Brennan, J.D. Moore, and W.D. Mattson, "LAMMPS Implementation of Constant Energy Dissipative Particle Dynamics (DPD-E)", ARL-TR-6863, U.S. Army Research
|
||||
|
||||
**(Larsen)**
|
||||
Larsen, Schmidt, Schiotz, Modelling Simul Mater Sci Eng, 24, 055007 (2016).
|
||||
|
||||
**(Lebedeva1)**
|
||||
**(Lebedeva et al.)**
|
||||
I.\ V. Lebedeva, A. A. Knizhnik, A. M. Popov, Y. E. Lozovik, B. V. Potapkin, Phys. Rev. B, 84, 245437 (2011)
|
||||
|
||||
**(Lebedeva2)**
|
||||
I. V. Lebedeva, A. A. Knizhnik, A. M. Popov, Y. E. Lozovik, B. V. Potapkin, Physica E: 44, 949-954 (2012)
|
||||
|
||||
**(Lechman)**
|
||||
Lechman, et al, in preparation (2010).
|
||||
|
||||
@ -748,9 +592,6 @@ Bibliography
|
||||
**(Lee2)**
|
||||
Lee, Baskes, Kim, Cho. Phys. Rev. B, 64, 184102 (2001).
|
||||
|
||||
**(Lee2020)**
|
||||
C.W. Lee, et al. (2020) Physical Review B, 102(2), 024107.
|
||||
|
||||
**(Lenart)**
|
||||
Lenart , Jusufi, and Panagiotopoulos, J Chem Phys, 126, 044509 (2007).
|
||||
|
||||
@ -775,11 +616,8 @@ Bibliography
|
||||
**(Li2015_JCP)**
|
||||
Li, Yazdani, Tartakovsky, Karniadakis, J Chem Phys, 143: 014101 (2015). DOI:10.1063/1.4923254.
|
||||
|
||||
**(Liang)**
|
||||
Liang, Phillpot, Sinnott Phys. Rev. B79 245110, (2009), Erratum: Phys. Rev. B85 199903(E), (2012)
|
||||
|
||||
**(Lisal)**
|
||||
M.\ Lisal, J.K. Brennan, J. Bonet Avalos, J. Chem. Phys., 135, 204105 (2011).
|
||||
M.\ Lisal, J.K. Brennan, J. Bonet Avalos, "Dissipative particle dynamics at isothermal, isobaric, isoenergetic, and isoenthalpic conditions using Shardlow-like splitting algorithms.",
|
||||
|
||||
**(Liu1)**
|
||||
L.\ Liu, Y. Liu, S. V. Zybin, H. Sun and W. A. Goddard, Journal of Physical Chemistry A, 115, 11016-11022 (2011).
|
||||
@ -796,15 +634,6 @@ Bibliography
|
||||
**(Luding, 2008)**
|
||||
Luding, S. (2008). Cohesive, frictional powders: contact models for tension. Granular matter, 10(4), 235.
|
||||
|
||||
**(Lysogorskiy)**
|
||||
Lysogorskiy, van der Oord, Bochkarev, Menon, Rinaldi, Hammerschmidt, Mrovec, Thompson, Csanyi, Ortner, Drautz, npj Comp Mat, 7, 97 (2021).
|
||||
|
||||
**(Lysogorskiy21)**
|
||||
Lysogorskiy, van der Oord, Bochkarev, Menon, Rinaldi, Hammerschmidt, Mrovec, Thompson, Csanyi, Ortner, Drautz, npj Comp Mat, 7, 97 (2021).
|
||||
|
||||
**(Lysogorskiy23)**
|
||||
Lysogorskiy, Bochkarev, Mrovec, Drautz, Phys Rev Mater, 7, 043801 (2023) / arXiv:2212.08716 (2022).
|
||||
|
||||
**(Maaravi)**
|
||||
T.\ Maaravi et al, J. Phys. Chem. C 121, 22826-22835 (2017).
|
||||
|
||||
@ -823,18 +652,12 @@ Bibliography
|
||||
**(Maginn)**
|
||||
Kelkar, Rafferty, Maginn, Siepmann, Fluid Phase Equilibria, 260, 218-231 (2007).
|
||||
|
||||
**(Mahoney)**
|
||||
Mahoney, Jorgensen, J Chem Phys 112, 8910 (2000)
|
||||
|
||||
**(Malolepsza)**
|
||||
Malolepsza, Secor, Keyes, J Phys Chem B 119 (42), 13379-13384 (2015).
|
||||
|
||||
**(Mandadapu)**
|
||||
Mandadapu, KK; Templeton, JA; Lee, JW, "Polarization as a field variable from molecular dynamics simulations." Journal of Chemical Physics (2013), 139:054115. Please refer to the standard finite element (FE) texts, e.g. T.J.R Hughes " The finite element method ", Dover 2003, for the basics of FE simulation.
|
||||
|
||||
**(Mandelli_1)**
|
||||
D. Mandelli, W. Ouyang, M. Urbakh, and O. Hod, ACS Nano 13(7), 7603-7609 (2019).
|
||||
|
||||
**(Maras)**
|
||||
Maras, Trushin, Stukowski, Ala-Nissila, Jonsson, Comp Phys Comm, 205, 13-21 (2016).
|
||||
|
||||
@ -850,9 +673,6 @@ Bibliography
|
||||
**(Martyna1994)**
|
||||
Martyna, Tobias and Klein, J Chem Phys, 101, 4177 (1994).
|
||||
|
||||
**(Martyna2)**
|
||||
G. Martyna, A. Hughes, M. Tuckerman, J. Chem. Phys. 110, 3275 (1999).
|
||||
|
||||
**(Mason)**
|
||||
J.\ K. Mason, Acta Cryst A65, 259 (2009).
|
||||
|
||||
@ -892,9 +712,6 @@ Bibliography
|
||||
**(Mie)**
|
||||
G.\ Mie, Ann Phys, 316, 657 (1903).
|
||||
|
||||
**(Milano)**
|
||||
G. Milano, S. Goudeau, F. Mueller-Plathe, J. Polym. Sci. B Polym. Phys. 43, 871 (2005).
|
||||
|
||||
**(Miller1)**
|
||||
T.\ F. Miller III, M. Eleftheriou, P. Pattnaik, A. Ndirango, G. J. Martyna, J. Chem. Phys., 116, 8649-8659 (2002).
|
||||
|
||||
@ -925,18 +742,12 @@ Bibliography
|
||||
**(Mitchell2011a)**
|
||||
Mitchell. A Nonlocal, Ordinary, State-Based Plasticity Model for Peridynamics. Sandia National Lab Report, 3166:1-34 (2011).
|
||||
|
||||
**(Miyazaki)**
|
||||
Miyazaki, Okazaki, Shinoda, J Chem Theory Comput, 16, 782-793 (2020).
|
||||
|
||||
**(Mniszewski)**
|
||||
S.\ M. Mniszewski, M. J. Cawkwell, M. E. Wall, J. Mohd-Yusof, N. Bock, T. C. Germann, and A. M. N. Niklasson, J. Chem. Theory Comput., 11, 4644 (2015).
|
||||
|
||||
**(Monaghan)**
|
||||
Monaghan and Gingold, Journal of Computational Physics, 52, 374-389 (1983).
|
||||
|
||||
**(Monti)**
|
||||
Monti, Clemmer, Srivastava, Silbert, Grest, and Lechman, Phys. Rev. E, (2022).
|
||||
|
||||
**(Moore)**
|
||||
Moore, J Chem Phys, 144, 104501 (2016).
|
||||
|
||||
@ -956,7 +767,7 @@ Bibliography
|
||||
Morris, Fox, Zhu, J Comp Physics, 136, 214-226 (1997).
|
||||
|
||||
**(Moustafa)**
|
||||
Sabry G. Moustafa, Andrew J. Schultz, and David A. Kofke, `Phys. Rev. E [92], 043303 (2015) <https://link.aps.org/doi/10.1103/PhysRevE.92.043303>`_
|
||||
Sabry G. Moustafa, Andrew J. Schultz, and David A. Kofke, *Very fast averaging of thermal properties of crystals by molecular simulation*, `Phys. Rev. E [92], 043303 (2015) <https://link.aps.org/doi/10.1103/PhysRevE.92.043303>`_
|
||||
|
||||
**(Muller-Plathe1)**
|
||||
Muller-Plathe, J Chem Phys, 106, 6082 (1997).
|
||||
@ -976,6 +787,9 @@ Bibliography
|
||||
**(Neelov)**
|
||||
Neelov, Holm, J Chem Phys 132, 234103 (2010)
|
||||
|
||||
**(Negre2016)**
|
||||
C.\ F. A. Negre, S. M. Mniszewski, M. J. Cawkwell, N. Bock, M. E. Wall, and A. M. N. Niklasson, J. Chem. Theory Comp., 12, 3063 (2016).
|
||||
|
||||
**(Nelson)**
|
||||
Nelson, Halperin, Phys Rev B, 19, 2457 (1979).
|
||||
|
||||
@ -985,24 +799,12 @@ Bibliography
|
||||
**(Neyts)**
|
||||
E.\ C. Neyts and A. Bogaerts, Theor. Chem. Acc. 132, 1320 (2013).
|
||||
|
||||
**(Nguyen2023)**
|
||||
Nguyen, Physical Review B, 107(14), 144103, (2023).
|
||||
|
||||
**(Nguyen2024)**
|
||||
Nguyen, Journal of Computational Physics, 113102, (2024).
|
||||
|
||||
**(Nguyen and Rohskopf)**
|
||||
Nguyen and Rohskopf, Journal of Computational Physics, 480, 112030, (2023).
|
||||
|
||||
**(Nguyen and Sema)**
|
||||
Nguyen and Sema, https://arxiv.org/abs/2405.00306, (2024).
|
||||
|
||||
**(NguyenTD)**
|
||||
Nguyen, Li, Bagchi, Solis, Olvera de la Cruz, Comput Phys Commun 241, 80-19 (2019)
|
||||
|
||||
**(Nicholson and Rutledge)**
|
||||
Nicholson and Rutledge, J Chem Phys, 145, 244903 (2016).
|
||||
|
||||
**(Nicklas)**
|
||||
The spline-based MEAM+SW format was first devised and used to develop potentials for bcc transition metals by Jeremy Nicklas, Michael Fellinger,
|
||||
|
||||
**(Niklasson2002)**
|
||||
A.\ M. N. Niklasson, Phys. Rev. B, 66, 155115 (2002).
|
||||
|
||||
@ -1015,9 +817,6 @@ Bibliography
|
||||
**(Niklasson2017)**
|
||||
A.\ M. N. Niklasson, J. Chem. Phys., 147, 054103 (2017).
|
||||
|
||||
**(Nitol)**
|
||||
Nitol, Dickel, and Barrett, Computational Materials Science 188 (2021): 110207.
|
||||
|
||||
**(Noid)**
|
||||
Noid, Chu, Ayton, Krishna, Izvekov, Voth, Das, Andersen, J Chem Phys 128, 134105 (2008).
|
||||
|
||||
@ -1039,9 +838,6 @@ Bibliography
|
||||
**(O'Connor)**
|
||||
O'Connor et al., J. Chem. Phys. 142, 024903 (2015).
|
||||
|
||||
**(O'Hearn)**
|
||||
O'Hearn, Alperen, Aktulga, SIAM J. Sci. Comput., 42(1), C1--C22 (2020).
|
||||
|
||||
**(Okabe)**
|
||||
T.\ Okabe, M. Kawata, Y. Okamoto, M. Masuhiro, Chem. Phys. Lett., 335, 435-439 (2001).
|
||||
|
||||
@ -1051,8 +847,6 @@ Bibliography
|
||||
**(Omelyan)**
|
||||
Omelyan, Mryglod, and Folk. Phys. Rev. Lett. 86(5), 898. (2001).
|
||||
|
||||
**(OPLS-AA96)** Jorgensen, Maxwell, Tirado-Rives, J Am Chem Soc, 118(45), 11225-11236 (1996).
|
||||
|
||||
**(Oppelstrup)**
|
||||
Oppelstrup, unpublished, 2015. Oppelstrup and Moriarty, to be published.
|
||||
|
||||
@ -1074,17 +868,11 @@ Bibliography
|
||||
**(Ouyang2)**
|
||||
W.\ Ouyang et al., J. Chem. Theory Comput. 16(1), 666-676 (2020).
|
||||
|
||||
**(Ouyang_1)**
|
||||
W. Ouyang et al., J. Chem. Theory Comput. 16(1), 666-676 (2020).
|
||||
**(PASS)**
|
||||
PASS webpage: https://www.sdu.dk/en/DPASS
|
||||
|
||||
**(Ouyang6)**
|
||||
W. Ouyang, O. Hod, and R. Guerra, J. Chem. Theory Comput. 17, 7215 (2021).
|
||||
|
||||
**(Ouyang7)**
|
||||
W. Ouyang, et al., J. Chem. Theory Comput. 17, 7237 (2021).
|
||||
|
||||
**(Palkar)**
|
||||
Palkar V, Kuksenok O, J. Phys. Chem. B, 126 (1), 336-346, 2022
|
||||
**(PLUMED)**
|
||||
G.A. Tribello, M. Bonomi, D. Branduardi, C. Camilloni and G. Bussi, Comp. Phys. Comm 185, 604 (2014)
|
||||
|
||||
**(Paquay)**
|
||||
Paquay and Kusters, Biophys. J., 110, 6, (2016). preprint available at `arXiv:1411.3019 <https://arxiv.org/abs/1411.3019/>`_.
|
||||
@ -1095,33 +883,21 @@ Bibliography
|
||||
**(Parks)**
|
||||
Parks, Lehoucq, Plimpton, Silling, Comp Phys Comm, 179(11), 777-783 (2008).
|
||||
|
||||
**(Parrinello)**
|
||||
**(Parrinello1981)**
|
||||
Parrinello and Rahman, J Appl Phys, 52, 7182 (1981).
|
||||
|
||||
**(PASS)**
|
||||
PASS webpage: https://www.sdu.dk/en/DPASS
|
||||
|
||||
**(Paula Leite2016)**
|
||||
Paula Leite , Freitas, Azevedo, and de Koning, J Chem Phys, 126, 044509 (2016).
|
||||
|
||||
**(Paula Leite2017)**
|
||||
Paula Leite, Santos-Florez, and de Koning, Phys Rev E, 96, 32115 (2017).
|
||||
|
||||
**(Pavlov1)**
|
||||
D Pavlov, V Galigerov, D Kolotinskii, V Nikolskiy, V Stegailov, International Journal of High Performance Computing Applications, 38, 34-49 (2024).
|
||||
|
||||
**(Pavlov2)**
|
||||
Pavlov, Galigerov, Kolotinskii, Nikolskiy, Stegailov, "GPU-based Molecular Dynamics of Fluid Flows: Reaching for Turbulence", Int. J. High Perf. Comp. Appl., (2024)
|
||||
|
||||
**(Pearlman)**
|
||||
Pearlman, J Chem Phys, 98, 1487 (1994)
|
||||
|
||||
**(Pedersen)**
|
||||
Pedersen, J. Chem. Phys., 139, 104102 (2013).
|
||||
|
||||
**(Pedone)**
|
||||
A. Pedone, G. Malavasi, M. C. Menziani, A. N. Cormack, and U. Segre, J. Phys. Chem. B, 110, 11780 (2006)
|
||||
|
||||
**(Peng)**
|
||||
Peng, Ren, Dudarev, Whelan, Acta Crystallogr. A, 52, 257-76 (1996).
|
||||
|
||||
@ -1143,9 +919,6 @@ Bibliography
|
||||
**(Pettifor_3)**
|
||||
D.G. Pettifor and I.I. Oleinik, Phys. Rev. B, 65, 172103 (2002).
|
||||
|
||||
**(PFC)**
|
||||
PFC Particle Flow Code 6.0 Documentation. Itasca Consulting Group.
|
||||
|
||||
**(Phillips)**
|
||||
C.\ L. Phillips, J. A. Anderson, S. C. Glotzer, Comput Phys Comm, 230, 7191-7201 (2011).
|
||||
|
||||
@ -1155,21 +928,9 @@ Bibliography
|
||||
**(Pisarev)**
|
||||
V V Pisarev and S V Starikov, J. Phys.: Condens. Matter, 26, 475401 (2014).
|
||||
|
||||
**(Plimpton)**
|
||||
Plimpton and Knight, JPDC, 147, 184-195 (2021).
|
||||
|
||||
**(PLUMED)**
|
||||
G.A. Tribello, M. Bonomi, D. Branduardi, C. Camilloni and G. Bussi, Comp. Phys. Comm 185, 604 (2014)
|
||||
|
||||
**(Pollock)**
|
||||
Pollock and Glosli, Comp Phys Comm, 95, 93 (1996).
|
||||
|
||||
**(Ponder)**
|
||||
Ponder, Wu, Ren, Pande, Chodera, Schnieders, Haque, Mobley, Lambrecht, DiStasio Jr, M. Head-Gordon, Clark, Johnson, T. Head-Gordon, J Phys Chem B, 114, 2549-2564 (2010).
|
||||
|
||||
**(Popov1)**
|
||||
A.M. Popov, I. V. Lebedeva, A. A. Knizhnik, Y. E. Lozovik and B. V. Potapkin, Chem. Phys. Lett. 536, 82-86 (2012).
|
||||
|
||||
**(Price1)**
|
||||
Price and Brooks, J Chem Phys, 121, 10096 (2004).
|
||||
|
||||
@ -1209,12 +970,6 @@ Bibliography
|
||||
**(Rick)**
|
||||
S.\ W. Rick, S. J. Stuart, B. J. Berne, J Chem Phys 101, 16141 (1994).
|
||||
|
||||
**(Rick2)**
|
||||
S. W. Rick, S. J. Stuart, B. J. Berne, J Chem Phys 101, 6141
|
||||
|
||||
**(Roberts)**
|
||||
R. Roberts (2019) "Evenly Distributing Points in a Triangle." Extreme Learning. `<http://extremelearning.com.au/evenly-distributing-points-in-a-triangle/>`_
|
||||
|
||||
**(Rohart)**
|
||||
Rohart and Thiaville, Physical Review B, 88(18), 184422. (2013).
|
||||
|
||||
@ -1251,18 +1006,9 @@ Bibliography
|
||||
**(Sadigh)**
|
||||
B Sadigh, P Erhart, A Stukowski, A Caro, E Martinez, and L Zepeda-Ruiz, Phys. Rev. B, 85, 184203 (2012).
|
||||
|
||||
**(Sadigh1)**
|
||||
B. Sadigh, P. Erhart, A. Stukowski, A. Caro, E. Martinez, and L. Zepeda-Ruiz, Phys. Rev. B **85**, 184203 (2012)
|
||||
|
||||
**(Sadigh2)**
|
||||
B. Sadigh and P. Erhart, Phys. Rev. B **86**, 134204 (2012)
|
||||
|
||||
**(Safran)**
|
||||
Safran, Statistical Thermodynamics of Surfaces, Interfaces, And Membranes, Westview Press, ISBN: 978-0813340791 (2003).
|
||||
|
||||
**(Salanne)**
|
||||
Salanne, Rotenberg, Jahn, Vuilleumier, Simon, Christian and Madden, Theor Chem Acc, 131, 1143 (2012).
|
||||
|
||||
**(Salerno)**
|
||||
Salerno, Bernstein, J Chem Theory Comput, --, ---- (2018).
|
||||
|
||||
@ -1272,18 +1018,9 @@ Bibliography
|
||||
**(Sanyal2)**
|
||||
Sanyal and Shell, Journal of Physical Chemistry B, 122 (21), 5678-5693.
|
||||
|
||||
**(Scalfi)**
|
||||
Scalfi *et al.*, J. Chem. Phys., 153, 174704 (2020).
|
||||
|
||||
**(Schelling)**
|
||||
Patrick K. Schelling, Comp. Mat. Science, 44, 274 (2008).
|
||||
|
||||
**(Scherer1)**
|
||||
C. Scherer and D. Andrienko, Phys. Chem. Chem. Phys. 20, 22387-22394 (2018).
|
||||
|
||||
**(Scherer2)**
|
||||
C. Scherer, R. Scheid, D. Andrienko, and T. Bereau, J. Chem. Theor. Comp. 16, 3194-3204 (2020).
|
||||
|
||||
**(Schlitter1)**
|
||||
Schlitter, Swegat, Mulders, "Distance-type reaction coordinates for modelling activated processes", J Molecular Modeling, 7, 171-177 (2001).
|
||||
|
||||
@ -1302,36 +1039,21 @@ Bibliography
|
||||
**(Schroeder)**
|
||||
Schroeder and Steinhauser, J Chem Phys, 133, 154511 (2010).
|
||||
|
||||
**(Seleson 2010)**
|
||||
Seleson, Parks, Int J Mult Comp Eng 9(6), pp. 689-706, 2011.
|
||||
|
||||
**(Semaev)**
|
||||
Semaev, Cryptography and Lattices, 181 (2001).
|
||||
|
||||
**(Seo)**
|
||||
Seo, Shinoda, J Chem Theory Comput, 15, 762-774 (2019).
|
||||
|
||||
**(Sheppard)**
|
||||
Sheppard, Terrell, Henkelman, J Chem Phys, 128, 134106 (2008). See ref 1 in this paper for original reference to Qmin in Jonsson, Mills, Jacobsen.
|
||||
|
||||
**(Shi)**
|
||||
Shi, Xia, Zhang, Best, Wu, Ponder, Ren, J Chem Theory Comp, 9, 4046, 2013.
|
||||
|
||||
**(Shinoda)**
|
||||
Shinoda, DeVane, Klein, Mol Sim, 33, 27 (2007).
|
||||
|
||||
**(Shinoda)**
|
||||
Shinoda, Shiga, and Mikami, Phys Rev B, 69, 134103 (2004).
|
||||
|
||||
**(Shire)**
|
||||
Shire, Hanley and Stratford, Comp. Part. Mech., (2020).
|
||||
|
||||
**(Sides)**
|
||||
Sides, Grest, Stevens, Plimpton, J Polymer Science B, 42, 199-208 (2004).
|
||||
|
||||
**(Siepmann)**
|
||||
Siepmann and Sprik, J. Chem. Phys. 102, 511 (1995).
|
||||
|
||||
**(Silbert)**
|
||||
Silbert, Ertas, Grest, Halsey, Levine, Plimpton, Phys Rev E, 64, p 051302 (2001).
|
||||
|
||||
@ -1341,21 +1063,12 @@ Bibliography
|
||||
**(Silling 2000)**
|
||||
Silling, J Mech Phys Solids, 48, 175-209 (2000).
|
||||
|
||||
**(Silling 2005)**
|
||||
Silling Askari, Computer and Structures, 83, 1526-1535 (2005).
|
||||
|
||||
**(Silling 2007)**
|
||||
Silling, Epton, Weckner, Xu, Askari, J Elasticity, 88, 151-184 (2007).
|
||||
|
||||
**(Singh)**
|
||||
Singh and Warner, Acta Mater, 58, 5797-5805 (2010),
|
||||
|
||||
**(Singraber, Behler and Dellago 2019)**
|
||||
Singraber, A.; Behler, J.; Dellago, C. J., Chem. Theory Comput. 2019, 15 (3), 1827-1840
|
||||
|
||||
**(Singraber et al 2019)**
|
||||
Singraber, A.; Morawietz, T.; Behler, J.; Dellago, C., J. Chem. Theory Comput. 2019, 15 (5), 3075-3092.
|
||||
|
||||
**(Sirk1)**
|
||||
Sirk TW, Sliozberg YR, Brennan JK, Lisal M, Andzelm JW, J Chem Phys, 136 (13) 134903, 2012.
|
||||
|
||||
@ -1368,9 +1081,6 @@ Bibliography
|
||||
**(Snodin)**
|
||||
B.E. Snodin, F. Randisi, M. Mosayebi, et al., J. Chem. Phys. 142, 234901 (2015).
|
||||
|
||||
**(Son)**
|
||||
Son, McDaniel, Cui and Yethiraj, J Phys Chem Lett, 10, 7523 (2019).
|
||||
|
||||
**(Srivastava)**
|
||||
Zhigilei, Wei, Srivastava, Phys. Rev. B 71, 165417 (2005).
|
||||
|
||||
@ -1380,12 +1090,6 @@ Bibliography
|
||||
**(Steinhardt)**
|
||||
P.\ Steinhardt, D. Nelson, and M. Ronchetti, Phys. Rev. B 28, 784 (1983).
|
||||
|
||||
**(Steward)**
|
||||
Stewart, Spearot, Modelling Simul. Mater. Sci. Eng. 21, 045003, (2013).
|
||||
|
||||
**(Stewart2018)**
|
||||
J.A. Stewart, et al. (2018) Journal of Applied Physics, 123(16), 165902.
|
||||
|
||||
**(Stiles)**
|
||||
Stiles , Hubbard, and Kayser, J Chem Phys, 77, 6189 (1982).
|
||||
|
||||
@ -1443,21 +1147,12 @@ Bibliography
|
||||
**(Tainter 2015)**
|
||||
Tainter, Shi, and Skinner, 11, 2268 (2015)
|
||||
|
||||
**(Tang and Toennies)**
|
||||
J Chem Phys, 80, 3726 (1984).
|
||||
|
||||
**(Tee)**
|
||||
Tee and Searles, J. Chem. Phys. 156, 184101 (2022).
|
||||
|
||||
**(Templeton2010)**
|
||||
Templeton, JA; Jones, RE; Wagner, GJ, "Application of a field-based method to spatially varying thermal transport problems in molecular dynamics." Modelling and Simulation in Materials Science and Engineering (2010), 18:085007.
|
||||
|
||||
**(Templeton2011)**
|
||||
Templeton, JA; Jones, RE; Lee, JW; Zimmerman, JA; Wong, BM, "A long-range electric field solver for molecular dynamics based on atomistic-to-continuum modeling." Journal of Chemical Theory and Computation (2011), 7:1736.
|
||||
|
||||
**(tenWolde)**
|
||||
P.\ R. ten Wolde, M. J. Ruiz-Montero, D. Frenkel, J. Chem. Phys. 104, 9932 (1996).
|
||||
|
||||
**(Tersoff_1)**
|
||||
J.\ Tersoff, Phys Rev B, 37, 6991 (1988).
|
||||
|
||||
@ -1500,9 +1195,6 @@ Bibliography
|
||||
**(Tranchida)**
|
||||
Tranchida, Plimpton, Thibaudeau and Thompson, Journal of Computational Physics, 372, 406-425, (2018).
|
||||
|
||||
**(Tribello)**
|
||||
G.A. Tribello, M. Bonomi, D. Branduardi, C. Camilloni and G. Bussi, Comp. Phys. Comm 185, 604 (2014)
|
||||
|
||||
**(Tsuji et al, 1992)**
|
||||
Tsuji, Y., Tanaka, T., & Ishida, T. (1992). Lagrangian numerical simulation of plug flow of cohesionless particles in a horizontal pipe. Powder technology, 71(3),
|
||||
|
||||
@ -1521,9 +1213,6 @@ Bibliography
|
||||
**(Tuckerman4)**
|
||||
Tuckerman, Mundy, Balasubramanian, Klein, J Chem Phys, 106, 5615 (1997).
|
||||
|
||||
**(Tyagi)**
|
||||
Tyagi, Suzen, Sega, Barbosa, Kantorovich, Holm, J Chem Phys, 132, 154112 (2010)
|
||||
|
||||
**(Ulomek)**
|
||||
Ulomek, Brien, Foiles, Mohles, Modelling Simul. Mater. Sci. Eng. 23 (2015) 025007
|
||||
|
||||
@ -1533,15 +1222,6 @@ Bibliography
|
||||
**(Valone)**
|
||||
Valone, Baskes, Martin, Phys. Rev. B, 73, 214209 (2006).
|
||||
|
||||
**(vanWijk)**
|
||||
M. M. van Wijk, A. Schuring, M. I. Katsnelson, and A. Fasolino, Physical Review Letters, 113, 135504 (2014)
|
||||
|
||||
**(Van Workum)**
|
||||
K. Van Workum et al., J. Chem. Phys. 125 144506 (2006)
|
||||
|
||||
**(Vargas and McCarthy 2001)**
|
||||
Vargas, W.L. and McCarthy, J.J. (2001).
|
||||
|
||||
**(Varshalovich)**
|
||||
Varshalovich, Moskalev, Khersonskii, Quantum Theory of Angular Momentum, World Scientific, Singapore (1987).
|
||||
|
||||
@ -1554,9 +1234,6 @@ Bibliography
|
||||
**(Veld)**
|
||||
In 't Veld, Ismail, Grest, J Chem Phys, 127, 144711 (2007).
|
||||
|
||||
**(Verstraelen)**
|
||||
Verstraelen, Ayers, Speybroeck, Waroquier, J. Chem. Phys. 138, 074108 (2013).
|
||||
|
||||
**(Volkov1)**
|
||||
Volkov and Zhigilei, J Phys Chem C, 114, 5513 (2010).
|
||||
|
||||
@ -1581,9 +1258,6 @@ Bibliography
|
||||
**(Wang et al, 2015)**
|
||||
Wang, Y., Alonso-Marroquin, F., & Guo, W. W. (2015). Rolling and sliding in 3-D discrete element models. Particuology, 23, 49-55.
|
||||
|
||||
**(Wang2020)**
|
||||
X. Wang, S. Ramirez-Hinestrosa, J. Dobnikar, and D. Frenkel, Phys. Chem. Chem. Phys. 22, 10624 (2020).
|
||||
|
||||
**(Wang1)**
|
||||
J.\ Wang, H. S. Yu, P. A. Langston, F. Y. Fraige, Granular Matter, 13, 1 (2011).
|
||||
|
||||
@ -1623,9 +1297,6 @@ Bibliography
|
||||
**(Wicaksono2)**
|
||||
Wicaksono, figshare, https://doi.org/10.6084/m9.figshare.1488628.v1 (2015).
|
||||
|
||||
**(Winkler)**
|
||||
Winkler, Wysocki, and Gompper, Soft Matter, 11, 6680 (2015).
|
||||
|
||||
**(Wirnsberger)**
|
||||
Wirnsberger, Frenkel, and Dellago, J Chem Phys, 143, 124104 (2015).
|
||||
|
||||
@ -1638,27 +1309,9 @@ Bibliography
|
||||
**(Wood)**
|
||||
Wood and Thompson, J Chem Phys, 148, 241721, (2018)
|
||||
|
||||
**(Xie23)**
|
||||
Xie, S.R., Rupp, M. & Hennig, R.G. Ultra-fast interpretable machine-learning potentials. npj Comput Mater 9, 162 (2023). https://doi.org/10.1038/s41524-023-01092-7
|
||||
|
||||
**(Yade-DEM)**
|
||||
V. Smilauer et al. (2021), Yade Documentation 3rd ed.
|
||||
|
||||
**(Yanxon2020)**
|
||||
Yanxon, Zagaceta, Tang, Matteson, Zhu, Mach. Learn.: Sci. Technol. 2, 027001 (2020).
|
||||
|
||||
**(Yeh)**
|
||||
Yeh and Berkowitz, J Chem Phys, 111, 3155 (1999).
|
||||
|
||||
**(Yuan2010a)**
|
||||
Yuan, Huang, Li, Lykotrafitis, Zhang, Phys. Rev. E, 82, 011905(2010).
|
||||
|
||||
**(Yuan2010b)**
|
||||
Yuan, Huang, Zhang, Soft. Matter, 6, 4571(2010).
|
||||
|
||||
**(Zagaceta2020)**
|
||||
Zagaceta, Yanxon, Zhu, J Appl Phys, 128, 045113 (2020).
|
||||
|
||||
**(ZBL)**
|
||||
J.F. Ziegler, J.P. Biersack, U. Littmark, 'Stopping and Ranges of Ions in Matter' Vol 1, 1985, Pergamon Press.
|
||||
|
||||
@ -1728,6 +1381,17 @@ Bibliography
|
||||
**(Zimmerman2010)**
|
||||
Zimmerman, JA; Jones, RE; Templeton, JA, "A material frame approach for evaluating continuum variables in atomistic simulations." Journal of Computational Physics (2010), 229:2364.
|
||||
|
||||
**(de Buyl)**
|
||||
de Buyl, Colberg and Hofling, H5MD: A structured, efficient, and portable file format for molecular data, Comp. Phys. Comm. 185(6), 1546-1553 (2014) -
|
||||
|
||||
**(de Koning)**
|
||||
de Koning and Antonelli, Phys Rev E, 53, 465 (1996).
|
||||
|
||||
**(electronic stopping)**
|
||||
Wikipedia - Electronic Stopping Power: https://en.wikipedia.org/wiki/Stopping_power_%28particle_radiation%29
|
||||
|
||||
**(tenWolde)**
|
||||
P.\ R. ten Wolde, M. J. Ruiz-Montero, D. Frenkel, J. Chem. Phys. 104, 9932 (1996).
|
||||
|
||||
**(vanWijk)**
|
||||
M.\ M. van Wijk, A. Schuring, M. I. Katsnelson, and A. Fasolino, Physical Review Letters, 113, 135504 (2014)
|
||||
|
||||
@ -37,9 +37,8 @@ standard. A more detailed discussion of that is below.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
-D BUILD_MPI=value # yes or no, default is yes if CMake finds MPI
|
||||
-D BUILD_OMP=value # yes or no, default is yes if a compatible
|
||||
# compiler is detected
|
||||
-D BUILD_MPI=value # yes or no, default is yes if CMake finds MPI, else no
|
||||
-D BUILD_OMP=value # yes or no, default is yes if a compatible compiler is detected
|
||||
-D LAMMPS_MACHINE=name # name = mpi, serial, mybox, titan, laptop, etc
|
||||
# no default value
|
||||
|
||||
@ -55,9 +54,9 @@ standard. A more detailed discussion of that is below.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
make mpi # parallel build, produces lmp_mpi using Makefile.mpi
|
||||
make serial # serial build, produces lmp_serial using Makefile/serial
|
||||
make mybox # uses Makefile.mybox to produce lmp_mybox
|
||||
make mpi # parallel build, produces lmp_mpi using Makefile.mpi
|
||||
make serial # serial build, produces lmp_serial using Makefile/serial
|
||||
make mybox # uses Makefile.mybox to produce lmp_mybox
|
||||
|
||||
Any ``make machine`` command will look up the make settings from a
|
||||
file ``Makefile.machine`` in the folder ``src/MAKE`` or one of its
|
||||
@ -75,15 +74,15 @@ standard. A more detailed discussion of that is below.
|
||||
this is ``-fopenmp``\ , which can be added to the ``CC`` and
|
||||
``LINK`` makefile variables.
|
||||
|
||||
For the serial build the following make variables are set (see ``src/MAKE/Makefile.serial``):
|
||||
For the serial build the following make variables are set (see src/MAKE/Makefile.serial):
|
||||
|
||||
.. code-block:: make
|
||||
|
||||
CC = g++
|
||||
LINK = g++
|
||||
MPI_INC = -I../STUBS
|
||||
MPI_PATH = -L../STUBS
|
||||
MPI_LIB = -lmpi_stubs
|
||||
CC = g++
|
||||
LINK = g++
|
||||
MPI_INC = -I../STUBS
|
||||
MPI_PATH = -L../STUBS
|
||||
MPI_LIB = -lmpi_stubs
|
||||
|
||||
You also need to build the STUBS library for your platform before
|
||||
making LAMMPS itself. A ``make serial`` build does this for you
|
||||
@ -91,7 +90,7 @@ standard. A more detailed discussion of that is below.
|
||||
directory, or ``make`` from the ``src/STUBS`` dir. If the build
|
||||
fails, you may need to edit the ``STUBS/Makefile`` for your
|
||||
platform. The stubs library does not provide MPI/IO functions
|
||||
required by some LAMMPS packages, e.g. ``LATBOLTZ``,
|
||||
required by some LAMMPS packages, e.g. ``MPIIO`` or ``LATBOLTZ``,
|
||||
and thus is not compatible with those packages.
|
||||
|
||||
.. note::
|
||||
@ -129,13 +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 ``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.
|
||||
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
|
||||
@ -232,32 +232,24 @@ LAMMPS.
|
||||
.. code-block:: bash
|
||||
|
||||
# Building with GNU Compilers:
|
||||
cmake -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ \
|
||||
-DCMAKE_Fortran_COMPILER=gfortran ../cmake
|
||||
# Building with Intel Classic Compilers:
|
||||
cmake -DCMAKE_C_COMPILER=icc -DCMAKE_CXX_COMPILER=icpc \
|
||||
-DCMAKE_Fortran_COMPILER=ifort ../cmake
|
||||
cmake ../cmake -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_Fortran_COMPILER=gfortran
|
||||
# Building with Intel Compilers:
|
||||
cmake ../cmake -DCMAKE_C_COMPILER=icc -DCMAKE_CXX_COMPILER=icpc -DCMAKE_Fortran_COMPILER=ifort
|
||||
# Building with Intel oneAPI Compilers:
|
||||
cmake -DCMAKE_C_COMPILER=icx -DCMAKE_CXX_COMPILER=icpx \
|
||||
-DCMAKE_Fortran_COMPILER=ifx ../cmake
|
||||
cmake ../cmake -DCMAKE_C_COMPILER=icx -DCMAKE_CXX_COMPILER=icpx -DCMAKE_Fortran_COMPILER=ifx
|
||||
# Building with LLVM/Clang Compilers:
|
||||
cmake -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ \
|
||||
-DCMAKE_Fortran_COMPILER=flang ../cmake
|
||||
cmake ../cmake -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_Fortran_COMPILER=flang
|
||||
# Building with PGI/Nvidia Compilers:
|
||||
cmake -DCMAKE_C_COMPILER=pgcc -DCMAKE_CXX_COMPILER=pgc++ \
|
||||
-DCMAKE_Fortran_COMPILER=pgfortran ../cmake
|
||||
# Building with the NVHPC Compilers:
|
||||
cmake -DCMAKE_C_COMPILER=nvc -DCMAKE_CXX_COMPILER=nvc++ \
|
||||
-DCMAKE_Fortran_COMPILER=nvfortran ../cmake
|
||||
cmake ../cmake -DCMAKE_C_COMPILER=pgcc -DCMAKE_CXX_COMPILER=pgc++ -DCMAKE_Fortran_COMPILER=pgfortran
|
||||
|
||||
For compiling with the Clang/LLVM compilers a CMake preset is
|
||||
provided that can be loaded with
|
||||
``-C ../cmake/presets/clang.cmake``. Similarly,
|
||||
``-C ../cmake/presets/intel.cmake`` should switch the compiler
|
||||
toolchain to the legacy Intel compilers, ``-C ../cmake/presets/oneapi.cmake``
|
||||
`-C ../cmake/presets/clang.cmake`. Similarly,
|
||||
`-C ../cmake/presets/intel.cmake` should switch the compiler
|
||||
toolchain to the legacy Intel compilers, `-C ../cmake/presets/oneapi.cmake`
|
||||
will switch to the LLVM based oneAPI Intel compilers,
|
||||
``-C ../cmake/presets/pgi.cmake`` will switch the compiler to the PGI compilers,
|
||||
and ``-C ../cmake/presets/nvhpc.cmake`` will switch to the NVHPC compilers.
|
||||
and `-C ../cmake/presets/pgi.cmake`
|
||||
will switch the compiler to the PGI compilers.
|
||||
|
||||
Furthermore, you can set ``CMAKE_TUNE_FLAGS`` to specifically add
|
||||
compiler flags to tune for optimal performance on given hosts.
|
||||
@ -268,7 +260,7 @@ LAMMPS.
|
||||
When the cmake command completes, it prints a summary to the
|
||||
screen which compilers it is using and what flags and settings
|
||||
will be used for the compilation. Note that if the top-level
|
||||
compiler is ``mpicxx``, it is simply a wrapper on a real compiler.
|
||||
compiler is mpicxx, it is simply a wrapper on a real compiler.
|
||||
The underlying compiler info is what CMake will try to
|
||||
determine and report. You should check to confirm you are
|
||||
using the compiler and optimization flags you want.
|
||||
@ -287,19 +279,19 @@ LAMMPS.
|
||||
|
||||
.. code-block:: make
|
||||
|
||||
CC = mpicxx
|
||||
CCFLAGS = -g -O3
|
||||
LINK = mpicxx
|
||||
LINKFLAGS = -g -O
|
||||
CC = mpicxx
|
||||
CCFLAGS = -g -O3
|
||||
LINK = mpicxx
|
||||
LINKFLAGS = -g -O
|
||||
|
||||
Serial build with GNU gcc (see ``src/MAKE/Makefile.serial``):
|
||||
|
||||
.. code-block:: make
|
||||
|
||||
CC = g++
|
||||
CCFLAGS = -g -O3
|
||||
LINK = g++
|
||||
LINKFLAGS = -g -O
|
||||
CC = g++
|
||||
CCFLAGS = -g -O3
|
||||
LINK = g++
|
||||
LINKFLAGS = -g -O
|
||||
|
||||
.. note::
|
||||
|
||||
@ -325,10 +317,10 @@ LAMMPS.
|
||||
there may be specific compiler or linker flags that are either
|
||||
required or recommended to enable required features and to
|
||||
achieve optimal performance. You need to include these in the
|
||||
``CCFLAGS`` and ``LINKFLAGS`` settings above. For details, see the
|
||||
CCFLAGS and LINKFLAGS settings above. For details, see the
|
||||
documentation for the individual packages listed on the
|
||||
:doc:`Speed_packages` page. Or examine these files in the
|
||||
``src/MAKE/OPTIONS`` directory. They correspond to each of the 5
|
||||
src/MAKE/OPTIONS directory. They correspond to each of the 5
|
||||
accelerator packages and their hardware variants:
|
||||
|
||||
.. code-block:: bash
|
||||
@ -397,8 +389,7 @@ running LAMMPS from Python via its library interface.
|
||||
|
||||
make machine # build LAMMPS executable lmp_machine
|
||||
make mode=static machine # same as "make machine"
|
||||
make mode=shared machine # build LAMMPS shared lib liblammps_machine.so
|
||||
# instead
|
||||
make mode=shared machine # build LAMMPS shared lib liblammps_machine.so instead
|
||||
|
||||
The "static" build will generate a static library called
|
||||
``liblammps_machine.a`` and an executable named ``lmp_machine``\ ,
|
||||
@ -460,7 +451,7 @@ installation.
|
||||
Including or removing debug support
|
||||
-----------------------------------
|
||||
|
||||
By default the compilation settings will include the ``-g`` flag which
|
||||
By default the compilation settings will include the *-g* flag which
|
||||
instructs the compiler to include debug information (e.g. which line of
|
||||
source code a particular instruction correspond to). This can be
|
||||
extremely useful in case LAMMPS crashes and can help to provide crucial
|
||||
@ -473,7 +464,7 @@ If this is a concern, you can change the compilation settings or remove
|
||||
the debug information from the LAMMPS executable:
|
||||
|
||||
- **Traditional make**: edit your ``Makefile.<machine>`` to remove the
|
||||
``-g`` flag from the ``CCFLAGS`` and ``LINKFLAGS`` definitions
|
||||
*-g* flag from the ``CCFLAGS`` and ``LINKFLAGS`` definitions
|
||||
- **CMake**: use ``-D CMAKE_BUILD_TYPE=Release`` or explicitly reset
|
||||
the applicable compiler flags (best done using the text mode or
|
||||
graphical user interface).
|
||||
@ -498,10 +489,9 @@ using CMake or Make.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
-D BUILD_TOOLS=value # yes or no (default). Build binary2txt,
|
||||
# chain.x, micelle2d.x, msi2lmp, phana,
|
||||
# stl_bin2txt
|
||||
-D BUILD_LAMMPS_GUI=value # yes or no (default). Build LAMMPS-GUI
|
||||
-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).
|
||||
@ -516,9 +506,8 @@ using CMake or Make.
|
||||
make chain # build only chain tool
|
||||
make micelle2d # build only micelle2d tool
|
||||
|
||||
.. note::
|
||||
|
||||
Building the LAMMPS-GUI *requires* building LAMMPS with CMake.
|
||||
cd lammps/tools/lammps-shell
|
||||
make # build LAMMPS shell
|
||||
|
||||
----------
|
||||
|
||||
|
||||
@ -16,7 +16,8 @@ environments is on a :doc:`separate page <Howto_cmake>`.
|
||||
|
||||
.. note::
|
||||
|
||||
LAMMPS currently requires that CMake version 3.16 or later is available.
|
||||
LAMMPS currently requires that CMake version 3.10 or later is available;
|
||||
version 3.12 or later is preferred.
|
||||
|
||||
.. warning::
|
||||
|
||||
@ -33,18 +34,19 @@ Advantages of using CMake
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
CMake is an alternative to compiling LAMMPS in the traditional way
|
||||
through :doc:`(manually customized) makefiles <Build_make>`. Using
|
||||
CMake has multiple advantages that are specifically helpful for
|
||||
people with limited experience in compiling software or for people
|
||||
that want to modify or extend LAMMPS.
|
||||
through :doc:`(manually customized) makefiles <Build_make>` and a recent
|
||||
addition to LAMMPS thanks to the efforts of Christoph Junghans (LANL)
|
||||
and Richard Berger (Temple U). Using CMake has multiple advantages that
|
||||
are specifically helpful for people with limited experience in compiling
|
||||
software or for people that want to modify or extend LAMMPS.
|
||||
|
||||
- CMake can detect available hardware, tools, features, and libraries
|
||||
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 command line, text
|
||||
mode, or graphical user interface. No manual editing of files,
|
||||
knowledge of file formats or complex command line syntax is required.
|
||||
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
|
||||
@ -131,20 +133,20 @@ file called ``CMakeLists.txt`` (for LAMMPS it is located in the
|
||||
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
|
||||
*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.
|
||||
user interface. The *-D* flag can be used several times in one command.
|
||||
|
||||
For your convenience, we provide :ref:`CMake presets <cmake_presets>`
|
||||
that combine multiple settings to enable optional LAMMPS packages or use
|
||||
a different compiler tool chain. Those are loaded with the ``-C`` flag
|
||||
a different compiler tool chain. Those are loaded with the *-C* flag
|
||||
(``-C ../cmake/presets/basic.cmake``). This step would only be needed
|
||||
once, as the settings from the preset files are stored in the
|
||||
``CMakeCache.txt`` file. It is also possible to customize the build
|
||||
by adding one or more ``-D`` flags to the CMake command line.
|
||||
by adding one or more *-D* flags to the CMake command line.
|
||||
|
||||
Generating files for alternate build tools (e.g. Ninja) and project files
|
||||
for IDEs like Eclipse, CodeBlocks, or Kate can be selected using the ``-G``
|
||||
for IDEs like Eclipse, CodeBlocks, or Kate can be selected using the *-G*
|
||||
command line flag. A list of available generator settings for your
|
||||
specific CMake version is given when running ``cmake --help``.
|
||||
|
||||
@ -171,19 +173,19 @@ files. E.g. with:
|
||||
In that case the resulting binaries are not in the build folder directly
|
||||
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:
|
||||
configuration is selected with the *-C* flag:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
ctest -C Debug
|
||||
|
||||
The CMake scripts in LAMMPS have basic support for being compiled using
|
||||
a multi-config build system, but not all of it has been ported. This is
|
||||
in particular applicable to compiling packages that require additional
|
||||
libraries that would be downloaded and compiled by CMake. The
|
||||
``windows.cmake`` preset file tries to keep track of which packages can
|
||||
be compiled natively with the MSVC compilers out-of-the box. Not all of
|
||||
the external libraries are portable to Windows, either.
|
||||
The CMake scripts in LAMMPS have basic support for being compiled using a
|
||||
multi-config build system, but not all of it has been ported. This is in
|
||||
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.
|
||||
|
||||
|
||||
Installing CMake
|
||||
|
||||
@ -88,8 +88,8 @@ on recording all commands required to do the compilation.
|
||||
|
||||
.. _sanitizer:
|
||||
|
||||
Address, Leak, Undefined Behavior, and Thread Sanitizer Support (CMake only)
|
||||
----------------------------------------------------------------------------
|
||||
Address, Undefined Behavior, and Thread Sanitizer Support (CMake only)
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Compilers such as GCC and Clang support generating instrumented binaries
|
||||
which use different sanitizer libraries to detect problems in the code
|
||||
@ -110,7 +110,6 @@ compilation and linking stages. This is done through setting the
|
||||
|
||||
-D ENABLE_SANITIZER=none # no sanitizer active (default)
|
||||
-D ENABLE_SANITIZER=address # enable address sanitizer / memory leak checker
|
||||
-D ENABLE_SANITIZER=hwaddress # enable hardware assisted address sanitizer / memory leak checker
|
||||
-D ENABLE_SANITIZER=leak # enable memory leak checker (only)
|
||||
-D ENABLE_SANITIZER=undefined # enable undefined behavior sanitizer
|
||||
-D ENABLE_SANITIZER=thread # enable thread sanitizer
|
||||
@ -123,44 +122,32 @@ Code Coverage and Unit Testing (CMake only)
|
||||
-------------------------------------------
|
||||
|
||||
The LAMMPS code is subject to multiple levels of automated testing
|
||||
during development:
|
||||
|
||||
- Integration testing (i.e. whether the code compiles
|
||||
on various platforms and with a variety of compilers and settings),
|
||||
- Unit testing (i.e. whether certain functions or classes of the code
|
||||
produce the expected results for given inputs),
|
||||
- Run testing (i.e. whether selected input decks can run to completion
|
||||
without crashing for multiple configurations),
|
||||
- Regression testing (i.e. whether selected input examples reproduce the
|
||||
same results over a given number of steps and operations within a
|
||||
given error margin).
|
||||
|
||||
The status of this automated testing can be viewed on `https://ci.lammps.org
|
||||
<https://ci.lammps.org>`_.
|
||||
during development: integration testing (i.e. whether the code compiles
|
||||
on various platforms and with a variety of settings), unit testing
|
||||
(i.e. whether certain individual parts of the code produce the expected
|
||||
results for given inputs), run testing (whether selected complete input
|
||||
decks run without crashing for multiple configurations), and regression
|
||||
testing (i.e. whether selected input examples reproduce the same
|
||||
results over a given number of steps and operations within a given
|
||||
error margin). The status of this automated testing can be viewed on
|
||||
`https://ci.lammps.org <https://ci.lammps.org>`_.
|
||||
|
||||
The scripts and inputs for integration, run, and regression testing
|
||||
are maintained in a
|
||||
`separate repository <https://github.com/lammps/lammps-testing>`_
|
||||
of the LAMMPS project on GitHub. A few tests are also run as GitHub
|
||||
Actions and their configuration files are in the ``.github/workflows/``
|
||||
folder of the LAMMPS git tree.
|
||||
of the LAMMPS project on GitHub.
|
||||
|
||||
The unit testing facility is integrated into the CMake build process of
|
||||
the LAMMPS source code distribution itself. It can be enabled by
|
||||
The unit testing facility is integrated into the CMake build process
|
||||
of the LAMMPS source code distribution itself. It can be enabled by
|
||||
setting ``-D ENABLE_TESTING=on`` during the CMake configuration step.
|
||||
It requires the `YAML <https://pyyaml.org/>`_ library and matching
|
||||
development headers to compile (if those are not found locally a recent
|
||||
version of that library will be downloaded and compiled along with
|
||||
LAMMPS and the test programs) and will download and compile a specific
|
||||
version of the `GoogleTest <https://github.com/google/googletest/>`_ C++
|
||||
test framework that is used to implement the tests. Those unit tests
|
||||
may be combined with memory access and leak checking with valgrind
|
||||
(see below for how to enable it). In that case, running so-called
|
||||
death tests will create a lot of false positives and thus they can be
|
||||
disabled by configuring compilation with the additional setting
|
||||
``-D SKIP_DEATH_TESTS=on``.
|
||||
It requires the `YAML <https://pyyaml.org/>`_ library and development
|
||||
headers (if those are not found locally a recent version will be
|
||||
downloaded and compiled along with LAMMPS and the test program) to
|
||||
compile and will download and compile a specific recent version of the
|
||||
`Googletest <https://github.com/google/googletest/>`_ C++ test framework
|
||||
for implementing the tests.
|
||||
|
||||
.. admonition:: Software version and LAMMPS configuration requirements
|
||||
.. admonition:: Software version requirements for testing
|
||||
:class: note
|
||||
|
||||
The compiler and library version requirements for the testing
|
||||
@ -168,7 +155,7 @@ disabled by configuring compilation with the additional setting
|
||||
example the default GNU C++ and Fortran compilers of RHEL/CentOS 7.x
|
||||
(version 4.8.x) are not sufficient. The CMake configuration will try
|
||||
to detect incompatible versions and either skip incompatible tests or
|
||||
stop with an error. Also the number of available tests will depend on
|
||||
stop with an error. Also the number of tests will depend on
|
||||
installed LAMMPS packages, development environment, operating system,
|
||||
and configuration settings.
|
||||
|
||||
@ -181,24 +168,24 @@ The output of this command will be looking something like this:
|
||||
$ ctest
|
||||
Test project /home/akohlmey/compile/lammps/build-testing
|
||||
Start 1: RunLammps
|
||||
1/563 Test #1: RunLammps .................................. Passed 0.28 sec
|
||||
1/563 Test #1: RunLammps .......................................... Passed 0.28 sec
|
||||
Start 2: HelpMessage
|
||||
2/563 Test #2: HelpMessage ................................ Passed 0.06 sec
|
||||
2/563 Test #2: HelpMessage ........................................ Passed 0.06 sec
|
||||
Start 3: InvalidFlag
|
||||
3/563 Test #3: InvalidFlag ................................ Passed 0.06 sec
|
||||
3/563 Test #3: InvalidFlag ........................................ Passed 0.06 sec
|
||||
Start 4: Tokenizer
|
||||
4/563 Test #4: Tokenizer .................................. Passed 0.05 sec
|
||||
4/563 Test #4: Tokenizer .......................................... Passed 0.05 sec
|
||||
Start 5: MemPool
|
||||
5/563 Test #5: MemPool .................................... Passed 0.05 sec
|
||||
5/563 Test #5: MemPool ............................................ Passed 0.05 sec
|
||||
Start 6: ArgUtils
|
||||
6/563 Test #6: ArgUtils ................................... Passed 0.05 sec
|
||||
6/563 Test #6: ArgUtils ........................................... Passed 0.05 sec
|
||||
[...]
|
||||
Start 561: ImproperStyle:zero
|
||||
561/563 Test #561: ImproperStyle:zero ......................... Passed 0.07 sec
|
||||
561/563 Test #561: ImproperStyle:zero ................................. Passed 0.07 sec
|
||||
Start 562: TestMliapPyUnified
|
||||
562/563 Test #562: TestMliapPyUnified ......................... Passed 0.16 sec
|
||||
562/563 Test #562: TestMliapPyUnified ................................. Passed 0.16 sec
|
||||
Start 563: TestPairList
|
||||
563/563 Test #563: TestPairList ............................... Passed 0.06 sec
|
||||
563/563 Test #563: TestPairList ....................................... Passed 0.06 sec
|
||||
|
||||
100% tests passed, 0 tests failed out of 563
|
||||
|
||||
@ -213,25 +200,24 @@ The output of this command will be looking something like this:
|
||||
The ``ctest`` command has many options, the most important ones are:
|
||||
|
||||
.. list-table::
|
||||
:widths: 20 80
|
||||
|
||||
* - Option
|
||||
- Function
|
||||
* - ``-V``
|
||||
* - -V
|
||||
- verbose output: display output of individual test runs
|
||||
* - ``-j <num>``
|
||||
* - -j <num>
|
||||
- parallel run: run <num> tests in parallel
|
||||
* - ``-R <regex>``
|
||||
* - -R <regex>
|
||||
- run subset of tests matching the regular expression <regex>
|
||||
* - ``-E <regex>``
|
||||
* - -E <regex>
|
||||
- exclude subset of tests matching the regular expression <regex>
|
||||
* - ``-L <regex>``
|
||||
* - -L <regex>
|
||||
- run subset of tests with a label matching the regular expression <regex>
|
||||
* - ``-LE <regex>``
|
||||
* - -LE <regex>
|
||||
- exclude subset of tests with a label matching the regular expression <regex>
|
||||
* - ``-N``
|
||||
* - -N
|
||||
- dry-run: display list of tests without running them
|
||||
* - ``-T memcheck``
|
||||
* - -T memcheck
|
||||
- run tests with valgrind memory checker (if available)
|
||||
|
||||
In its full implementation, the unit test framework will consist of multiple
|
||||
@ -248,31 +234,12 @@ will be skipped if prerequisite features are not available in LAMMPS.
|
||||
time. Preference is given to parts of the code base that are easy to
|
||||
test or commonly used.
|
||||
|
||||
Tests as shown by the ``ctest`` program are command lines defined in the
|
||||
``CMakeLists.txt`` files in the ``unittest`` directory tree. A few
|
||||
tests simply execute LAMMPS with specific command line flags and check
|
||||
the output to the screen for expected content. A large number of unit
|
||||
tests are special tests programs using the `GoogleTest framework
|
||||
<https://github.com/google/googletest/>`_ and linked to the LAMMPS
|
||||
library that test individual functions or create a LAMMPS class
|
||||
instance, execute one or more commands and check data inside the LAMMPS
|
||||
class hierarchy. There are also tests for the C-library, Fortran, and
|
||||
Python module interfaces to LAMMPS. The Python tests use the Python
|
||||
"unittest" module in a similar fashion than the others use `GoogleTest`.
|
||||
These special test programs are structured to perform multiple
|
||||
individual tests internally and each of those contains several checks
|
||||
(aka assertions) for internal data being changed as expected.
|
||||
|
||||
Tests for force computing or modifying styles (e.g. styles for non-bonded
|
||||
and bonded interactions and selected fixes) are run by using a more generic
|
||||
test program that reads its input from files in YAML format. The YAML file
|
||||
provides the information on how to customized the test program to test
|
||||
a specific style and - if needed - with specific settings.
|
||||
To add a test for another, similar style (e.g. a new pair style) it is
|
||||
usually sufficient to add a suitable YAML file. :doc:`Detailed
|
||||
instructions for adding tests <Developer_unittest>` are provided in the
|
||||
Programmer Guide part of the manual. A description of what happens
|
||||
during the tests is given below.
|
||||
Tests for styles of the same kind of style (e.g. pair styles or bond
|
||||
styles) are performed with the same test executable using different
|
||||
input files in YAML format. So to add a test for another style of the
|
||||
same kind it may be sufficient to add a suitable YAML file.
|
||||
:doc:`Detailed instructions for adding tests <Developer_unittest>` are
|
||||
provided in the Programmer Guide part of the manual.
|
||||
|
||||
Unit tests for force styles
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@ -288,18 +255,16 @@ A test run is then a a collection multiple individual test runs each
|
||||
with many comparisons to reference results based on template input
|
||||
files, individual command settings, relative error margins, and
|
||||
reference data stored in a YAML format file with ``.yaml``
|
||||
suffix. Currently the programs ``test_pair_style``, ``test_bond_style``,
|
||||
``test_angle_style``, ``test_dihedral_style``, and
|
||||
``test_improper_style`` are implemented. They will compare forces,
|
||||
energies and (global) stress for all atoms after a ``run 0`` calculation
|
||||
and after a few steps of MD with :doc:`fix nve <fix_nve>`, each in
|
||||
multiple variants with different settings and also for multiple
|
||||
accelerated styles. If a prerequisite style or package is missing, the
|
||||
individual tests are skipped. All force style tests will be executed on
|
||||
a single MPI process, so using the CMake option ``-D BUILD_MPI=off`` can
|
||||
significantly speed up testing, since this will skip the MPI
|
||||
initialization for each test run. Below is an example command and
|
||||
output:
|
||||
suffix. Currently the programs ``test_pair_style``, ``test_bond_style``, and
|
||||
``test_angle_style`` are implemented. They will compare forces, energies and
|
||||
(global) stress for all atoms after a ``run 0`` calculation and after a
|
||||
few steps of MD with :doc:`fix nve <fix_nve>`, each in multiple variants
|
||||
with different settings and also for multiple accelerated styles. If a
|
||||
prerequisite style or package is missing, the individual tests are
|
||||
skipped. All tests will be executed on a single MPI process, so using
|
||||
the CMake option ``-D BUILD_MPI=off`` can significantly speed up testing,
|
||||
since this will skip the MPI initialization for each test run.
|
||||
Below is an example command and output:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
@ -337,17 +302,16 @@ paths in the individual source files.
|
||||
The force style test programs have a common set of options:
|
||||
|
||||
.. list-table::
|
||||
:widths: 25 75
|
||||
|
||||
* - Option
|
||||
- Function
|
||||
* - ``-g <newfile>``
|
||||
* - -g <newfile>
|
||||
- regenerate reference data in new YAML file
|
||||
* - ``-u``
|
||||
* - -u
|
||||
- update reference data in the original YAML file
|
||||
* - ``-s``
|
||||
* - -s
|
||||
- print error statistics for each group of comparisons
|
||||
* - ``-v``
|
||||
* - -v
|
||||
- verbose output: also print the executed LAMMPS commands
|
||||
|
||||
The ``ctest`` tool has no mechanism to directly pass flags to the individual
|
||||
@ -361,10 +325,10 @@ set in an environment variable ``TEST_ARGS``. Example:
|
||||
To add a test for a style that is not yet covered, it is usually best
|
||||
to copy a YAML file for a similar style to a new file, edit the details
|
||||
of the style (how to call it, how to set its coefficients) and then
|
||||
run test command with either the ``-g`` and the replace the initial
|
||||
test file with the regenerated one or the ``-u`` option. The ``-u`` option
|
||||
run test command with either the *-g* and the replace the initial
|
||||
test file with the regenerated one or the *-u* option. The *-u* option
|
||||
will destroy the original file, if the generation run does not complete,
|
||||
so using ``-g`` is recommended unless the YAML file is fully tested
|
||||
so using *-g* is recommended unless the YAML file is fully tested
|
||||
and working.
|
||||
|
||||
Some of the force style tests are rather slow to run and some are very
|
||||
@ -452,16 +416,15 @@ When compiling LAMMPS with enabled tests, most test executables will
|
||||
need to be linked against the LAMMPS library. Since this can be a very
|
||||
large library with many C++ objects when many packages are enabled, link
|
||||
times can become very long on machines that use the GNU BFD linker (e.g.
|
||||
Linux systems). Alternatives like the ``mold`` linker, the ``lld``
|
||||
linker of the LLVM project, or the ``gold`` linker available with GNU
|
||||
binutils can speed up this step substantially (in this order). CMake
|
||||
will by default test if any of the three can be enabled and use it when
|
||||
``ENABLE_TESTING`` is active. It can also be selected manually through
|
||||
the ``CMAKE_CUSTOM_LINKER`` CMake variable. Allowed values are
|
||||
``mold``, ``lld``, ``gold``, ``bfd``, or ``default``. The ``default``
|
||||
option will use the system default linker otherwise, the linker is
|
||||
chosen explicitly. This option is only available for the GNU or Clang
|
||||
C++ compilers.
|
||||
Linux systems). Alternatives like the ``lld`` linker of the LLVM project
|
||||
or the ``gold`` linker available with GNU binutils can speed up this step
|
||||
substantially. CMake will by default test if any of the two can be
|
||||
enabled and use it when ``ENABLE_TESTING`` is active. It can also be
|
||||
selected manually through the ``CMAKE_CUSTOM_LINKER`` CMake variable.
|
||||
Allowed values are ``lld``, ``gold``, ``bfd``, or ``default``. The
|
||||
``default`` option will use the system default linker otherwise, the
|
||||
linker is chosen explicitly. This option is only available for the
|
||||
GNU or Clang C++ compiler.
|
||||
|
||||
Tests for other components and utility functions
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@ -514,51 +477,27 @@ After post-processing with ``gen_coverage_html`` the results are in
|
||||
a folder ``coverage_html`` and can be viewed with a web browser.
|
||||
The images below illustrate how the data is presented.
|
||||
|
||||
.. only:: not latex
|
||||
.. list-table::
|
||||
|
||||
.. list-table::
|
||||
* - .. figure:: JPG/coverage-overview-top.png
|
||||
:scale: 25%
|
||||
|
||||
* - .. figure:: JPG/coverage-overview-top.png
|
||||
:scale: 25%
|
||||
Top of the overview page
|
||||
|
||||
Top of the overview page
|
||||
- .. figure:: JPG/coverage-overview-manybody.png
|
||||
:scale: 25%
|
||||
|
||||
- .. figure:: JPG/coverage-overview-manybody.png
|
||||
:scale: 25%
|
||||
Styles with good coverage
|
||||
|
||||
Styles with good coverage
|
||||
- .. figure:: JPG/coverage-file-top.png
|
||||
:scale: 25%
|
||||
|
||||
- .. figure:: JPG/coverage-file-top.png
|
||||
:scale: 25%
|
||||
Top of individual source page
|
||||
|
||||
Top of individual source page
|
||||
- .. figure:: JPG/coverage-file-branches.png
|
||||
:scale: 25%
|
||||
|
||||
- .. figure:: JPG/coverage-file-branches.png
|
||||
:scale: 25%
|
||||
|
||||
Source page with branches
|
||||
|
||||
.. only:: latex
|
||||
|
||||
.. figure:: JPG/coverage-overview-top.png
|
||||
:width: 60%
|
||||
|
||||
Top of the overview page
|
||||
|
||||
.. figure:: JPG/coverage-overview-manybody.png
|
||||
:width: 60%
|
||||
|
||||
Styles with good coverage
|
||||
|
||||
.. figure:: JPG/coverage-file-top.png
|
||||
:width: 60%
|
||||
|
||||
Top of individual source page
|
||||
|
||||
.. figure:: JPG/coverage-file-branches.png
|
||||
:width: 60%
|
||||
|
||||
Source page with branches
|
||||
Source page with branches
|
||||
|
||||
Coding style utilities
|
||||
----------------------
|
||||
@ -579,8 +518,6 @@ The following options are available.
|
||||
make fix-errordocs # remove error docs in header files
|
||||
make check-permissions # search for files with permissions issues
|
||||
make fix-permissions # correct permissions issues in files
|
||||
make check-docs # search for several issues in the manual
|
||||
make check-version # list files with pending release version tags
|
||||
make check # run all check targets from above
|
||||
|
||||
These should help to make source and documentation files conforming
|
||||
@ -630,35 +567,11 @@ The following target are available for both, GNU make and CMake:
|
||||
GitHub command line interface
|
||||
-----------------------------
|
||||
|
||||
GitHub has developed a `command line tool <https://cli.github.com>`_
|
||||
to interact with the GitHub website via a command called ``gh``.
|
||||
This is extremely convenient when working with a Git repository hosted
|
||||
on GitHub (like LAMMPS). It is thus highly recommended to install it
|
||||
when doing LAMMPS development. To use ``gh`` you must be within a git
|
||||
checkout of a repository and you must obtain an authentication token
|
||||
to connect your checkout with a GitHub user. This is done with the
|
||||
command: ``gh auth login`` where you then have to follow the prompts.
|
||||
Here are some examples:
|
||||
GitHub is developing a `tool for the command line
|
||||
<https://cli.github.com>`_ that interacts with the GitHub website via a
|
||||
command called ``gh``. This can be extremely convenient when working
|
||||
with a Git repository hosted on GitHub (like LAMMPS). It is thus highly
|
||||
recommended to install it when doing LAMMPS development.
|
||||
|
||||
.. list-table::
|
||||
:header-rows: 1
|
||||
:widths: 34 66
|
||||
|
||||
* - Command
|
||||
- Description
|
||||
* - ``gh pr list``
|
||||
- List currently open pull requests
|
||||
* - ``gh pr checks 404``
|
||||
- Shows the status of all checks for pull request #404
|
||||
* - ``gh pr view 404``
|
||||
- Shows the description and recent comments for pull request #404
|
||||
* - ``gh co 404``
|
||||
- Check out the branch from pull request #404; set up for pushing changes
|
||||
* - ``gh issue list``
|
||||
- List currently open issues
|
||||
* - ``gh issue view 430 --comments``
|
||||
- Shows the description and all comments for issue #430
|
||||
|
||||
The capabilities of the ``gh`` command are continually expanding, so
|
||||
for more details please see the documentation at https://cli.github.com/manual/
|
||||
or use ``gh --help`` or ``gh <command> --help`` for embedded help.
|
||||
The capabilities of the ``gh`` command is continually expanding, so
|
||||
please see the documentation at https://cli.github.com/manual/
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -37,7 +37,7 @@ executable code from the library is copied into the calling executable.
|
||||
.. tab:: CMake build
|
||||
|
||||
This assumes that LAMMPS has been configured without setting a
|
||||
``LAMMPS_MACHINE`` name, installed with ``make install``, and the
|
||||
``LAMMPS_MACHINE`` name, installed with "make install", and the
|
||||
``PKG_CONFIG_PATH`` environment variable has been updated to
|
||||
include the ``liblammps.pc`` file installed into the configured
|
||||
destination folder. The commands to compile and link a coupled
|
||||
@ -45,8 +45,8 @@ executable code from the library is copied into the calling executable.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
mpicc -c -O $(pkg-config --cflags liblammps) caller.c
|
||||
mpicxx -o caller caller.o -$(pkg-config --libs liblammps)
|
||||
mpicc -c -O $(pkgconf liblammps --cflags) caller.c
|
||||
mpicxx -o caller caller.o -$(pkgconf liblammps --libs)
|
||||
|
||||
.. tab:: Traditional make
|
||||
|
||||
@ -59,10 +59,10 @@ executable code from the library is copied into the calling executable.
|
||||
mpicc -c -O -I${HOME}/lammps/src caller.c
|
||||
mpicxx -o caller caller.o -L${HOME}/lammps/src -llammps_mpi
|
||||
|
||||
The ``-I`` argument is the path to the location of the ``library.h``
|
||||
The *-I* argument is the path to the location of the ``library.h``
|
||||
header file containing the interface to the LAMMPS C-style library
|
||||
interface. The ``-L`` argument is the path to where the
|
||||
``liblammps_mpi.a`` file is located. The ``-llammps_mpi`` argument
|
||||
interface. The *-L* argument is the path to where the
|
||||
``liblammps_mpi.a`` file is located. The *-llammps_mpi* argument
|
||||
is shorthand for telling the compiler to link the file
|
||||
``liblammps_mpi.a``. If LAMMPS has been built as a shared
|
||||
library, then the linker will use ``liblammps_mpi.so`` instead.
|
||||
@ -142,7 +142,7 @@ 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 be specified when linking
|
||||
the calling executable. Only the ``-I`` flags are needed. So the example
|
||||
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:
|
||||
|
||||
@ -155,8 +155,8 @@ POEMS package installed becomes:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
mpicc -c -O $(pkg-config --cflags liblammps) caller.c
|
||||
mpicxx -o caller caller.o -$(pkg-config --libs liblammps)
|
||||
mpicc -c -O $(pkgconf liblammps --cflags) caller.c
|
||||
mpicxx -o caller caller.o -$(pkgconf --libs)
|
||||
|
||||
.. tab:: Traditional make
|
||||
|
||||
|
||||
@ -25,7 +25,7 @@ additional tools to be available and functioning.
|
||||
require adding flags like ``-std=c++11`` to enable the C++11 mode.
|
||||
* 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``
|
||||
* 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.
|
||||
|
||||
@ -55,6 +55,7 @@ packages:
|
||||
* :ref:`ML-POD <ml-pod>`
|
||||
* :ref:`ML-QUIP <ml-quip>`
|
||||
* :ref:`MOLFILE <molfile>`
|
||||
* :ref:`MSCG <mscg>`
|
||||
* :ref:`NETCDF <netcdf>`
|
||||
* :ref:`OPENMP <openmp>`
|
||||
* :ref:`OPT <opt>`
|
||||
@ -62,7 +63,6 @@ packages:
|
||||
* :ref:`POEMS <poems>`
|
||||
* :ref:`PYTHON <python>`
|
||||
* :ref:`QMMM <qmmm>`
|
||||
* :ref:`RHEO <rheo>`
|
||||
* :ref:`SCAFACOS <scafacos>`
|
||||
* :ref:`VORONOI <voronoi>`
|
||||
* :ref:`VTK <vtk>`
|
||||
@ -100,10 +100,10 @@ versus make.
|
||||
.. code-block:: bash
|
||||
|
||||
cd lammps/src
|
||||
make ps # check which packages are currently installed
|
||||
make yes-name # install a package with name
|
||||
make no-name # uninstall a package with name
|
||||
make mpi # build LAMMPS with whatever packages are now installed
|
||||
make ps # check which packages are currently installed
|
||||
make yes-name # install a package with name
|
||||
make no-name # uninstall a package with name
|
||||
make mpi # build LAMMPS with whatever packages are now installed
|
||||
|
||||
Examples:
|
||||
|
||||
@ -172,41 +172,17 @@ make a copy of one of them and modify it to suit your needs.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
# enable just a few core packages
|
||||
cmake -C ../cmake/presets/basic.cmake [OPTIONS] ../cmake
|
||||
|
||||
# enable most packages
|
||||
cmake -C ../cmake/presets/most.cmake [OPTIONS] ../cmake
|
||||
|
||||
# enable packages which download sources or potential files
|
||||
cmake -C ../cmake/presets/download.cmake [OPTIONS] ../cmake
|
||||
|
||||
# disable packages that do require extra libraries or tools
|
||||
cmake -C ../cmake/presets/nolib.cmake [OPTIONS] ../cmake
|
||||
|
||||
# change settings to use the Clang compilers by default
|
||||
cmake -C ../cmake/presets/clang.cmake [OPTIONS] ../cmake
|
||||
|
||||
# change settings to use the GNU compilers by default
|
||||
cmake -C ../cmake/presets/gcc.cmake [OPTIONS] ../cmake
|
||||
|
||||
# change settings to use the Intel compilers by default
|
||||
cmake -C ../cmake/presets/intel.cmake [OPTIONS] ../cmake
|
||||
|
||||
# change settings to use the PGI compilers by default
|
||||
cmake -C ../cmake/presets/pgi.cmake [OPTIONS] ../cmake
|
||||
|
||||
# enable all packages
|
||||
cmake -C ../cmake/presets/all_on.cmake [OPTIONS] ../cmake
|
||||
|
||||
# disable all packages
|
||||
cmake -C ../cmake/presets/all_off.cmake [OPTIONS] ../cmake
|
||||
|
||||
# compile with MinGW cross-compilers
|
||||
mingw64-cmake -C ../cmake/presets/mingw-cross.cmake [OPTIONS] ../cmake
|
||||
|
||||
# compile serial multi-arch binaries on macOS
|
||||
cmake -C ../cmake/presets/macos-multiarch.cmake [OPTIONS] ../cmake
|
||||
cmake -C ../cmake/presets/basic.cmake [OPTIONS] ../cmake # enable just a few core packages
|
||||
cmake -C ../cmake/presets/most.cmake [OPTIONS] ../cmake # enable most packages
|
||||
cmake -C ../cmake/presets/download.cmake [OPTIONS] ../cmake # enable packages which download sources or potential files
|
||||
cmake -C ../cmake/presets/nolib.cmake [OPTIONS] ../cmake # disable packages that do require extra libraries or tools
|
||||
cmake -C ../cmake/presets/clang.cmake [OPTIONS] ../cmake # change settings to use the Clang compilers by default
|
||||
cmake -C ../cmake/presets/gcc.cmake [OPTIONS] ../cmake # change settings to use the GNU compilers by default
|
||||
cmake -C ../cmake/presets/intel.cmake [OPTIONS] ../cmake # change settings to use the Intel compilers by default
|
||||
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
|
||||
|
||||
Presets that have names starting with "windows" are specifically for
|
||||
compiling LAMMPS :doc:`natively on Windows <Build_windows>` and
|
||||
@ -232,8 +208,7 @@ Example
|
||||
# GPU package and configure it for using CUDA. You can run.
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -C ../cmake/presets/most.cmake -C ../cmake/presets/nolib.cmake \
|
||||
-D PKG_GPU=on -D GPU_API=cuda ../cmake
|
||||
cmake -C ../cmake/presets/most.cmake -C ../cmake/presets/nolib.cmake -D PKG_GPU=on -D GPU_API=cuda ../cmake
|
||||
|
||||
# to add another package, say BODY to the previous configuration you can run:
|
||||
cmake -D PKG_BODY=on .
|
||||
|
||||
@ -1,7 +1,3 @@
|
||||
.. raw:: latex
|
||||
|
||||
\clearpage
|
||||
|
||||
Optional build settings
|
||||
=======================
|
||||
|
||||
@ -12,8 +8,7 @@ explains how to do this for building both with CMake and make.
|
||||
* `FFT library`_ for use with the :doc:`kspace_style pppm <kspace_style>` command
|
||||
* `Size of LAMMPS integer types and size limits`_
|
||||
* `Read or write compressed files`_
|
||||
* `Output of JPEG, PNG, and movie files`_ via the :doc:`dump image <dump_image>` or :doc:`dump movie <dump_image>` commands
|
||||
* `Support for downloading files`_
|
||||
* `Output of JPG, PNG, and move files` via the :doc:`dump image <dump_image>` or :doc:`dump movie <dump_image>` commands
|
||||
* `Memory allocation alignment`_
|
||||
* `Workaround for long long integers`_
|
||||
* `Exception handling when using LAMMPS as a library`_ to capture errors
|
||||
@ -24,7 +19,7 @@ explains how to do this for building both with CMake and make.
|
||||
.. _cxx11:
|
||||
|
||||
C++11 standard compliance
|
||||
-------------------------
|
||||
------------------------------------------
|
||||
|
||||
A C++11 standard compatible compiler is a requirement for compiling LAMMPS.
|
||||
LAMMPS version 3 March 2020 is the last version compatible with the previous
|
||||
@ -36,16 +31,12 @@ flags to enable C++11 compliance. Example for GNU c++ 4.8.x:
|
||||
|
||||
CCFLAGS = -g -O3 -std=c++11
|
||||
|
||||
Individual packages may require compliance with a later C++ standard
|
||||
like C++14 or C++17. These requirements will be documented with the
|
||||
:doc:`individual packages <Packages_details>`.
|
||||
|
||||
----------
|
||||
|
||||
.. _fft:
|
||||
|
||||
FFT library
|
||||
-----------
|
||||
---------------------
|
||||
|
||||
When the KSPACE package is included in a LAMMPS build, the
|
||||
:doc:`kspace_style pppm <kspace_style>` command performs 3d FFTs which
|
||||
@ -53,36 +44,21 @@ require use of an FFT library to compute 1d FFTs. The KISS FFT
|
||||
library is included with LAMMPS, but other libraries can be faster.
|
||||
LAMMPS can use them if they are available on your system.
|
||||
|
||||
.. versionadded:: 7Feb2024
|
||||
|
||||
Alternatively, LAMMPS can use the `heFFTe
|
||||
<https://icl-utk-edu.github.io/heffte/>`_ library for the MPI
|
||||
communication algorithms, which comes with many optimizations for
|
||||
special cases, e.g. leveraging available 2D and 3D FFTs in the back end
|
||||
libraries and better pipelining for packing and communication.
|
||||
|
||||
.. tabs::
|
||||
|
||||
.. tab:: CMake build
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
-D FFT=value # FFTW3 or MKL or KISS, default is FFTW3 if found,
|
||||
# else KISS
|
||||
-D FFT_KOKKOS=value # FFTW3 or MKL or KISS or CUFFT or HIPFFT,
|
||||
# default is KISS
|
||||
-D FFT=value # FFTW3 or MKL or KISS, default is FFTW3 if found, else KISS
|
||||
-D FFT_SINGLE=value # yes or no (default), no = double precision
|
||||
-D FFT_PACK=value # array (default) or pointer or memcpy
|
||||
-D FFT_USE_HEFFTE=value # yes or no (default), yes links to heFFTe
|
||||
|
||||
.. note::
|
||||
|
||||
When the Kokkos variant of a package is compiled and selected at run time,
|
||||
the FFT library selected by the ``FFT_KOKKOS`` variable applies. Otherwise,
|
||||
the FFT library selected by the FFT variable applies.
|
||||
The same FFT settings apply to both. ``FFT_KOKKOS`` must be compatible with the
|
||||
Kokkos back end - for example, when using the CUDA back end of Kokkos,
|
||||
you must use either ``CUFFT`` or ``KISS``.
|
||||
The values for the FFT variable must be in upper-case. This is
|
||||
an exception to the rule that all CMake variables can be specified
|
||||
with lower-case values.
|
||||
|
||||
Usually these settings are all that is needed. If FFTW3 is
|
||||
selected, then CMake will try to detect, if threaded FFTW
|
||||
@ -100,17 +76,6 @@ libraries and better pipelining for packing and communication.
|
||||
-D MKL_INCLUDE_DIR=path # ditto for Intel MKL library
|
||||
-D FFT_MKL_THREADS=on # enable using threaded FFTs with MKL libraries
|
||||
-D MKL_LIBRARY=path # path to MKL libraries
|
||||
-D FFT_HEFFTE_BACKEND=value # FFTW or MKL or empty/undefined for the stock
|
||||
# heFFTe back end
|
||||
-D Heffte_ROOT=path # path to an existing heFFTe installation
|
||||
|
||||
.. note::
|
||||
|
||||
heFFTe comes with a builtin (= stock) back end for FFTs, i.e. a
|
||||
default internal FFT implementation; however, this stock back
|
||||
end is intended for testing purposes only and is not optimized
|
||||
for production runs.
|
||||
|
||||
|
||||
.. tab:: Traditional make
|
||||
|
||||
@ -120,74 +85,32 @@ libraries and better pipelining for packing and communication.
|
||||
|
||||
.. code-block:: make
|
||||
|
||||
FFT_INC = -DFFT_<NAME> # where <NAME> is KISS (default), FFTW3,
|
||||
# FFTW (same as FFTW3), or MKL
|
||||
FFT_INC = -DFFT_KOKKOS_<NAME> # where <NAME> is KISS (default), FFTW3,
|
||||
# FFTW (same as FFTW3), MKL, CUFFT, or HIPFFT
|
||||
FFT_INC = -DFFT_SINGLE # do not specify for double precision
|
||||
FFT_INC = -DFFT_FFTW_THREADS # enable using threaded FFTW3 libraries
|
||||
FFT_INC = -DFFT_MKL_THREADS # enable using threaded FFTs with MKL libraries
|
||||
FFT_INC = -DFFT_PACK_ARRAY # or -DFFT_PACK_POINTER or -DFFT_PACK_MEMCPY
|
||||
# default is FFT_PACK_ARRAY if not specified
|
||||
FFT_INC = -DFFT_FFTW3 # -DFFT_FFTW3, -DFFT_FFTW (same as -DFFT_FFTW3), -DFFT_MKL, or -DFFT_KISS
|
||||
# default is KISS if not specified
|
||||
FFT_INC = -DFFT_SINGLE # do not specify for double precision
|
||||
FFT_INC = -DFFT_FFTW_THREADS # enable using threaded FFTW3 libraries
|
||||
FFT_INC = -DFFT_MKL_THREADS # enable using threaded FFTs with MKL libraries
|
||||
FFT_INC = -DFFT_PACK_ARRAY # or -DFFT_PACK_POINTER or -DFFT_PACK_MEMCPY
|
||||
# default is FFT_PACK_ARRAY if not specified
|
||||
|
||||
.. code-block:: make
|
||||
|
||||
FFT_INC = -I/usr/local/include
|
||||
FFT_PATH = -L/usr/local/lib
|
||||
|
||||
# hipFFT either precision
|
||||
FFT_LIB = -lhipfft
|
||||
|
||||
# cuFFT either precision
|
||||
FFT_LIB = -lcufft
|
||||
|
||||
# FFTW3 double precision
|
||||
FFT_LIB = -lfftw3
|
||||
|
||||
# FFTW3 double precision with threads (needs -DFFT_FFTW_THREADS)
|
||||
FFT_LIB = -lfftw3 -lfftw3_omp
|
||||
|
||||
# FFTW3 single precision
|
||||
FFT_LIB = -lfftw3 -lfftw3f
|
||||
|
||||
# serial MKL with Intel compiler
|
||||
FFT_LIB = -lmkl_intel_lp64 -lmkl_sequential -lmkl_core
|
||||
|
||||
# serial MKL with GNU compiler
|
||||
FFT_LIB = -lmkl_gf_lp64 -lmkl_sequential -lmkl_core
|
||||
|
||||
# threaded MKL with Intel compiler
|
||||
FFT_LIB = -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core
|
||||
|
||||
# threaded MKL with GNU compiler
|
||||
FFT_LIB = -lmkl_gf_lp64 -lmkl_gnu_thread -lmkl_core
|
||||
|
||||
# MKL with automatic runtime selection of interface libs
|
||||
FFT_LIB = -lmkl_rt
|
||||
FFT_INC = -I/usr/local/include
|
||||
FFT_PATH = -L/usr/local/lib
|
||||
FFT_LIB = -lfftw3 # FFTW3 double precision
|
||||
FFT_LIB = -lfftw3 -lfftw3_omp # FFTW3 double precision with threads (needs -DFFT_FFTW_THREADS)
|
||||
FFT_LIB = -lfftw3 -lfftw3f # FFTW3 single precision
|
||||
FFT_LIB = -lmkl_intel_lp64 -lmkl_sequential -lmkl_core # MKL with Intel compiler, serial interface
|
||||
FFT_LIB = -lmkl_gf_lp64 -lmkl_sequential -lmkl_core # MKL with GNU compiler, serial interface
|
||||
FFT_LIB = -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core # MKL with Intel compiler, threaded interface
|
||||
FFT_LIB = -lmkl_gf_lp64 -lmkl_gnu_thread -lmkl_core # MKL with GNU compiler, threaded interface
|
||||
FFT_LIB = -lmkl_rt # MKL with automatic runtime selection of interface libs
|
||||
|
||||
As with CMake, you do not need to set paths in ``FFT_INC`` or
|
||||
``FFT_PATH``, if the compiler can find the FFT header and library
|
||||
files in its default search path. You must specify ``FFT_LIB``
|
||||
with the appropriate FFT libraries to include in the link.
|
||||
|
||||
Traditional make can also link to heFFTe using an existing installation
|
||||
|
||||
.. code-block:: make
|
||||
|
||||
include <path-to-heffte-installation>/share/heffte/HeffteMakefile.in
|
||||
FFT_INC = -DFFT_HEFFTE -DFFT_HEFFTE_FFTW $(heffte_include)
|
||||
FFT_PATH =
|
||||
FFT_LIB = $(heffte_link) $(heffte_libs)
|
||||
|
||||
The heFFTe install path will contain ``HeffteMakefile.in``.
|
||||
which will define the ``heffte_`` include variables needed to link to heFFTe from
|
||||
an external project using traditional make.
|
||||
The ``-DFFT_HEFFTE`` is required to switch to using heFFTe, while the optional ``-DFFT_HEFFTE_FFTW``
|
||||
selects the desired heFFTe back end, e.g., ``-DFFT_HEFFTE_FFTW`` or ``-DFFT_HEFFTE_MKL``,
|
||||
omitting the variable will default to the `stock` back end.
|
||||
The heFFTe `stock` back end is intended to be used for testing and debugging,
|
||||
but is not performance optimized for large scale production runs.
|
||||
|
||||
The `KISS FFT library <https://github.com/mborgerding/kissfft>`_ is
|
||||
included in the LAMMPS distribution. It is portable across all
|
||||
platforms. Depending on the size of the FFTs and the number of
|
||||
@ -211,18 +134,13 @@ it from `www.fftw.org <https://www.fftw.org>`_. LAMMPS requires version
|
||||
Building FFTW for your box should be as simple as ``./configure; make;
|
||||
make install``. The install command typically requires root privileges
|
||||
(e.g. invoke it via sudo), unless you specify a local directory with
|
||||
the ``--prefix`` option of configure. Type ``./configure --help`` to see
|
||||
the "--prefix" option of configure. Type ``./configure --help`` to see
|
||||
various options.
|
||||
|
||||
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).
|
||||
|
||||
The cuFFT and hipFFT FFT libraries are packaged with NVIDIA's CUDA and
|
||||
AMD's HIP installations, respectively. These FFT libraries require the
|
||||
Kokkos acceleration package to be enabled and the Kokkos back end to be
|
||||
GPU-resident (i.e., HIP or CUDA).
|
||||
|
||||
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
|
||||
@ -234,11 +152,11 @@ 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 ensure that
|
||||
the FFTW3 installation includes support for single-precision.
|
||||
When using ``-DFFT_SINGLE`` with FFTW3, you may need to build the FFTW
|
||||
library a second time with support for single-precision.
|
||||
|
||||
When compiler FFTW3 from source, you can do the following, which should
|
||||
produce the additional libraries ``libfftw3f.a`` and/or ``libfftw3f.so``\ .
|
||||
For FFTW3, do the following, which should produce the additional
|
||||
library ``libfftw3f.a`` or ``libfftw3f.so``\ .
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
@ -247,27 +165,13 @@ produce the additional libraries ``libfftw3f.a`` and/or ``libfftw3f.so``\ .
|
||||
|
||||
Performing 3d FFTs requires communication to transpose the 3d FFT
|
||||
grid. The data packing/unpacking for this can be done in one of 3
|
||||
modes (ARRAY, POINTER, MEMCPY) as set by the ``FFT_PACK`` syntax above.
|
||||
modes (ARRAY, POINTER, MEMCPY) as set by the FFT_PACK syntax above.
|
||||
Depending on the machine, the size of the FFT grid, the number of
|
||||
processors used, one option may be slightly faster. The default is
|
||||
ARRAY mode.
|
||||
|
||||
When using ``-DFFT_HEFFTE`` CMake will first look for an existing
|
||||
install with hints provided by ``-DHeffte_ROOT``, as recommended by the
|
||||
CMake standard and note that the name is case sensitive. If CMake cannot
|
||||
find a heFFTe installation with the correct back end (e.g., FFTW or
|
||||
MKL), it will attempt to download and build the library automatically.
|
||||
In this case, LAMMPS CMake will also accept all heFFTe specific
|
||||
variables listed in the `heFFTe documentation
|
||||
<https://mkstoyanov.bitbucket.io/heffte/md_doxygen_installation.html>`_
|
||||
and those variables will be passed into the heFFTe build.
|
||||
|
||||
----------
|
||||
|
||||
.. raw:: latex
|
||||
|
||||
\clearpage
|
||||
|
||||
.. _size:
|
||||
|
||||
Size of LAMMPS integer types and size limits
|
||||
@ -308,7 +212,7 @@ LAMMPS system size restrictions
|
||||
|
||||
.. list-table::
|
||||
:header-rows: 1
|
||||
:widths: 18 27 28 27
|
||||
:widths: auto
|
||||
:align: center
|
||||
|
||||
* -
|
||||
@ -377,8 +281,8 @@ in whichever ``lib/gpu/Makefile`` is used must be the same as above.
|
||||
|
||||
.. _graphics:
|
||||
|
||||
Output of JPEG, PNG, and movie files
|
||||
------------------------------------
|
||||
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
|
||||
@ -391,13 +295,12 @@ requires the following settings:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
-D WITH_JPEG=value # yes or no
|
||||
# default = yes if CMake finds JPEG development files, else no
|
||||
-D WITH_PNG=value # yes or no
|
||||
# default = yes if CMake finds PNG and ZLIB development files,
|
||||
# else no
|
||||
-D WITH_FFMPEG=value # yes or no
|
||||
# default = yes if CMake can find ffmpeg, else no
|
||||
-D WITH_JPEG=value # yes or no
|
||||
# default = yes if CMake finds JPEG files, else no
|
||||
-D WITH_PNG=value # yes or no
|
||||
# default = yes if CMake finds PNG and ZLIB files, else no
|
||||
-D WITH_FFMPEG=value # yes or no
|
||||
# default = yes if CMake can find ffmpeg, else no
|
||||
|
||||
Usually these settings are all that is needed. If CMake cannot
|
||||
find the graphics header, library, executable files, you can set
|
||||
@ -419,10 +322,8 @@ requires the following settings:
|
||||
|
||||
LMP_INC = -DLAMMPS_JPEG -DLAMMPS_PNG -DLAMMPS_FFMPEG <other LMP_INC settings>
|
||||
|
||||
JPG_INC = -I/usr/local/include # path to jpeglib.h, png.h, zlib.h headers
|
||||
# if make cannot find them
|
||||
JPG_PATH = -L/usr/lib # paths to libjpeg.a, libpng.a, libz.a (.so)
|
||||
# files if make cannot find them
|
||||
JPG_INC = -I/usr/local/include # path to jpeglib.h, png.h, zlib.h header files if make cannot find them
|
||||
JPG_PATH = -L/usr/lib # paths to libjpeg.a, libpng.a, libz.a (.so) files if make cannot find them
|
||||
JPG_LIB = -ljpeg -lpng -lz # library names
|
||||
|
||||
As with CMake, you do not need to set ``JPG_INC`` or ``JPG_PATH``,
|
||||
@ -453,8 +354,8 @@ 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>`. Supported compression tools and algorithms are currently
|
||||
``gzip``, ``bzip2``, ``zstd``, ``xz``, ``lz4``, and ``lzma`` (via xz).
|
||||
:doc:`dump <dump>`. Supported compression tools are currently
|
||||
``gzip``, ``bzip2``, ``zstd``, and ``lzma``.
|
||||
|
||||
.. tabs::
|
||||
|
||||
@ -462,8 +363,8 @@ including :doc:`read_data <read_data>`, :doc:`rerun <rerun>`, and
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
-D WITH_GZIP=value # yes or no
|
||||
# default is yes if CMake can find the gzip program
|
||||
-D WITH_GZIP=value # yes or no
|
||||
# default is yes if CMake can find the gzip program, else no
|
||||
|
||||
.. tab:: Traditional make
|
||||
|
||||
@ -485,64 +386,18 @@ during a run.
|
||||
available using a compression library instead, which is what the
|
||||
:ref:`COMPRESS package <PKG-COMPRESS>` enables.
|
||||
|
||||
--------------------------------------------------
|
||||
|
||||
.. _libcurl:
|
||||
|
||||
Support for downloading files
|
||||
-----------------------------
|
||||
|
||||
.. versionadded:: 29Aug2024
|
||||
|
||||
The :doc:`geturl command <geturl>` command uses the `the libcurl library
|
||||
<https://curl.se/libcurl/>`_ to download files. This requires that
|
||||
LAMMPS is compiled accordingly which needs the following settings:
|
||||
|
||||
.. tabs::
|
||||
|
||||
.. tab:: CMake build
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
-D WITH_CURL=value # yes or no
|
||||
# default = yes if CMake finds CURL development files, else no
|
||||
|
||||
Usually these settings are all that is needed. If CMake cannot
|
||||
find the graphics header, library, executable files, you can set
|
||||
these variables:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
-D CURL_INCLUDE_DIR=path # path to folder which contains curl.h header file
|
||||
-D CURL_LIBRARY=path # path to libcurls.a (.so) file
|
||||
|
||||
.. tab:: Traditional make
|
||||
|
||||
.. code-block:: make
|
||||
|
||||
LMP_INC = -DLAMMPS_CURL <other LMP_INC settings>
|
||||
|
||||
CURL_INC = -I/usr/local/include # path to curl folder with curl.h
|
||||
CURL_PATH = -L/usr/lib # paths to libcurl.a(.so) if make cannot find it
|
||||
CURL_LIB = -lcurl # library names
|
||||
|
||||
As with CMake, you do not need to set ``CURL_INC`` or ``CURL_PATH``,
|
||||
if make can find the libcurl header and library files in their
|
||||
default system locations. You must specify ``CURL_LIB`` with a
|
||||
paths or linker flags to link to libcurl.
|
||||
|
||||
----------
|
||||
|
||||
.. _align:
|
||||
|
||||
Memory allocation alignment
|
||||
---------------------------
|
||||
---------------------------------------
|
||||
|
||||
This setting enables the use of the ``posix_memalign()`` call instead of
|
||||
``malloc()`` when LAMMPS allocates large chunks of memory. Vector
|
||||
This setting enables the use of the "posix_memalign()" call instead of
|
||||
"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
|
||||
current operating systems, the "malloc()" implementation returns
|
||||
pointers that are aligned to 16-byte boundaries. Using SSE vector
|
||||
instructions efficiently, however, requires memory blocks being aligned
|
||||
on 64-byte boundaries.
|
||||
@ -556,9 +411,9 @@ on 64-byte boundaries.
|
||||
-D LAMMPS_MEMALIGN=value # 0, 8, 16, 32, 64 (default)
|
||||
|
||||
Use a ``LAMMPS_MEMALIGN`` value of 0 to disable using
|
||||
``posix_memalign()`` and revert to using the ``malloc()`` C-library
|
||||
"posix_memalign()" and revert to using the "malloc()" C-library
|
||||
function instead. When compiling LAMMPS for Windows systems,
|
||||
``malloc()`` will always be used and this setting is ignored.
|
||||
"malloc()" will always be used and this setting is ignored.
|
||||
|
||||
.. tab:: Traditional make
|
||||
|
||||
@ -567,7 +422,7 @@ on 64-byte boundaries.
|
||||
LMP_INC = -DLAMMPS_MEMALIGN=value # 8, 16, 32, 64
|
||||
|
||||
Do not set ``-DLAMMPS_MEMALIGN``, if you want to have memory
|
||||
allocated with the ``malloc()`` function call
|
||||
allocated with the "malloc()" function call
|
||||
instead. ``-DLAMMPS_MEMALIGN`` **cannot** be used on Windows, as
|
||||
Windows different function calls with different semantics for
|
||||
allocating aligned memory, that are not compatible with how LAMMPS
|
||||
@ -604,13 +459,27 @@ those systems:
|
||||
.. _exceptions:
|
||||
|
||||
Exception handling when using LAMMPS as a library
|
||||
-------------------------------------------------
|
||||
------------------------------------------------------------------
|
||||
|
||||
LAMMPS errors do not kill the calling code, but throw an exception. In
|
||||
the C-library interface, the call stack is unwound and control returns
|
||||
to the caller, e.g. to Python or a code that is coupled to LAMMPS. The
|
||||
error status can then be queried. When using C++ directly, the calling
|
||||
code has to be set up to *catch* exceptions thrown from within LAMMPS.
|
||||
This setting is useful when external codes drive LAMMPS as a library.
|
||||
With this option enabled, LAMMPS errors do not kill the calling code.
|
||||
Instead, the call stack is unwound and control returns to the caller,
|
||||
e.g. to Python. Of course, the calling code has to be set up to
|
||||
*catch* exceptions thrown from within LAMMPS.
|
||||
|
||||
.. tabs::
|
||||
|
||||
.. tab:: CMake build
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
-D LAMMPS_EXCEPTIONS=value # yes or no (default)
|
||||
|
||||
.. tab:: Traditional make
|
||||
|
||||
.. code-block:: make
|
||||
|
||||
LMP_INC = -DLAMMPS_EXCEPTIONS <other LMP_INC settings>
|
||||
|
||||
.. note::
|
||||
|
||||
|
||||
@ -1,30 +1,26 @@
|
||||
.. only:: html
|
||||
.. table_from_list::
|
||||
:columns: 3
|
||||
|
||||
.. table_from_list::
|
||||
:columns: 5
|
||||
|
||||
* :doc:`General commands <Commands_all>`
|
||||
* :doc:`Fix styles <Commands_fix>`
|
||||
* :doc:`Compute styles <Commands_compute>`
|
||||
* :doc:`Pair styles <Commands_pair>`
|
||||
* :ref:`Bond styles <bond>`
|
||||
* :ref:`Angle styles <angle>`
|
||||
* :ref:`Dihedral styles <dihedral>`
|
||||
* :ref:`Improper styles <improper>`
|
||||
* :doc:`KSpace styles <Commands_kspace>`
|
||||
* :doc:`Dump styles <Commands_dump>`
|
||||
|
||||
.. raw:: latex
|
||||
|
||||
\clearpage
|
||||
* :doc:`General commands <Commands_all>`
|
||||
* :doc:`Fix styles <Commands_fix>`
|
||||
* :doc:`Compute styles <Commands_compute>`
|
||||
* :doc:`Pair styles <Commands_pair>`
|
||||
* :ref:`Bond styles <bond>`
|
||||
* :ref:`Angle styles <angle>`
|
||||
* :ref:`Dihedral styles <dihedral>`
|
||||
* :ref:`Improper styles <improper>`
|
||||
* :doc:`KSpace styles <Commands_kspace>`
|
||||
* :doc:`Dump styles <Commands_dump>`
|
||||
|
||||
General commands
|
||||
================
|
||||
|
||||
An alphabetic list of general LAMMPS commands.
|
||||
An alphabetic list of general LAMMPS commands. Note that style
|
||||
commands with many variants, can be more easily accessed via the small
|
||||
table above.
|
||||
|
||||
.. table_from_list::
|
||||
:columns: 6
|
||||
:columns: 5
|
||||
|
||||
* :doc:`angle_coeff <angle_coeff>`
|
||||
* :doc:`angle_style <angle_style>`
|
||||
@ -58,7 +54,6 @@ An alphabetic list of general LAMMPS commands.
|
||||
* :doc:`echo <echo>`
|
||||
* :doc:`fix <fix>`
|
||||
* :doc:`fix_modify <fix_modify>`
|
||||
* :doc:`geturl <geturl>`
|
||||
* :doc:`group <group>`
|
||||
* :doc:`if <if>`
|
||||
* :doc:`improper_coeff <improper_coeff>`
|
||||
@ -126,7 +121,7 @@ commands have accelerated versions. This is indicated by an
|
||||
additional letter in parenthesis: k = KOKKOS.
|
||||
|
||||
.. table_from_list::
|
||||
:columns: 6
|
||||
:columns: 5
|
||||
|
||||
* :doc:`dynamical_matrix (k) <dynamical_matrix>`
|
||||
* :doc:`group2ndx <group2ndx>`
|
||||
|
||||
@ -1,7 +1,21 @@
|
||||
.. table_from_list::
|
||||
:columns: 3
|
||||
|
||||
* :doc:`General commands <Commands_all>`
|
||||
* :doc:`Fix styles <Commands_fix>`
|
||||
* :doc:`Compute styles <Commands_compute>`
|
||||
* :doc:`Pair styles <Commands_pair>`
|
||||
* :ref:`Bond styles <bond>`
|
||||
* :ref:`Angle styles <angle>`
|
||||
* :ref:`Dihedral styles <dihedral>`
|
||||
* :ref:`Improper styles <improper>`
|
||||
* :doc:`KSpace styles <Commands_kspace>`
|
||||
* :doc:`Dump styles <Commands_dump>`
|
||||
|
||||
.. _bond:
|
||||
|
||||
Bond styles
|
||||
===========
|
||||
Bond_style potentials
|
||||
=====================
|
||||
|
||||
All LAMMPS :doc:`bond_style <bond_style>` commands. Some styles have
|
||||
accelerated versions. This is indicated by additional letters in
|
||||
@ -9,13 +23,11 @@ parenthesis: g = GPU, i = INTEL, k = KOKKOS, o = OPENMP, t =
|
||||
OPT.
|
||||
|
||||
.. table_from_list::
|
||||
:columns: 5
|
||||
:columns: 4
|
||||
|
||||
* :doc:`none <bond_none>`
|
||||
* :doc:`zero <bond_zero>`
|
||||
* :doc:`hybrid (k) <bond_hybrid>`
|
||||
*
|
||||
*
|
||||
* :doc:`hybrid <bond_hybrid>`
|
||||
*
|
||||
*
|
||||
*
|
||||
@ -42,14 +54,13 @@ OPT.
|
||||
* :doc:`oxdna2/fene <bond_oxdna>`
|
||||
* :doc:`oxrna2/fene <bond_oxdna>`
|
||||
* :doc:`quartic (o) <bond_quartic>`
|
||||
* :doc:`rheo/shell <bond_rheo_shell>`
|
||||
* :doc:`special <bond_special>`
|
||||
* :doc:`table (o) <bond_table>`
|
||||
|
||||
.. _angle:
|
||||
|
||||
Angle styles
|
||||
============
|
||||
Angle_style potentials
|
||||
======================
|
||||
|
||||
All LAMMPS :doc:`angle_style <angle_style>` commands. Some styles have
|
||||
accelerated versions. This is indicated by additional letters in
|
||||
@ -57,13 +68,11 @@ parenthesis: g = GPU, i = INTEL, k = KOKKOS, o = OPENMP, t =
|
||||
OPT.
|
||||
|
||||
.. table_from_list::
|
||||
:columns: 5
|
||||
:columns: 4
|
||||
|
||||
* :doc:`none <angle_none>`
|
||||
* :doc:`zero <angle_zero>`
|
||||
* :doc:`hybrid (k) <angle_hybrid>`
|
||||
*
|
||||
*
|
||||
* :doc:`hybrid <angle_hybrid>`
|
||||
*
|
||||
*
|
||||
*
|
||||
@ -80,7 +89,6 @@ OPT.
|
||||
* :doc:`cosine/shift (o) <angle_cosine_shift>`
|
||||
* :doc:`cosine/shift/exp (o) <angle_cosine_shift_exp>`
|
||||
* :doc:`cosine/squared (o) <angle_cosine_squared>`
|
||||
* :doc:`cosine/squared/restricted (o) <angle_cosine_squared_restricted>`
|
||||
* :doc:`cross <angle_cross>`
|
||||
* :doc:`dipole (o) <angle_dipole>`
|
||||
* :doc:`fourier (o) <angle_fourier>`
|
||||
@ -91,13 +99,13 @@ OPT.
|
||||
* :doc:`mesocnt <angle_mesocnt>`
|
||||
* :doc:`mm3 <angle_mm3>`
|
||||
* :doc:`quartic (o) <angle_quartic>`
|
||||
* :doc:`spica (ko) <angle_spica>`
|
||||
* :doc:`spica (o) <angle_spica>`
|
||||
* :doc:`table (o) <angle_table>`
|
||||
|
||||
.. _dihedral:
|
||||
|
||||
Dihedral styles
|
||||
===============
|
||||
Dihedral_style potentials
|
||||
=========================
|
||||
|
||||
All LAMMPS :doc:`dihedral_style <dihedral_style>` commands. Some styles
|
||||
have accelerated versions. This is indicated by additional letters in
|
||||
@ -105,23 +113,20 @@ parenthesis: g = GPU, i = INTEL, k = KOKKOS, o = OPENMP, t =
|
||||
OPT.
|
||||
|
||||
.. table_from_list::
|
||||
:columns: 5
|
||||
:columns: 4
|
||||
|
||||
* :doc:`none <dihedral_none>`
|
||||
* :doc:`zero <dihedral_zero>`
|
||||
* :doc:`hybrid (k) <dihedral_hybrid>`
|
||||
*
|
||||
*
|
||||
* :doc:`hybrid <dihedral_hybrid>`
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
* :doc:`charmm (iko) <dihedral_charmm>`
|
||||
* :doc:`charmmfsw (k) <dihedral_charmm>`
|
||||
* :doc:`charmmfsw <dihedral_charmm>`
|
||||
* :doc:`class2 (ko) <dihedral_class2>`
|
||||
* :doc:`cosine/shift/exp (o) <dihedral_cosine_shift_exp>`
|
||||
* :doc:`cosine/squared/restricted <dihedral_cosine_squared_restricted>`
|
||||
* :doc:`fourier (io) <dihedral_fourier>`
|
||||
* :doc:`harmonic (iko) <dihedral_harmonic>`
|
||||
* :doc:`helix (o) <dihedral_helix>`
|
||||
@ -136,8 +141,8 @@ OPT.
|
||||
|
||||
.. _improper:
|
||||
|
||||
Improper styles
|
||||
===============
|
||||
Improper_style potentials
|
||||
=========================
|
||||
|
||||
All LAMMPS :doc:`improper_style <improper_style>` commands. Some styles
|
||||
have accelerated versions. This is indicated by additional letters in
|
||||
@ -145,13 +150,11 @@ parenthesis: g = GPU, i = INTEL, k = KOKKOS, o = OPENMP, t =
|
||||
OPT.
|
||||
|
||||
.. table_from_list::
|
||||
:columns: 5
|
||||
:columns: 4
|
||||
|
||||
* :doc:`none <improper_none>`
|
||||
* :doc:`zero <improper_zero>`
|
||||
* :doc:`hybrid (k) <improper_hybrid>`
|
||||
*
|
||||
*
|
||||
* :doc:`hybrid <improper_hybrid>`
|
||||
*
|
||||
*
|
||||
*
|
||||
|
||||
@ -1,7 +1,3 @@
|
||||
.. raw:: latex
|
||||
|
||||
\clearpage
|
||||
|
||||
Commands by category
|
||||
====================
|
||||
|
||||
@ -10,8 +6,8 @@ This page lists most of the LAMMPS commands, grouped by category. The
|
||||
alphabetically. Style options for entries like fix, compute, pair etc.
|
||||
have their own pages where they are listed alphabetically.
|
||||
|
||||
Initialization
|
||||
--------------
|
||||
Initialization:
|
||||
------------------------------
|
||||
|
||||
.. table_from_list::
|
||||
:columns: 5
|
||||
@ -22,8 +18,8 @@ Initialization
|
||||
* :doc:`suffix <suffix>`
|
||||
* :doc:`units <units>`
|
||||
|
||||
Setup simulation box
|
||||
--------------------
|
||||
Setup simulation box:
|
||||
------------------------------
|
||||
|
||||
.. table_from_list::
|
||||
:columns: 4
|
||||
@ -35,8 +31,8 @@ Setup simulation box
|
||||
* :doc:`lattice <lattice>`
|
||||
* :doc:`region <region>`
|
||||
|
||||
Setup atoms
|
||||
-----------
|
||||
Setup atoms:
|
||||
------------------------------
|
||||
|
||||
.. table_from_list::
|
||||
:columns: 4
|
||||
@ -59,8 +55,8 @@ Setup atoms
|
||||
* :doc:`set <set>`
|
||||
* :doc:`velocity <velocity>`
|
||||
|
||||
Force fields
|
||||
------------
|
||||
Force fields:
|
||||
------------------------------
|
||||
|
||||
.. table_from_list::
|
||||
:columns: 4
|
||||
@ -83,8 +79,8 @@ Force fields
|
||||
* :doc:`pair_write <pair_write>`
|
||||
* :doc:`special_bonds <special_bonds>`
|
||||
|
||||
Settings
|
||||
--------
|
||||
Settings:
|
||||
------------------------------
|
||||
|
||||
.. table_from_list::
|
||||
:columns: 4
|
||||
@ -102,8 +98,8 @@ Settings
|
||||
* :doc:`timer <timer>`
|
||||
* :doc:`timestep <timestep>`
|
||||
|
||||
Operations within timestepping (fixes) and diagnostics (computes)
|
||||
-----------------------------------------------------------------
|
||||
Operations within timestepping (fixes) and diagnostics (computes):
|
||||
------------------------------------------------------------------------------------------
|
||||
|
||||
.. table_from_list::
|
||||
:columns: 4
|
||||
@ -115,8 +111,8 @@ Operations within timestepping (fixes) and diagnostics (computes)
|
||||
* :doc:`uncompute <uncompute>`
|
||||
* :doc:`unfix <unfix>`
|
||||
|
||||
Output
|
||||
------
|
||||
Output:
|
||||
------------------------------
|
||||
|
||||
.. table_from_list::
|
||||
:columns: 4
|
||||
@ -135,8 +131,8 @@ Output
|
||||
* :doc:`write_dump <write_dump>`
|
||||
* :doc:`write_restart <write_restart>`
|
||||
|
||||
Actions
|
||||
-------
|
||||
Actions:
|
||||
------------------------------
|
||||
|
||||
.. table_from_list::
|
||||
:columns: 6
|
||||
@ -150,8 +146,8 @@ Actions
|
||||
* :doc:`tad <tad>`
|
||||
* :doc:`temper <temper>`
|
||||
|
||||
Input script control
|
||||
--------------------
|
||||
Input script control:
|
||||
------------------------------
|
||||
|
||||
.. table_from_list::
|
||||
:columns: 7
|
||||
|
||||
@ -1,5 +1,19 @@
|
||||
Compute styles
|
||||
==============
|
||||
.. table_from_list::
|
||||
:columns: 3
|
||||
|
||||
* :doc:`General commands <Commands_all>`
|
||||
* :doc:`Fix styles <Commands_fix>`
|
||||
* :doc:`Compute styles <Commands_compute>`
|
||||
* :doc:`Pair styles <Commands_pair>`
|
||||
* :ref:`Bond styles <bond>`
|
||||
* :ref:`Angle styles <angle>`
|
||||
* :ref:`Dihedral styles <dihedral>`
|
||||
* :ref:`Improper styles <improper>`
|
||||
* :doc:`KSpace styles <Commands_kspace>`
|
||||
* :doc:`Dump styles <Commands_dump>`
|
||||
|
||||
Compute commands
|
||||
================
|
||||
|
||||
An alphabetic list of all LAMMPS :doc:`compute <compute>` commands.
|
||||
Some styles have accelerated versions. This is indicated by
|
||||
@ -7,7 +21,7 @@ additional letters in parenthesis: g = GPU, i = INTEL, k =
|
||||
KOKKOS, o = OPENMP, t = OPT.
|
||||
|
||||
.. table_from_list::
|
||||
:columns: 4
|
||||
:columns: 5
|
||||
|
||||
* :doc:`ackland/atom <compute_ackland_atom>`
|
||||
* :doc:`adf <compute_adf>`
|
||||
@ -77,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:`composition/atom (k) <compute_composition_atom>`
|
||||
* :doc:`mliap <compute_mliap>`
|
||||
* :doc:`momentum <compute_momentum>`
|
||||
* :doc:`msd <compute_msd>`
|
||||
@ -86,7 +99,6 @@ KOKKOS, o = OPENMP, t = OPT.
|
||||
* :doc:`nbond/atom <compute_nbond_atom>`
|
||||
* :doc:`omega/chunk <compute_omega_chunk>`
|
||||
* :doc:`orientorder/atom (k) <compute_orientorder_atom>`
|
||||
* :doc:`pace <compute_pace>`
|
||||
* :doc:`pair <compute_pair>`
|
||||
* :doc:`pair/local <compute_pair_local>`
|
||||
* :doc:`pe <compute_pe>`
|
||||
@ -94,10 +106,6 @@ KOKKOS, o = OPENMP, t = OPT.
|
||||
* :doc:`pe/mol/tally <compute_tally>`
|
||||
* :doc:`pe/tally <compute_tally>`
|
||||
* :doc:`plasticity/atom <compute_plasticity_atom>`
|
||||
* :doc:`pod/atom <compute_pod_atom>`
|
||||
* :doc:`podd/atom <compute_pod_atom>`
|
||||
* :doc:`pod/local <compute_pod_atom>`
|
||||
* :doc:`pod/global <compute_pod_atom>`
|
||||
* :doc:`pressure <compute_pressure>`
|
||||
* :doc:`pressure/alchemy <compute_pressure_alchemy>`
|
||||
* :doc:`pressure/uef <compute_pressure_uef>`
|
||||
@ -106,16 +114,12 @@ KOKKOS, o = OPENMP, t = OPT.
|
||||
* :doc:`property/grid <compute_property_grid>`
|
||||
* :doc:`property/local <compute_property_local>`
|
||||
* :doc:`ptm/atom <compute_ptm_atom>`
|
||||
* :doc:`rattlers/atom <compute_rattlers_atom>`
|
||||
* :doc:`rdf <compute_rdf>`
|
||||
* :doc:`reaxff/atom (k) <compute_reaxff_atom>`
|
||||
* :doc:`reduce <compute_reduce>`
|
||||
* :doc:`reduce/chunk <compute_reduce_chunk>`
|
||||
* :doc:`reduce/region <compute_reduce>`
|
||||
* :doc:`rheo/property/atom <compute_rheo_property_atom>`
|
||||
* :doc:`rigid/local <compute_rigid_local>`
|
||||
* :doc:`saed <compute_saed>`
|
||||
* :doc:`slcsa/atom <compute_slcsa_atom>`
|
||||
* :doc:`slice <compute_slice>`
|
||||
* :doc:`smd/contact/radius <compute_smd_contact_radius>`
|
||||
* :doc:`smd/damage <compute_smd_damage>`
|
||||
|
||||
@ -1,22 +1,39 @@
|
||||
Dump styles
|
||||
===========
|
||||
.. table_from_list::
|
||||
:columns: 3
|
||||
|
||||
* :doc:`General commands <Commands_all>`
|
||||
* :doc:`Fix styles <Commands_fix>`
|
||||
* :doc:`Compute styles <Commands_compute>`
|
||||
* :doc:`Pair styles <Commands_pair>`
|
||||
* :ref:`Bond styles <bond>`
|
||||
* :ref:`Angle styles <angle>`
|
||||
* :ref:`Dihedral styles <dihedral>`
|
||||
* :ref:`Improper styles <improper>`
|
||||
* :doc:`KSpace styles <Commands_kspace>`
|
||||
* :doc:`Dump styles <Commands_dump>`
|
||||
|
||||
Dump commands
|
||||
=============
|
||||
|
||||
An alphabetic list of all LAMMPS :doc:`dump <dump>` commands.
|
||||
|
||||
.. table_from_list::
|
||||
:columns: 6
|
||||
:columns: 5
|
||||
|
||||
* :doc:`atom <dump>`
|
||||
* :doc:`atom/adios <dump_adios>`
|
||||
* :doc:`atom/gz <dump>`
|
||||
* :doc:`atom/mpiio <dump>`
|
||||
* :doc:`atom/zstd <dump>`
|
||||
* :doc:`cfg <dump>`
|
||||
* :doc:`cfg/gz <dump>`
|
||||
* :doc:`cfg/mpiio <dump>`
|
||||
* :doc:`cfg/uef <dump_cfg_uef>`
|
||||
* :doc:`cfg/zstd <dump>`
|
||||
* :doc:`custom <dump>`
|
||||
* :doc:`custom/adios <dump_adios>`
|
||||
* :doc:`custom/gz <dump>`
|
||||
* :doc:`custom/mpiio <dump>`
|
||||
* :doc:`custom/zstd <dump>`
|
||||
* :doc:`dcd <dump>`
|
||||
* :doc:`grid <dump>`
|
||||
@ -34,6 +51,7 @@ An alphabetic list of all LAMMPS :doc:`dump <dump>` commands.
|
||||
* :doc:`xtc <dump>`
|
||||
* :doc:`xyz <dump>`
|
||||
* :doc:`xyz/gz <dump>`
|
||||
* :doc:`xyz/mpiio <dump>`
|
||||
* :doc:`xyz/zstd <dump>`
|
||||
* :doc:`yaml <dump>`
|
||||
|
||||
|
||||
@ -1,5 +1,19 @@
|
||||
Fix styles
|
||||
==========
|
||||
.. table_from_list::
|
||||
:columns: 3
|
||||
|
||||
* :doc:`General commands <Commands_all>`
|
||||
* :doc:`Fix styles <Commands_fix>`
|
||||
* :doc:`Compute styles <Commands_compute>`
|
||||
* :doc:`Pair styles <Commands_pair>`
|
||||
* :ref:`Bond styles <bond>`
|
||||
* :ref:`Angle styles <angle>`
|
||||
* :ref:`Dihedral styles <dihedral>`
|
||||
* :ref:`Improper styles <improper>`
|
||||
* :doc:`KSpace styles <Commands_kspace>`
|
||||
* :doc:`Dump styles <Commands_dump>`
|
||||
|
||||
Fix commands
|
||||
============
|
||||
|
||||
An alphabetic list of all LAMMPS :doc:`fix <fix>` commands. Some styles
|
||||
have accelerated versions. This is indicated by additional letters in
|
||||
@ -7,14 +21,13 @@ parenthesis: g = GPU, i = INTEL, k = KOKKOS, o = OPENMP, t =
|
||||
OPT.
|
||||
|
||||
.. table_from_list::
|
||||
:columns: 4
|
||||
:columns: 5
|
||||
|
||||
* :doc:`accelerate/cos <fix_accelerate_cos>`
|
||||
* :doc:`acks2/reaxff (k) <fix_acks2_reaxff>`
|
||||
* :doc:`adapt <fix_adapt>`
|
||||
* :doc:`adapt/fep <fix_adapt_fep>`
|
||||
* :doc:`addforce <fix_addforce>`
|
||||
* :doc:`add/heat <fix_add_heat>`
|
||||
* :doc:`addtorque <fix_addtorque>`
|
||||
* :doc:`alchemy <fix_alchemy>`
|
||||
* :doc:`amoeba/bitorsion <fix_amoeba_bitorsion>`
|
||||
@ -48,7 +61,6 @@ OPT.
|
||||
* :doc:`controller <fix_controller>`
|
||||
* :doc:`damping/cundall <fix_damping_cundall>`
|
||||
* :doc:`deform (k) <fix_deform>`
|
||||
* :doc:`deform/pressure <fix_deform_pressure>`
|
||||
* :doc:`deposit <fix_deposit>`
|
||||
* :doc:`dpd/energy (k) <fix_dpd_energy>`
|
||||
* :doc:`drag <fix_drag>`
|
||||
@ -57,7 +69,7 @@ OPT.
|
||||
* :doc:`drude/transform/inverse <fix_drude_transform>`
|
||||
* :doc:`dt/reset (k) <fix_dt_reset>`
|
||||
* :doc:`edpd/source <fix_dpd_source>`
|
||||
* :doc:`efield (k) <fix_efield>`
|
||||
* :doc:`efield <fix_efield>`
|
||||
* :doc:`efield/tip4p <fix_efield>`
|
||||
* :doc:`ehex <fix_ehex>`
|
||||
* :doc:`electrode/conp (i) <fix_electrode>`
|
||||
@ -104,13 +116,13 @@ OPT.
|
||||
* :doc:`momentum (k) <fix_momentum>`
|
||||
* :doc:`momentum/chunk <fix_momentum>`
|
||||
* :doc:`move <fix_move>`
|
||||
* :doc:`mscg <fix_mscg>`
|
||||
* :doc:`msst <fix_msst>`
|
||||
* :doc:`mvv/dpd <fix_mvv_dpd>`
|
||||
* :doc:`mvv/edpd <fix_mvv_dpd>`
|
||||
* :doc:`mvv/tdpd <fix_mvv_dpd>`
|
||||
* :doc:`neb <fix_neb>`
|
||||
* :doc:`neb/spin <fix_neb_spin>`
|
||||
* :doc:`nonaffine/displacement <fix_nonaffine_displacement>`
|
||||
* :doc:`nph (ko) <fix_nh>`
|
||||
* :doc:`nph/asphere (o) <fix_nph_asphere>`
|
||||
* :doc:`nph/body <fix_nph_body>`
|
||||
@ -170,7 +182,6 @@ OPT.
|
||||
* :doc:`pour <fix_pour>`
|
||||
* :doc:`precession/spin <fix_precession_spin>`
|
||||
* :doc:`press/berendsen <fix_press_berendsen>`
|
||||
* :doc:`press/langevin <fix_press_langevin>`
|
||||
* :doc:`print <fix_print>`
|
||||
* :doc:`propel/self <fix_propel_self>`
|
||||
* :doc:`property/atom (k) <fix_property_atom>`
|
||||
@ -191,11 +202,6 @@ OPT.
|
||||
* :doc:`reaxff/species (k) <fix_reaxff_species>`
|
||||
* :doc:`recenter <fix_recenter>`
|
||||
* :doc:`restrain <fix_restrain>`
|
||||
* :doc:`rheo <fix_rheo>`
|
||||
* :doc:`rheo/oxidation <fix_rheo_oxidation>`
|
||||
* :doc:`rheo/pressure <fix_rheo_pressure>`
|
||||
* :doc:`rheo/thermal <fix_rheo_thermal>`
|
||||
* :doc:`rheo/viscosity <fix_rheo_viscosity>`
|
||||
* :doc:`rhok <fix_rhok>`
|
||||
* :doc:`rigid (o) <fix_rigid>`
|
||||
* :doc:`rigid/meso <fix_rigid_meso>`
|
||||
@ -227,15 +233,15 @@ OPT.
|
||||
* :doc:`spring <fix_spring>`
|
||||
* :doc:`spring/chunk <fix_spring_chunk>`
|
||||
* :doc:`spring/rg <fix_spring_rg>`
|
||||
* :doc:`spring/self (k) <fix_spring_self>`
|
||||
* :doc:`spring/self <fix_spring_self>`
|
||||
* :doc:`srd <fix_srd>`
|
||||
* :doc:`store/force <fix_store_force>`
|
||||
* :doc:`store/state <fix_store_state>`
|
||||
* :doc:`tdpd/source <fix_dpd_source>`
|
||||
* :doc:`temp/berendsen (k) <fix_temp_berendsen>`
|
||||
* :doc:`temp/berendsen <fix_temp_berendsen>`
|
||||
* :doc:`temp/csld <fix_temp_csvr>`
|
||||
* :doc:`temp/csvr <fix_temp_csvr>`
|
||||
* :doc:`temp/rescale (k) <fix_temp_rescale>`
|
||||
* :doc:`temp/rescale <fix_temp_rescale>`
|
||||
* :doc:`temp/rescale/eff <fix_temp_rescale_eff>`
|
||||
* :doc:`tfmc <fix_tfmc>`
|
||||
* :doc:`tgnpt/drude <fix_tgnh_drude>`
|
||||
@ -255,7 +261,6 @@ OPT.
|
||||
* :doc:`wall/body/polyhedron <fix_wall_body_polyhedron>`
|
||||
* :doc:`wall/colloid <fix_wall>`
|
||||
* :doc:`wall/ees <fix_wall_ees>`
|
||||
* :doc:`wall/flow (k) <fix_wall_flow>`
|
||||
* :doc:`wall/gran (k) <fix_wall_gran>`
|
||||
* :doc:`wall/gran/region <fix_wall_gran_region>`
|
||||
* :doc:`wall/harmonic <fix_wall>`
|
||||
|
||||
@ -10,14 +10,14 @@ for any commands that may be processed later. Commands may set an
|
||||
internal variable, read in a file, or run a simulation. These actions
|
||||
can be grouped into three categories:
|
||||
|
||||
a) commands that change a global setting (examples: :doc:`timestep <timestep>`, :doc:`newton <newton>`,
|
||||
:doc:`echo <echo>`, :doc:`log <log>`, :doc:`thermo <thermo>`, :doc:`restart <restart>`),
|
||||
a) commands that change a global setting (examples: timestep, newton,
|
||||
echo, log, thermo, restart),
|
||||
b) commands that add, modify, remove, or replace "styles" that are
|
||||
executed during a "run" (examples: :doc:`pair_style <pair_style>`, :doc:`fix <fix>`, :doc:`compute <compute>`, :doc:`dump <dump>`,
|
||||
:doc:`thermo_style <thermo_style>`, :doc:`pair_modify <pair_modify>`), and
|
||||
executed during a "run" (examples: pair_style, fix, compute, dump,
|
||||
thermo_style, pair_modify), and
|
||||
c) commands that execute a "run" or perform some other computation or
|
||||
operation (examples: :doc:`print <print>`, :doc:`run <run>`, :doc:`minimize <minimize>`, :doc:`temper <temper>`, :doc:`write_dump <write_dump>`, :doc:`rerun <rerun>`,
|
||||
:doc:`read_data <read_data>`, :doc:`read_restart <read_restart>`)
|
||||
operation (examples: print, run, minimize, temper, write_dump, rerun,
|
||||
read_data, read_restart)
|
||||
|
||||
Commands in category a) have default settings, which means you only
|
||||
need to use the command if you wish to change the defaults.
|
||||
@ -61,7 +61,7 @@ between commands in the c) category. The following rules apply:
|
||||
<read_data>` command initializes the system by setting up the
|
||||
simulation box and assigning atoms to processors. If default values
|
||||
are not desired, the :doc:`processors <processors>` and
|
||||
:doc:`boundary <boundary>` commands need to be used before ``read_data``
|
||||
:doc:`boundary <boundary>` commands need to be used before read_data
|
||||
to tell LAMMPS how to map processors to the simulation box.
|
||||
|
||||
Many input script errors are detected by LAMMPS and an ERROR or
|
||||
@ -70,6 +70,6 @@ more information on what errors mean. The documentation for each
|
||||
command lists restrictions on how the command can be used.
|
||||
|
||||
You can use the :ref:`-skiprun <skiprun>` command line flag
|
||||
to have LAMMPS skip the execution of any ``run``, ``minimize``, or similar
|
||||
to have LAMMPS skip the execution of any "run", "minimize", or similar
|
||||
commands to check the entire input for correct syntax to avoid crashes
|
||||
on typos or syntax errors in long runs.
|
||||
|
||||
@ -1,5 +1,19 @@
|
||||
KSpace styles
|
||||
=============
|
||||
.. table_from_list::
|
||||
:columns: 3
|
||||
|
||||
* :doc:`General commands <Commands_all>`
|
||||
* :doc:`Fix styles <Commands_fix>`
|
||||
* :doc:`Compute styles <Commands_compute>`
|
||||
* :doc:`Pair styles <Commands_pair>`
|
||||
* :ref:`Bond styles <bond>`
|
||||
* :ref:`Angle styles <angle>`
|
||||
* :ref:`Dihedral styles <dihedral>`
|
||||
* :ref:`Improper styles <improper>`
|
||||
* :doc:`KSpace styles <Commands_kspace>`
|
||||
* :doc:`Dump styles <Commands_dump>`
|
||||
|
||||
KSpace solvers
|
||||
==============
|
||||
|
||||
All LAMMPS :doc:`kspace_style <kspace_style>` solvers. Some styles have
|
||||
accelerated versions. This is indicated by additional letters in
|
||||
@ -7,7 +21,7 @@ parenthesis: g = GPU, i = INTEL, k = KOKKOS, o = OPENMP, t =
|
||||
OPT.
|
||||
|
||||
.. table_from_list::
|
||||
:columns: 5
|
||||
:columns: 4
|
||||
|
||||
* :doc:`ewald (o) <kspace_style>`
|
||||
* :doc:`ewald/disp <kspace_style>`
|
||||
|
||||
@ -1,5 +1,19 @@
|
||||
Pair styles
|
||||
===========
|
||||
.. table_from_list::
|
||||
:columns: 3
|
||||
|
||||
* :doc:`General commands <Commands_all>`
|
||||
* :doc:`Fix styles <Commands_fix>`
|
||||
* :doc:`Compute styles <Commands_compute>`
|
||||
* :doc:`Pair styles <Commands_pair>`
|
||||
* :ref:`Bond styles <bond>`
|
||||
* :ref:`Angle styles <angle>`
|
||||
* :ref:`Dihedral styles <dihedral>`
|
||||
* :ref:`Improper styles <improper>`
|
||||
* :doc:`KSpace styles <Commands_kspace>`
|
||||
* :doc:`Dump styles <Commands_dump>`
|
||||
|
||||
Pair_style potentials
|
||||
======================
|
||||
|
||||
All LAMMPS :doc:`pair_style <pair_style>` commands. Some styles have
|
||||
accelerated versions. This is indicated by additional letters in
|
||||
@ -7,20 +21,20 @@ parenthesis: g = GPU, i = INTEL, k = KOKKOS, o = OPENMP, t =
|
||||
OPT.
|
||||
|
||||
.. table_from_list::
|
||||
:columns: 3
|
||||
:columns: 4
|
||||
|
||||
* :doc:`none <pair_none>`
|
||||
* :doc:`zero <pair_zero>`
|
||||
* :doc:`hybrid (ko) <pair_hybrid>`
|
||||
* :doc:`hybrid/molecular (o) <pair_hybrid>`
|
||||
* :doc:`hybrid/overlay (ko) <pair_hybrid>`
|
||||
* :doc:`hybrid/scaled (o) <pair_hybrid>`
|
||||
* :doc:`hybrid (k) <pair_hybrid>`
|
||||
* :doc:`hybrid/overlay (k) <pair_hybrid>`
|
||||
* :doc:`hybrid/scaled <pair_hybrid>`
|
||||
* :doc:`kim <pair_kim>`
|
||||
* :doc:`list <pair_list>`
|
||||
* :doc:`tracker <pair_tracker>`
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
* :doc:`adp (ko) <pair_adp>`
|
||||
* :doc:`agni (o) <pair_agni>`
|
||||
* :doc:`aip/water/2dm (t) <pair_aip_water_2dm>`
|
||||
@ -73,17 +87,16 @@ OPT.
|
||||
* :doc:`coul/long/soft (o) <pair_fep_soft>`
|
||||
* :doc:`coul/msm (o) <pair_coul>`
|
||||
* :doc:`coul/slater/cut <pair_coul_slater>`
|
||||
* :doc:`coul/slater/long (g) <pair_coul_slater>`
|
||||
* :doc:`coul/slater/long <pair_coul_slater>`
|
||||
* :doc:`coul/shield <pair_coul_shield>`
|
||||
* :doc:`coul/streitz <pair_coul>`
|
||||
* :doc:`coul/tt <pair_coul_tt>`
|
||||
* :doc:`coul/wolf (ko) <pair_coul>`
|
||||
* :doc:`coul/wolf/cs <pair_cs>`
|
||||
* :doc:`dpd (giko) <pair_dpd>`
|
||||
* :doc:`dpd/coul/slater/long (g) <pair_dpd_coul_slater_long>`
|
||||
* :doc:`dpd/fdt <pair_dpd_fdt>`
|
||||
* :doc:`dpd/ext (ko) <pair_dpd_ext>`
|
||||
* :doc:`dpd/ext/tstat (ko) <pair_dpd_ext>`
|
||||
* :doc:`dpd/fdt <pair_dpd_fdt>`
|
||||
* :doc:`dpd/fdt/energy (k) <pair_dpd_fdt>`
|
||||
* :doc:`dpd/tstat (gko) <pair_dpd>`
|
||||
* :doc:`dsmc <pair_dsmc>`
|
||||
@ -97,7 +110,7 @@ OPT.
|
||||
* :doc:`eam/he <pair_eam>`
|
||||
* :doc:`edip (o) <pair_edip>`
|
||||
* :doc:`edip/multi <pair_edip>`
|
||||
* :doc:`edpd (g) <pair_mesodpd>`
|
||||
* :doc:`edpd <pair_mesodpd>`
|
||||
* :doc:`eff/cut <pair_eff>`
|
||||
* :doc:`eim (o) <pair_eim>`
|
||||
* :doc:`exp6/rx (k) <pair_exp6_rx>`
|
||||
@ -133,7 +146,7 @@ OPT.
|
||||
* :doc:`lj/charmm/coul/long/soft (o) <pair_fep_soft>`
|
||||
* :doc:`lj/charmm/coul/msm (o) <pair_charmm>`
|
||||
* :doc:`lj/charmmfsw/coul/charmmfsh <pair_charmm>`
|
||||
* :doc:`lj/charmmfsw/coul/long (k) <pair_charmm>`
|
||||
* :doc:`lj/charmmfsw/coul/long <pair_charmm>`
|
||||
* :doc:`lj/class2 (gko) <pair_class2>`
|
||||
* :doc:`lj/class2/coul/cut (ko) <pair_class2>`
|
||||
* :doc:`lj/class2/coul/cut/soft <pair_fep_soft>`
|
||||
@ -145,14 +158,14 @@ OPT.
|
||||
* :doc:`lj/cut (gikot) <pair_lj>`
|
||||
* :doc:`lj/cut/coul/cut (gko) <pair_lj_cut_coul>`
|
||||
* :doc:`lj/cut/coul/cut/dielectric (o) <pair_dielectric>`
|
||||
* :doc:`lj/cut/coul/cut/soft (go) <pair_fep_soft>`
|
||||
* :doc:`lj/cut/coul/cut/soft (o) <pair_fep_soft>`
|
||||
* :doc:`lj/cut/coul/debye (gko) <pair_lj_cut_coul>`
|
||||
* :doc:`lj/cut/coul/debye/dielectric (o) <pair_dielectric>`
|
||||
* :doc:`lj/cut/coul/dsf (gko) <pair_lj_cut_coul>`
|
||||
* :doc:`lj/cut/coul/long (gikot) <pair_lj_cut_coul>`
|
||||
* :doc:`lj/cut/coul/long/cs <pair_cs>`
|
||||
* :doc:`lj/cut/coul/long/dielectric (o) <pair_dielectric>`
|
||||
* :doc:`lj/cut/coul/long/soft (go) <pair_fep_soft>`
|
||||
* :doc:`lj/cut/coul/long/soft (o) <pair_fep_soft>`
|
||||
* :doc:`lj/cut/coul/msm (go) <pair_lj_cut_coul>`
|
||||
* :doc:`lj/cut/coul/msm/dielectric <pair_dielectric>`
|
||||
* :doc:`lj/cut/coul/wolf (o) <pair_lj_cut_coul>`
|
||||
@ -177,7 +190,7 @@ OPT.
|
||||
* :doc:`lj/mdf <pair_mdf>`
|
||||
* :doc:`lj/relres (o) <pair_lj_relres>`
|
||||
* :doc:`lj/spica (gko) <pair_spica>`
|
||||
* :doc:`lj/spica/coul/long (gko) <pair_spica>`
|
||||
* :doc:`lj/spica/coul/long (go) <pair_spica>`
|
||||
* :doc:`lj/spica/coul/msm (o) <pair_spica>`
|
||||
* :doc:`lj/sf/dipole/sf (go) <pair_dipole>`
|
||||
* :doc:`lj/smooth (go) <pair_lj_smooth>`
|
||||
@ -189,7 +202,7 @@ OPT.
|
||||
* :doc:`lubricate/poly (o) <pair_lubricate>`
|
||||
* :doc:`lubricateU <pair_lubricateU>`
|
||||
* :doc:`lubricateU/poly <pair_lubricateU>`
|
||||
* :doc:`mdpd (g) <pair_mesodpd>`
|
||||
* :doc:`mdpd <pair_mesodpd>`
|
||||
* :doc:`mdpd/rhosum <pair_mesodpd>`
|
||||
* :doc:`meam (k) <pair_meam>`
|
||||
* :doc:`meam/ms (k) <pair_meam>`
|
||||
@ -207,8 +220,7 @@ OPT.
|
||||
* :doc:`morse/soft <pair_fep_soft>`
|
||||
* :doc:`multi/lucy <pair_multi_lucy>`
|
||||
* :doc:`multi/lucy/rx (k) <pair_multi_lucy_rx>`
|
||||
* :doc:`nb3b/harmonic <pair_nb3b>`
|
||||
* :doc:`nb3b/screened <pair_nb3b>`
|
||||
* :doc:`nb3b/harmonic <pair_nb3b_harmonic>`
|
||||
* :doc:`nm/cut (o) <pair_nm>`
|
||||
* :doc:`nm/cut/coul/cut (o) <pair_nm>`
|
||||
* :doc:`nm/cut/coul/long (o) <pair_nm>`
|
||||
@ -232,8 +244,7 @@ OPT.
|
||||
* :doc:`oxrna2/coaxstk <pair_oxrna2>`
|
||||
* :doc:`pace (k) <pair_pace>`
|
||||
* :doc:`pace/extrapolation (k) <pair_pace>`
|
||||
* :doc:`pedone (o) <pair_pedone>`
|
||||
* :doc:`pod (k) <pair_pod>`
|
||||
* :doc:`pod <pair_pod>`
|
||||
* :doc:`peri/eps <pair_peri>`
|
||||
* :doc:`peri/lps (o) <pair_peri>`
|
||||
* :doc:`peri/pmb (o) <pair_peri>`
|
||||
@ -244,10 +255,7 @@ OPT.
|
||||
* :doc:`rann <pair_rann>`
|
||||
* :doc:`reaxff (ko) <pair_reaxff>`
|
||||
* :doc:`rebo (io) <pair_airebo>`
|
||||
* :doc:`rebomos (o) <pair_rebomos>`
|
||||
* :doc:`resquared (go) <pair_resquared>`
|
||||
* :doc:`rheo <pair_rheo>`
|
||||
* :doc:`rheo/solid <pair_rheo_solid>`
|
||||
* :doc:`saip/metal (t) <pair_saip_metal>`
|
||||
* :doc:`sdpd/taitwater/isothermal <pair_sdpd_taitwater_isothermal>`
|
||||
* :doc:`smatb <pair_smatb>`
|
||||
@ -257,13 +265,13 @@ OPT.
|
||||
* :doc:`smd/tri_surface <pair_smd_triangulated_surface>`
|
||||
* :doc:`smd/ulsph <pair_smd_ulsph>`
|
||||
* :doc:`smtbq <pair_smtbq>`
|
||||
* :doc:`snap (ik) <pair_snap>`
|
||||
* :doc:`soft (gko) <pair_soft>`
|
||||
* :doc:`sph/heatconduction (g) <pair_sph_heatconduction>`
|
||||
* :doc:`snap (k) <pair_snap>`
|
||||
* :doc:`soft (go) <pair_soft>`
|
||||
* :doc:`sph/heatconduction <pair_sph_heatconduction>`
|
||||
* :doc:`sph/idealgas <pair_sph_idealgas>`
|
||||
* :doc:`sph/lj (g) <pair_sph_lj>`
|
||||
* :doc:`sph/lj <pair_sph_lj>`
|
||||
* :doc:`sph/rhosum <pair_sph_rhosum>`
|
||||
* :doc:`sph/taitwater (g) <pair_sph_taitwater>`
|
||||
* :doc:`sph/taitwater <pair_sph_taitwater>`
|
||||
* :doc:`sph/taitwater/morris <pair_sph_taitwater_morris>`
|
||||
* :doc:`spin/dipole/cut <pair_spin_dipole>`
|
||||
* :doc:`spin/dipole/long <pair_spin_dipole>`
|
||||
@ -292,11 +300,10 @@ OPT.
|
||||
* :doc:`tip4p/long/soft (o) <pair_fep_soft>`
|
||||
* :doc:`tri/lj <pair_tri_lj>`
|
||||
* :doc:`ufm (got) <pair_ufm>`
|
||||
* :doc:`uf3 (k) <pair_uf3>`
|
||||
* :doc:`vashishta (gko) <pair_vashishta>`
|
||||
* :doc:`vashishta/table (o) <pair_vashishta>`
|
||||
* :doc:`wf/cut <pair_wf_cut>`
|
||||
* :doc:`ylz <pair_ylz>`
|
||||
* :doc:`yukawa (gko) <pair_yukawa>`
|
||||
* :doc:`yukawa/colloid (gko) <pair_yukawa_colloid>`
|
||||
* :doc:`yukawa/colloid (go) <pair_yukawa_colloid>`
|
||||
* :doc:`zbl (gko) <pair_zbl>`
|
||||
|
||||
@ -42,8 +42,8 @@ LAMMPS:
|
||||
If the $ is followed by text in curly brackets '{}', then the
|
||||
variable name is the text inside the curly brackets. If no curly
|
||||
brackets follow the $, then the variable name is the single character
|
||||
immediately following the $. Thus ``${myTemp}`` and ``$x`` refer to variables
|
||||
named "myTemp" and "x", while ``$xx`` will be interpreted as a variable
|
||||
immediately following the $. Thus ${myTemp} and $x refer to variables
|
||||
named "myTemp" and "x", while "$xx" will be interpreted as a variable
|
||||
named "x" followed by an "x" character.
|
||||
|
||||
How the variable is converted to a text string depends on what style
|
||||
@ -79,10 +79,10 @@ LAMMPS:
|
||||
|
||||
Additionally, the entire "immediate" variable expression may be
|
||||
followed by a colon, followed by a C-style format string,
|
||||
e.g. ``:%f`` or ``:%.10g``. The format string must be appropriate for
|
||||
e.g. ":%f" or ":%.10g". The format string must be appropriate for
|
||||
a double-precision floating-point value. The format string is used
|
||||
to output the result of the variable expression evaluation. If a
|
||||
format string is not specified, a high-precision ``%.20g`` is used as
|
||||
format string is not specified, a high-precision "%.20g" is used as
|
||||
the default format.
|
||||
|
||||
This can be useful for formatting print output to a desired precision:
|
||||
@ -101,8 +101,8 @@ LAMMPS:
|
||||
variable b2 equal 4
|
||||
print "B2 = ${b$a}"
|
||||
|
||||
Nor can you specify an expression like ``$($x-1.0)`` for an immediate
|
||||
variable, but you could use ``$(v_x-1.0)``, since the latter is valid
|
||||
Nor can you specify an expression like "$($x-1.0)" for an immediate
|
||||
variable, but you could use $(v_x-1.0), since the latter is valid
|
||||
syntax for an :doc:`equal-style variable <variable>`.
|
||||
|
||||
See the :doc:`variable <variable>` command for more details of how
|
||||
|
||||
@ -8,18 +8,6 @@ stop LAMMPS and print a suitable error message in most cases, when a
|
||||
style/command is used that has been removed or will replace the command
|
||||
with the direct alternative (if available) and print a warning.
|
||||
|
||||
restart2data tool
|
||||
-----------------
|
||||
|
||||
.. versionchanged:: 23Nov2013
|
||||
|
||||
The functionality of the restart2data tool has been folded into the
|
||||
LAMMPS executable directly instead of having a separate tool. A
|
||||
combination of the commands :doc:`read_restart <read_restart>` and
|
||||
:doc:`write_data <write_data>` can be used to the same effect. For
|
||||
added convenience this conversion can also be triggered by
|
||||
:doc:`command line flags <Run_options>`
|
||||
|
||||
Fix ave/spatial and fix ave/spatial/sphere
|
||||
------------------------------------------
|
||||
|
||||
@ -97,35 +85,6 @@ The same functionality is available through
|
||||
:doc:`bond style mesocnt <bond_mesocnt>` and
|
||||
:doc:`angle style mesocnt <angle_mesocnt>`.
|
||||
|
||||
MPIIO package
|
||||
-------------
|
||||
|
||||
.. deprecated:: 21Nov2023
|
||||
|
||||
The MPIIO package has been removed from LAMMPS since it was unmaintained
|
||||
for many years and thus not updated to incorporate required changes that
|
||||
had been applied to the corresponding non-MPIIO commands. As a
|
||||
consequence the MPIIO commands had become unreliable and sometimes
|
||||
crashing LAMMPS or corrupting data. Similar functionality is available
|
||||
through the :ref:`ADIOS package <PKG-ADIOS>` and the :ref:`NETCDF
|
||||
package <PKG-NETCDF>`. Also, the :doc:`dump_modify nfile or dump_modify
|
||||
fileper <dump_modify>` keywords may be used for an efficient way of
|
||||
writing out dump files when running on large numbers of processors.
|
||||
Similarly, the "nfile" and "fileper" keywords exist for restarts:
|
||||
see :doc:`restart <restart>`, :doc:`read_restart <read_restart>`,
|
||||
:doc:`write_restart <write_restart>`.
|
||||
|
||||
|
||||
MSCG package
|
||||
------------
|
||||
|
||||
.. deprecated:: 21Nov2023
|
||||
|
||||
The MSCG package has been removed from LAMMPS since it was unmaintained
|
||||
for many years and instead superseded by the `OpenMSCG software
|
||||
<https://software.rcc.uchicago.edu/mscg/>`_ of the Voth group at the
|
||||
University of Chicago, which can be used independent from LAMMPS.
|
||||
|
||||
REAX package
|
||||
------------
|
||||
|
||||
@ -138,17 +97,6 @@ syntax compatible with the removed reax pair style, so input files will
|
||||
have to be adapted. The REAXFF package was originally called
|
||||
USER-REAXC.
|
||||
|
||||
USER-REAXC package
|
||||
------------------
|
||||
|
||||
.. deprecated:: 7Feb2024
|
||||
|
||||
The USER-REAXC package has been renamed to :ref:`REAXFF <PKG-REAXFF>`.
|
||||
In the process also the pair style and related fixes were renamed to use
|
||||
the "reaxff" string instead of "reax/c". For a while LAMMPS was maintaining
|
||||
backward compatibility by providing aliases for the styles. These have
|
||||
been removed, so using "reaxff" is now *required*.
|
||||
|
||||
USER-CUDA package
|
||||
-----------------
|
||||
|
||||
@ -160,19 +108,12 @@ performance characteristics on NVIDIA GPUs. Both, the KOKKOS
|
||||
and the :ref:`GPU package <PKG-GPU>` are maintained
|
||||
and allow running LAMMPS with GPU acceleration.
|
||||
|
||||
i-PI tool
|
||||
---------
|
||||
|
||||
.. versionchanged:: 27Jun2024
|
||||
|
||||
The i-PI tool has been removed from the LAMMPS distribution. Instead,
|
||||
instructions to install i-PI from PyPI via pip are provided.
|
||||
|
||||
LAMMPS shell
|
||||
------------
|
||||
|
||||
.. versionchanged:: 29Aug2024
|
||||
|
||||
The LAMMPS shell has been removed from the LAMMPS distribution. Users
|
||||
are encouraged to use the :ref:`LAMMPS-GUI <lammps_gui>` tool instead.
|
||||
restart2data tool
|
||||
-----------------
|
||||
|
||||
The functionality of the restart2data tool has been folded into the
|
||||
LAMMPS executable directly instead of having a separate tool. A
|
||||
combination of the commands :doc:`read_restart <read_restart>` and
|
||||
:doc:`write_data <write_data>` can be used to the same effect. For
|
||||
added convenience this conversion can also be triggered by
|
||||
:doc:`command line flags <Run_options>`
|
||||
|
||||
@ -8,10 +8,10 @@ page.
|
||||
|
||||
A LAMMPS input script typically has 4 parts:
|
||||
|
||||
#. :ref:`Initialization <init>`
|
||||
#. :ref:`System definition <system>`
|
||||
#. :ref:`Simulation settings <settings>`
|
||||
#. :ref:`Run a simulation <run>`
|
||||
1. :ref:`Initialization <init>`
|
||||
2. :ref:`System definition <system>`
|
||||
3. :ref:`Simulation settings <settings>`
|
||||
4. :ref:`Run a simulation <run>`
|
||||
|
||||
The last 2 parts can be repeated as many times as desired. I.e. run a
|
||||
simulation, change some settings, run some more, etc. Each of the 4
|
||||
|
||||
@ -2,7 +2,7 @@ Accessing per-atom data
|
||||
-----------------------
|
||||
|
||||
This page discusses how per-atom data is managed in LAMMPS, how it can
|
||||
be accessed, what communication patterns apply, and some of the utility
|
||||
be accessed, what communication patters apply, and some of the utility
|
||||
functions that exist for a variety of purposes.
|
||||
|
||||
|
||||
@ -14,11 +14,11 @@ As described on the :doc:`parallel partitioning algorithms
|
||||
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 the communication
|
||||
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
|
||||
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
|
||||
@ -27,8 +27,8 @@ 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, individual
|
||||
classes, or as custom arrays by the individual classes. If only access
|
||||
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
|
||||
@ -61,7 +61,7 @@ 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 a subdomain:
|
||||
such atom. Example code to count atoms with same atom ID in subdomain:
|
||||
|
||||
.. code-block:: c++
|
||||
|
||||
|
||||
@ -69,7 +69,7 @@ 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
|
||||
called to trigger actions such as creating atoms, computing forces,
|
||||
called to trigger actions such creating atoms, computing forces,
|
||||
computing properties, time-propagating the system, or writing output.
|
||||
|
||||
Compositing and Inheritance
|
||||
@ -110,10 +110,9 @@ 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 within a timestep, as explained in
|
||||
the :doc:`How a timestep works <Developer_flow>` doc page. 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.
|
||||
`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
|
||||
|
||||
@ -128,7 +128,7 @@ reflect particles off box boundaries in the :doc:`FixWallReflect class
|
||||
The ``decide()`` method in the Neighbor class determines whether
|
||||
neighbor lists need to be rebuilt on the current timestep (conditions
|
||||
can be changed using the :doc:`neigh_modify every/delay/check
|
||||
<neigh_modify>` command). If not, coordinates of ghost atoms are
|
||||
<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 pseudocode are first invoked. The
|
||||
|
||||
@ -433,7 +433,7 @@ from owned to ghost cells, or ghost to owned cells, respectively, as
|
||||
described above. The *caller* argument should be one of these values
|
||||
-- Grid3d::COMPUTE, Grid3d::FIX, Grid3d::KSPACE, Grid3d::PAIR --
|
||||
depending on the style of the caller class. The *ptr* argument is the
|
||||
"this" pointer to the caller class. These two arguments are used to
|
||||
"this" pointer to the caller class. These 2 arguments are used to
|
||||
call back to pack()/unpack() functions in the caller class, as
|
||||
explained below.
|
||||
|
||||
|
||||
@ -20,7 +20,7 @@ Available topics are:
|
||||
Reading and parsing of text and text files
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Classes in LAMMPS frequently need to read in additional
|
||||
It is frequently required for a class in LAMMPS to read in additional
|
||||
data from a file, e.g. potential parameters from a potential file for
|
||||
manybody potentials. LAMMPS provides several custom classes and
|
||||
convenience functions to simplify the process. They offer the
|
||||
@ -128,8 +128,9 @@ that determines the kind of neighbor list requested. The default value
|
||||
used here asks for a perpetual "half" neighbor list.
|
||||
|
||||
Non-default values of the second argument need to be used to adjust a
|
||||
neighbor list request to the specific needs of a style. The :doc:`tersoff
|
||||
<pair_tersoff>` pair style, for example, needs a "full" neighbor list:
|
||||
neighbor list request to the specific needs of a style an additional
|
||||
request flag is needed. The :doc:`tersoff <pair_tersoff>` pair style,
|
||||
for example, needs a "full" neighbor list:
|
||||
|
||||
.. code-block:: c++
|
||||
|
||||
@ -140,8 +141,8 @@ neighbor list request to the specific needs of a style. The :doc:`tersoff
|
||||
}
|
||||
|
||||
When a pair style supports r-RESPA time integration with different cutoff regions,
|
||||
the request flag may depend on the corresponding r-RESPA settings. Here is an
|
||||
example from pair style lj/cut:
|
||||
the request flag may depend on the corresponding r-RESPA settings. Here an example
|
||||
from pair style lj/cut:
|
||||
|
||||
.. code-block:: c++
|
||||
|
||||
@ -159,7 +160,7 @@ example from pair style lj/cut:
|
||||
}
|
||||
|
||||
Granular pair styles need neighbor lists based on particle sizes and not cutoff
|
||||
and also may need to store data across timesteps ("history").
|
||||
and also may require to have the list of previous neighbors available ("history").
|
||||
For example with:
|
||||
|
||||
.. code-block:: c++
|
||||
@ -168,7 +169,7 @@ For example with:
|
||||
else neighbor->add_request(this, NeighConst::REQ_SIZE);
|
||||
|
||||
In case a class would need to make multiple neighbor list requests with different
|
||||
settings, each request can set an id which is then used in the corresponding
|
||||
settings each request can set an id which is then used in the corresponding
|
||||
``init_list()`` function to assign it to the suitable pointer variable. This is
|
||||
done for example by the :doc:`pair style meam <pair_meam>`:
|
||||
|
||||
@ -278,8 +279,8 @@ And here is how the code operates:
|
||||
* The :doc:`thermo_style custom <thermo_style>` command defines
|
||||
*ecouple* and *econserve* keywords.
|
||||
* These keywords sum the energy contributions from all the
|
||||
*ecouple_flag* = 1 fixes by invoking the *energy_couple()* method in
|
||||
the Modify class, which calls the *compute_scalar()* method of each
|
||||
*ecouple_flag* = 1 fixes by invoking the energy_couple() method in
|
||||
the Modify class, which calls the compute_scalar() method of each
|
||||
fix in the list.
|
||||
|
||||
------------------
|
||||
@ -319,19 +320,19 @@ The fix must also do the following:
|
||||
|
||||
The ev_init() and ev_tally() methods also account for global and
|
||||
peratom virial contributions. Thus you do not need to invoke the
|
||||
v_init() and v_tally() methods if the fix also calculates peratom
|
||||
v_init() and v_tally() methods, if the fix also calculates peratom
|
||||
energies.
|
||||
|
||||
The fix must also specify whether (by default) to include or exclude
|
||||
these contributions to the global/peratom energy/virial of the system.
|
||||
For the fix to include the contributions, set either or both of these
|
||||
For the fix to include the contributions, set either of both of these
|
||||
variables in the constructor:
|
||||
|
||||
* *thermo_energy* = 1, for global and peratom energy
|
||||
* *thermo_virial* = 1, for global and peratom virial
|
||||
|
||||
Note that these variables are zeroed in fix.cpp. Thus if you don't
|
||||
set the variables, the contributions will be excluded (by default).
|
||||
set the variables, the contributions will be excluded (by default)
|
||||
|
||||
However, the user has ultimate control over whether to include or
|
||||
exclude the contributions of the fix via the :doc:`fix modify
|
||||
@ -405,11 +406,9 @@ processor owns, within the global grid:
|
||||
|
||||
.. parsed-literal::
|
||||
|
||||
nFOO_in = 3d decomposition brick
|
||||
nFOO_fft = FFT decomposition brick
|
||||
nFOO_out = 3d decomposition brick + ghost cells
|
||||
|
||||
where ``FOO`` corresponds to ``xlo, xhi, ylo, yhi, zlo,`` or ``zhi``.
|
||||
nxlo_in,nxhi_in,nylo_in,nyhi_in,nzlo_in,nzhi_in = 3d decomposition brick
|
||||
nxlo_fft,nxhi_fft,nylo_fft,nyhi_fft,nzlo_fft,nzhi_fft = FFT decomposition brick
|
||||
nxlo_out,nxhi_out,nylo_out,nyhi_out,nzlo_out,nzhi_out = 3d decomposition brick + ghost cells
|
||||
|
||||
The ``in`` and ``fft`` indices are from 0 to N-1 inclusive in each
|
||||
dimension, where N is the grid size.
|
||||
|
||||
@ -4,7 +4,8 @@ Communication
|
||||
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. To be able to compute the short-range interactions, 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 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
|
||||
@ -36,7 +37,7 @@ be larger than half the simulation domain.
|
||||
|
||||
Efficient communication patterns are needed to update the "ghost" atom
|
||||
data, since that needs to be done at every MD time step or minimization
|
||||
step. The diagrams of the :ref:`ghost-atom-comm` figure illustrate how ghost
|
||||
step. The diagrams of the `ghost-atom-comm` figure illustrate how ghost
|
||||
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
|
||||
|
||||
@ -93,7 +93,7 @@ processors, since each tile in the initial tiling overlaps with a
|
||||
handful of tiles in the final tiling.
|
||||
|
||||
The transformations could also be done using collective communication
|
||||
across all :math:`P` processors with a single call to ``MPI_Alltoall()``, but
|
||||
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
|
||||
@ -138,7 +138,7 @@ grid/particle operations that LAMMPS supports:
|
||||
:math:`O(P^{\frac{1}{2}})`.
|
||||
|
||||
- For efficiency in performing 1d FFTs, the grid transpose
|
||||
operations illustrated in Figure :ref:`fft-parallel` also involve
|
||||
operations illustrated in Figure \ref{fig:fft} also involve
|
||||
reordering the 3d data so that a different dimension is contiguous
|
||||
in memory. This reordering can be done during the packing or
|
||||
unpacking of buffers for MPI communication.
|
||||
|
||||
@ -149,7 +149,7 @@ supports:
|
||||
|
||||
- Dependent on the "pair" setting of the :doc:`newton <newton>` command,
|
||||
the "half" neighbor lists may contain **all** pairs of atoms where
|
||||
atom *j* is a ghost atom (i.e. when the newton pair setting is *off*).
|
||||
atom *j* is a ghost atom (i.e. when the newton pair setting is *off*)
|
||||
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
|
||||
|
||||
@ -1,13 +1,13 @@
|
||||
OpenMP Parallelism
|
||||
^^^^^^^^^^^^^^^^^^
|
||||
|
||||
The styles in the INTEL, KOKKOS, and OPENMP packages offer to use OpenMP
|
||||
The styles in the INTEL, KOKKOS, and OPENMP package offer to use OpenMP
|
||||
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
|
||||
and KOKKOS packages offer additional options and are more complex since
|
||||
and KOKKOS package offer additional options and are more complex since
|
||||
they support more features and different hardware like co-processors
|
||||
or GPUs.
|
||||
|
||||
@ -16,7 +16,7 @@ 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
|
||||
derived class from the regular version (e.g. ``PairLJCutOMP`` from
|
||||
``PairLJCut``) and only overriding methods that are multi-threaded or
|
||||
``PairLJCut``) and overriding only methods that are multi-threaded or
|
||||
need to be modified to support multi-threading (similar to what was done
|
||||
in the OPT package), b) keeping the structure in the modified code very
|
||||
similar so that side-by-side comparisons are still useful, and c)
|
||||
|
||||
@ -70,9 +70,6 @@ File and path functions and global constants
|
||||
.. doxygenfunction:: is_console
|
||||
:project: progguide
|
||||
|
||||
.. doxygenfunction:: disk_free
|
||||
:project: progguide
|
||||
|
||||
.. doxygenfunction:: path_is_directory
|
||||
:project: progguide
|
||||
|
||||
|
||||
@ -53,7 +53,7 @@ Members of ``lammpsplugin_t``
|
||||
|
||||
.. list-table::
|
||||
:header-rows: 1
|
||||
:widths: 15 85
|
||||
:widths: auto
|
||||
|
||||
* - Member
|
||||
- Description
|
||||
@ -135,7 +135,7 @@ unique inside the entire LAMMPS executable.
|
||||
Fix style example
|
||||
^^^^^^^^^^^^^^^^^
|
||||
|
||||
If the factory function is for a fix or compute, which take three
|
||||
If the factory function would be for a fix or compute, which take three
|
||||
arguments (a pointer to the LAMMPS class, the number of arguments and the
|
||||
list of argument strings), then the pointer type is ``lammpsplugin_factory2``
|
||||
and it must be assigned to the *creator.v2* member of the plugin struct.
|
||||
@ -271,7 +271,7 @@ Plugins need to be compiled with the same compilers and libraries
|
||||
as the LAMMPS executable and library. Otherwise the plugin will likely
|
||||
not load due to mismatches in the function signatures (LAMMPS is C++ so
|
||||
scope, type, and number of arguments are encoded into the symbol names
|
||||
and thus differences in them will lead to failed plugin load commands).
|
||||
and thus differences in them will lead to failed plugin load commands.
|
||||
Compilation of the plugin can be managed via both, CMake or traditional
|
||||
GNU makefiles. Some examples that can be used as a template are in the
|
||||
``examples/plugins`` folder. The CMake script code has some small
|
||||
@ -283,7 +283,7 @@ in the ``examples/kim/plugin`` folder. No changes to the sources of the
|
||||
KIM package themselves are needed; only the plugin interface and loader
|
||||
code needs to be added. This example only supports building with CMake,
|
||||
but is probably a more typical example. To compile you need to run CMake
|
||||
with ``-DLAMMPS_SOURCE_DIR=<path/to/lammps/src/folder>``. Other
|
||||
with -DLAMMPS_SOURCE_DIR=<path/to/lammps/src/folder>. Other
|
||||
configuration setting are identical to those for compiling LAMMPS.
|
||||
|
||||
A second example for a plugin from a package is in the
|
||||
|
||||
@ -44,7 +44,7 @@ available:
|
||||
|
||||
.. list-table::
|
||||
:header-rows: 1
|
||||
:widths: 32 18 50
|
||||
:widths: auto
|
||||
:align: left
|
||||
|
||||
* - File name:
|
||||
@ -121,7 +121,7 @@ will be suppressed and only a summary printed, but adding
|
||||
the '-V' option will then produce output from the tests
|
||||
above like the following:
|
||||
|
||||
.. code-block:: console
|
||||
.. code-block::
|
||||
|
||||
[...]
|
||||
1: [ RUN ] Tokenizer.empty_string
|
||||
@ -180,11 +180,19 @@ discarded but by setting the verbose flag (via setting the ``TEST_ARGS``
|
||||
environment variable, ``TEST_ARGS=-v``) it can be printed and used to
|
||||
understand why tests fail unexpectedly.
|
||||
|
||||
The specifics of so-called "death tests", i.e. conditions where LAMMPS
|
||||
should fail and throw an exception, are implemented in the
|
||||
``TEST_FAILURE()`` macro. These tests operate by capturing the screen
|
||||
output when executing the failing command and then comparing that with a
|
||||
provided regular expression string pattern. Example:
|
||||
Another complexity of these tests stems from the need to capture
|
||||
situations where LAMMPS will stop with an error, i.e. handle so-called
|
||||
"death tests". Here the LAMMPS code will operate differently depending
|
||||
on whether it was configured to throw C++ exceptions on errors or call
|
||||
either ``exit()`` or ``MPI_Abort()``. In the latter case, the test code
|
||||
also needs to detect whether LAMMPS was compiled with the OpenMPI
|
||||
library, as OpenMPI is **only** compatible the death test options of the
|
||||
GoogleTest library when C++ exceptions are enabled; otherwise those
|
||||
"death tests" must be skipped to avoid reporting bogus failures. The
|
||||
specifics of this step are implemented in the ``TEST_FAILURE()``
|
||||
macro. These tests operate by capturing the screen output when executing
|
||||
the failing command and then comparing that with a provided regular
|
||||
expression string pattern. Example:
|
||||
|
||||
.. code-block:: c++
|
||||
|
||||
@ -227,12 +235,12 @@ Tests for the C-style library interface
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Tests for validating the LAMMPS C-style library interface are in the
|
||||
``unittest/c-library`` folder. They are implemented either to be used
|
||||
for utility functions or for LAMMPS commands, but use the functions
|
||||
``unittest/c-library`` folder. They are implemented in either way used
|
||||
for utility functions and for LAMMPS commands, but use the functions
|
||||
implemented in the ``src/library.cpp`` file as much as possible. There
|
||||
may be some overlap with other tests, but only in as much as is required
|
||||
to test the C-style library API. The tests are distributed over
|
||||
multiple test programs which try to match the grouping of the
|
||||
multiple test programs which tries to match the grouping of the
|
||||
functions in the source code and :ref:`in the manual <lammps_c_api>`.
|
||||
|
||||
This group of tests also includes tests invoking LAMMPS in parallel
|
||||
@ -258,7 +266,7 @@ Tests for the Python module and package
|
||||
|
||||
The ``unittest/python`` folder contains primarily tests for classes and
|
||||
functions in the LAMMPS python module but also for commands in the
|
||||
PYTHON package. These tests are only enabled if the necessary
|
||||
PYTHON package. These tests are only enabled, if the necessary
|
||||
prerequisites are detected or enabled during configuration and
|
||||
compilation of LAMMPS (shared library build enabled, Python interpreter
|
||||
found, Python development files found).
|
||||
@ -272,9 +280,11 @@ Tests for the Fortran interface
|
||||
|
||||
Tests for using the Fortran module are in the ``unittest/fortran``
|
||||
folder. Since they are also using the GoogleTest library, they require
|
||||
implementing test wrappers in C++ that will call fortran functions
|
||||
to also implement test wrappers in C++ that will call fortran functions
|
||||
which provide a C function interface through ISO_C_BINDINGS that will in
|
||||
turn call the functions in the LAMMPS Fortran module.
|
||||
turn call the functions in the LAMMPS Fortran module. This part of the
|
||||
unit tests is incomplete since the Fortran module it is based on is
|
||||
incomplete as well.
|
||||
|
||||
Tests for the C++-style library interface
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@ -293,7 +303,7 @@ The ``unittest/formats`` folder contains test programs for reading and
|
||||
writing files like data files, restart files, potential files or dump files.
|
||||
This covers simple things like the file i/o convenience functions in the
|
||||
``utils::`` namespace to complex tests of atom styles where creating and
|
||||
deleting atoms with different properties is tested in different ways
|
||||
deleting of atoms with different properties is tested in different ways
|
||||
and through script commands or reading and writing of data or restart files.
|
||||
|
||||
Tests for styles computing or modifying forces
|
||||
@ -395,10 +405,10 @@ compare with the reference and also start from the data file. A final
|
||||
check will use multi-cutoff r-RESPA (if supported by the pair style) at
|
||||
a 1:1 split and compare to the Verlet results. These sets of tests are
|
||||
run with multiple test fixtures for accelerated styles (OPT, OPENMP,
|
||||
INTEL, KOKKOS (OpenMP only)) and for the latter three with 4 OpenMP
|
||||
threads enabled. For these tests the relative error (epsilon) is lowered
|
||||
by a common factor due to the additional numerical noise, but the tests
|
||||
are still comparing to the same reference data.
|
||||
INTEL) and for the latter two with 4 OpenMP threads enabled. For
|
||||
these tests the relative error (epsilon) is lowered by a common factor
|
||||
due to the additional numerical noise, but the tests are still comparing
|
||||
to the same reference data.
|
||||
|
||||
Additional tests will check whether all listed extract keywords are
|
||||
supported and have the correct dimensionality and the final set of tests
|
||||
@ -411,7 +421,7 @@ With this scheme a large fraction of the code of any tested pair style
|
||||
will be executed and consistent results are required for different
|
||||
settings and between different accelerated pair style variants and the
|
||||
base class, as well as for computing individual pairs through the
|
||||
``Pair::single()`` method where supported.
|
||||
``Pair::single()`` where supported.
|
||||
|
||||
The ``test_pair_style`` tester is used with 4 categories of test inputs:
|
||||
|
||||
@ -432,19 +442,17 @@ The ``test_pair_style`` tester is used with 4 categories of test inputs:
|
||||
pair style is defined, but the computation of the pair style contributions
|
||||
is disabled.
|
||||
|
||||
The ``test_bond_style``, ``test_angle_style``, ``test_dihedral_style``, and
|
||||
``test_improper_style`` tester programs are set up in a similar fashion and
|
||||
share support functions with the pair style tester. The final group of
|
||||
tests in this section is for fix styles that add/manipulate forces and
|
||||
velocities, e.g. for time integration, thermostats and more.
|
||||
The ``test_bond_style`` and ``test_angle_style`` are set up in a similar
|
||||
fashion and share support functions with the pair style tester. The final
|
||||
group of tests in this section is for fix styles that add/manipulate forces
|
||||
and velocities, e.g. for time integration, thermostats and more.
|
||||
|
||||
Adding a new test is easiest done by copying and modifying an existing YAML
|
||||
file for a style that is similar to one to be tested. The file name should
|
||||
follow the naming conventions described above and after copying the file,
|
||||
the first step is to replace the style names where needed. The coefficient
|
||||
values do not have to be meaningful, just in a reasonable range for the
|
||||
given system. It does not matter if some forces are large, as long as
|
||||
they do not diverge.
|
||||
Adding a new test is easiest done by copying and modifying an existing test
|
||||
for a style that is similar to one to be tested. The file name should follow
|
||||
the naming conventions described above and after copying the file, the first
|
||||
step is to replace the style names where needed. The coefficient values
|
||||
do not have to be meaningful, just in a reasonable range for the given system.
|
||||
It does not matter if some forces are large, for as long as they do not diverge.
|
||||
|
||||
The template input files define a large number of index variables at the top
|
||||
that can be modified inside the YAML file to control the behavior. For example,
|
||||
@ -472,7 +480,7 @@ Note that this disables computing the kspace contribution, but still will run
|
||||
the setup. The "gewald" parameter should be set explicitly to speed up the run.
|
||||
For styles with long-range electrostatics, typically two tests are added one using
|
||||
the (slower) analytic approximation of the erfc() function and the other using
|
||||
the tabulated coulomb, to test both code paths. The reference results in the YAML
|
||||
the tabulated coulomb, to test both code paths. The reference results in the YAML
|
||||
files then should be compared manually, if they agree well enough within the limits
|
||||
of those two approximations.
|
||||
|
||||
@ -526,101 +534,3 @@ The ``unittest/tools`` folder contains tests for programs in the
|
||||
shell, which are implemented as a python scripts using the ``unittest``
|
||||
Python module and launching the tool commands through the ``subprocess``
|
||||
Python module.
|
||||
|
||||
|
||||
Troubleshooting failed unit tests
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
The are by default no unit tests for newly added features (e.g. pair, fix,
|
||||
or compute styles) unless your pull request also includes tests for the
|
||||
added features. If you are modifying some features, you may see failures
|
||||
for existing tests, if your modifications have some unexpected side effects
|
||||
or your changes render the existing test invalid. If you are adding an
|
||||
accelerated version of an existing style, then only tests for INTEL,
|
||||
KOKKOS (with OpenMP only), OPENMP, and OPT will be run automatically.
|
||||
Tests for the GPU package are time consuming and thus are only run
|
||||
*after* a merge, or when a special label, ``gpu_unit_tests`` is added
|
||||
to the pull request. After the test has started, it is often best to
|
||||
remove the label since every PR activity will re-trigger the test (that
|
||||
is a limitation of triggering a test with a label). Support for unit
|
||||
tests when using KOKKOS with GPU acceleration is currently not supported.
|
||||
|
||||
When you see a failed build on GitHub, click on ``Details`` to be taken
|
||||
to the corresponding LAMMPS Jenkins CI web page. Click on the "Exit"
|
||||
symbol near the ``Logout`` button on the top right of that page to go to
|
||||
the "classic view". In the classic view, there is a list of the
|
||||
individual runs that make up this test run (they are shown but cannot be
|
||||
inspected in the default view). You can click on any of those.
|
||||
Clicking on ``Test Result`` will display the list of failed tests. Click
|
||||
on the "Status" column to sort the tests based on their Failed or Passed
|
||||
status. Then click on the failed test to expand its output.
|
||||
|
||||
For example, the following output snippet shows the failed unit test
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
[ RUN ] PairStyle.gpu
|
||||
/home/builder/workspace/dev/pull_requests/ubuntu_gpu/unit_tests/cmake_gpu_opencl_mixed_smallbig_clang_static/unittest/force-styles/test_main.cpp:63: Failure
|
||||
Expected: (err) <= (epsilon)
|
||||
Actual: 0.00018957912910606503 vs 0.0001
|
||||
Google Test trace:
|
||||
/home/builder/workspace/dev/pull_requests/ubuntu_gpu/unit_tests/cmake_gpu_opencl_mixed_smallbig_clang_static/unittest/force-styles/test_main.cpp:56: EXPECT_FORCES: init_forces (newton off)
|
||||
/home/builder/workspace/dev/pull_requests/ubuntu_gpu/unit_tests/cmake_gpu_opencl_mixed_smallbig_clang_static/unittest/force-styles/test_main.cpp:64: Failure
|
||||
Expected: (err) <= (epsilon)
|
||||
Actual: 0.00022892713393549854 vs 0.0001
|
||||
|
||||
The failed assertions provide line numbers in the test source
|
||||
(e.g. ``test_main.cpp:56``), from which one can understand what
|
||||
specific assertion failed.
|
||||
|
||||
Note that the force style engine runs one of a small number of systems
|
||||
in a rather off-equilibrium configuration with a few atoms for a few
|
||||
steps, writes data and restart files, uses :doc:`the clear command
|
||||
<clear>` to reset LAMMPS, and then runs from those files with different
|
||||
settings (e.g. newton on/off) and integrators (e.g. verlet vs. respa).
|
||||
Beyond potential issues/bugs in the source code, the mismatch between
|
||||
the expected and actual values could be that force arrays are not
|
||||
properly cleared between multiple run commands or that class members are
|
||||
not correctly initialized or written to or read from a data or restart
|
||||
file.
|
||||
|
||||
While the epsilon (relative precision) for a single, `IEEE 754 compliant
|
||||
<https://en.wikipedia.org/wiki/IEEE_754>`_, double precision floating
|
||||
point operation is at about 2.2e-16, the achievable precision for the
|
||||
tests is lower due to most numbers being sums over intermediate results
|
||||
and the non-associativity of floating point math leading to larger
|
||||
errors. As a rule of thumb, the test epsilon can often be in the range
|
||||
5.0e-14 to 1.0e-13. But for "noisy" force kernels, e.g. those a larger
|
||||
amount of arithmetic operations involving `exp()`, `log()` or `sin()`
|
||||
functions, and also due to the effect of compiler optimization or differences
|
||||
between compilers or platforms, epsilon may need to be further relaxed,
|
||||
sometimes epsilon can be relaxed to 1.0e-12. If interpolation or lookup
|
||||
tables are used, epsilon may need to be set to 1.0e-10 or even higher.
|
||||
For tests of accelerated styles, the per-test epsilon is multiplied
|
||||
by empirical factors that take into account the differences in the order
|
||||
of floating point operations or that some or most intermediate operations
|
||||
may be done using approximations or with single precision floating point
|
||||
math.
|
||||
|
||||
To rerun the failed unit test individually, change to the ``build`` directory
|
||||
and run the test with verbose output. For example,
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
env TEST_ARGS=-v ctest -R ^MolPairStyle:lj_cut_coul_long -V
|
||||
|
||||
``ctest`` with the ``-V`` flag also shows the exact command line
|
||||
of the test. One can then use ``gdb --args`` to further debug and
|
||||
catch exceptions with the test command, for example,
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
gdb --args /path/to/lammps/build/test_pair_style /path/to/lammps/unittest/force-styles/tests/mol-pair-lj_cut_coul_long.yaml
|
||||
|
||||
|
||||
It is recommended to configure the build with ``-D
|
||||
BUILD_SHARED_LIBS=on`` and use a custom linker to shorten the build time
|
||||
during recompilation. Installing `ccache` in your development
|
||||
environment helps speed up recompilation by caching previous
|
||||
compilations and detecting when the same compilation is being done
|
||||
again. Please see :doc:`Build_development` for further details.
|
||||
|
||||
@ -18,10 +18,8 @@ Available topics in mostly chronological order are:
|
||||
- `Setting flags in the constructor`_
|
||||
- `Rename of pack/unpack_comm() to pack/unpack_forward_comm()`_
|
||||
- `Use ev_init() to initialize variables derived from eflag and vflag`_
|
||||
- `Use utils::count_words() functions instead of atom->count_words()`_
|
||||
- `Use utils::numeric() functions instead of force->numeric()`_
|
||||
- `Use utils::open_potential() function to open potential files`_
|
||||
- `Use symbolic Atom and AtomVec constants instead of numerical values`_
|
||||
- `Simplify customized error messages`_
|
||||
- `Use of "override" instead of "virtual"`_
|
||||
- `Simplified and more compact neighbor list requests`_
|
||||
@ -52,9 +50,10 @@ Rename of pack/unpack_comm() to pack/unpack_forward_comm()
|
||||
|
||||
.. versionchanged:: 8Aug2014
|
||||
|
||||
In this change set, the functions to pack/unpack data into communication buffers
|
||||
for :doc:`forward communications <Developer_comm_ops>` were renamed from
|
||||
``pack_comm()`` and ``unpack_comm()`` to ``pack_forward_comm()`` and
|
||||
In this change set the functions to pack data into communication buffers
|
||||
and to unpack data from communication buffers for :doc:`forward
|
||||
communications <Developer_comm_ops>` were renamed from ``pack_comm()``
|
||||
and ``unpack_comm()`` to ``pack_forward_comm()`` and
|
||||
``unpack_forward_comm()``, respectively. Also the meaning of the return
|
||||
value of these functions was changed: rather than returning the number
|
||||
of items per atom stored in the buffer, now the total number of items
|
||||
@ -108,7 +107,7 @@ Use ev_init() to initialize variables derived from eflag and vflag
|
||||
There are several variables that need to be initialized based on
|
||||
the values of the "eflag" and "vflag" variables and since sometimes
|
||||
there are new bits added and new variables need to be set to 1 or 0.
|
||||
To make this consistent across all styles, there is now an inline
|
||||
To make this consistent, across all styles, there is now an inline
|
||||
function ``ev_init(eflag, vflag)`` that makes those settings
|
||||
consistently and calls either ``ev_setup()`` or ``ev_unset()``.
|
||||
Example from a pair style:
|
||||
@ -130,41 +129,6 @@ Not applying this change will not cause a compilation error, but
|
||||
can lead to inconsistent behavior and incorrect tallying of
|
||||
energy or virial.
|
||||
|
||||
Use utils::count_words() functions instead of atom->count_words()
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. versionchanged:: 2Jun2020
|
||||
|
||||
The "count_words()" functions for parsing text have been moved from the
|
||||
Atom class to the :doc:`utils namespace <Developer_utils>`. The
|
||||
"count_words()" function in "utils" uses the Tokenizer class internally
|
||||
to split a line into words and count them, thus it will not modify the
|
||||
argument string as the function in the Atoms class did and thus had a
|
||||
variant using a copy buffer. Unlike the old version, the new version
|
||||
does not remove comments. For that you can use the
|
||||
:cpp:func:`utils::trim_comment() function
|
||||
<LAMMPS_NS::utils::trim_comment>` as shown in the example below.
|
||||
|
||||
Old:
|
||||
|
||||
.. code-block:: c++
|
||||
|
||||
nwords = atom->count_words(line);
|
||||
int nwords = atom->count_words(buf);
|
||||
|
||||
New:
|
||||
|
||||
.. code-block:: c++
|
||||
|
||||
nwords = utils::count_words(line);
|
||||
int nwords = utils::count_words(utils::trim_comment(buf));
|
||||
|
||||
.. seealso::
|
||||
|
||||
:cpp:func:`utils::count_words() <LAMMPS_NS::utils::count_words>`,
|
||||
:cpp:func:`utils::trim_comments() <LAMMPS_NS::utils::trim_comments>`
|
||||
|
||||
|
||||
Use utils::numeric() functions instead of force->numeric()
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
@ -172,12 +136,11 @@ Use utils::numeric() functions instead of force->numeric()
|
||||
|
||||
The "numeric()" conversion functions (including "inumeric()",
|
||||
"bnumeric()", and "tnumeric()") have been moved from the Force class to
|
||||
the :doc:`utils namespace <Developer_utils>`. Also they take an
|
||||
additional argument that selects whether the ``Error::all()`` or
|
||||
``Error::one()`` function should be called in case of an error. The
|
||||
former should be used when *all* MPI processes call the conversion
|
||||
function and the latter *must* be used when they are called from only
|
||||
one or a subset of the MPI processes.
|
||||
the utils namespace. Also they take an additional argument that selects
|
||||
whether the ``Error::all()`` or ``Error::one()`` function should be
|
||||
called in case of an error. The former should be used when *all* MPI
|
||||
processes call the conversion function and the latter *must* be used
|
||||
when they are called from only one or a subset of the MPI processes.
|
||||
|
||||
Old:
|
||||
|
||||
@ -210,14 +173,14 @@ The :cpp:func:`utils::open_potential()
|
||||
calls to ``force->open_potential()`` and should be used to replace
|
||||
``fopen()`` for opening potential files for reading. The custom
|
||||
function does three additional steps compared to ``fopen()``: 1) it will
|
||||
try to parse the ``UNITS:`` and ``DATE:`` metadata and will stop with an
|
||||
try to parse the ``UNITS:`` and ``DATE:`` metadata will stop with an
|
||||
error on a units mismatch and will print the date info, if present, in
|
||||
the log file; 2) for pair styles that support it, it will set up
|
||||
possible automatic unit conversions based on the embedded unit
|
||||
information and LAMMPS' current units setting; 3) it will not only try
|
||||
to open a potential file at the given path, but will also search in the
|
||||
folders listed in the ``LAMMPS_POTENTIALS`` environment variable. This
|
||||
allows potential files to reside in a common location instead of having to
|
||||
allows to keep potential files in a common location instead of having to
|
||||
copy them around for simulations.
|
||||
|
||||
Old:
|
||||
@ -233,73 +196,6 @@ New:
|
||||
|
||||
fp = utils::open_potential(filename, lmp);
|
||||
|
||||
Use symbolic Atom and AtomVec constants instead of numerical values
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. versionchanged:: 18Sep2020
|
||||
|
||||
Properties in LAMMPS that were represented by integer values (0, 1,
|
||||
2, 3) to indicate settings in the ``Atom`` and ``AtomVec`` classes (or
|
||||
classes derived from it) (and its derived classes) have been converted
|
||||
to use scoped enumerators instead.
|
||||
|
||||
.. list-table::
|
||||
:header-rows: 1
|
||||
:widths: 23 10 23 10 23 10
|
||||
|
||||
* - Symbolic Constant
|
||||
- Value
|
||||
- Symbolic Constant
|
||||
- Value
|
||||
- Symbolic Constant
|
||||
- Value
|
||||
* - Atom::GROW
|
||||
- 0
|
||||
- Atom::ATOMIC
|
||||
- 0
|
||||
- Atom::MAP_NONE
|
||||
- 0
|
||||
* - Atom::RESTART
|
||||
- 1
|
||||
- Atom::MOLECULAR
|
||||
- 1
|
||||
- Atom::MAP_ARRAY
|
||||
- 1
|
||||
* - Atom::BORDER
|
||||
- 2
|
||||
- Atom::TEMPLATE
|
||||
- 2
|
||||
- Atom::MAP_HASH
|
||||
- 2
|
||||
* - AtomVec::PER_ATOM
|
||||
- 0
|
||||
- AtomVec::PER_TYPE
|
||||
- 1
|
||||
- Atom::MAP_YES
|
||||
- 3
|
||||
|
||||
Old:
|
||||
|
||||
.. code-block:: c++
|
||||
|
||||
molecular = 0;
|
||||
mass_type = 1;
|
||||
if (atom->molecular == 2)
|
||||
if (atom->map_style == 2)
|
||||
atom->add_callback(0);
|
||||
atom->delete_callback(id,1);
|
||||
|
||||
New:
|
||||
|
||||
.. code-block:: c++
|
||||
|
||||
molecular = Atom::ATOMIC;
|
||||
mass_type = AtomVec::PER_TYPE;
|
||||
if (atom->molecular == Atom::TEMPLATE)
|
||||
if (atom->map_style == Atom::MAP_HASH)
|
||||
atom->add_callback(Atom::GROW);
|
||||
atom->delete_callback(id,Atom::RESTART);
|
||||
|
||||
Simplify customized error messages
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
@ -307,7 +203,7 @@ Simplify customized error messages
|
||||
|
||||
Aided by features of the bundled {fmt} library, error messages now
|
||||
can have a variable number of arguments and the string will be interpreted
|
||||
as a {fmt} style format string so that error messages can be
|
||||
as a {fmt} style format string so that custom error messages can be
|
||||
easily customized without having to use temporary buffers and ``sprintf()``.
|
||||
Example:
|
||||
|
||||
@ -333,7 +229,7 @@ Use of "override" instead of "virtual"
|
||||
|
||||
.. versionchanged:: 17Feb2022
|
||||
|
||||
Since LAMMPS requires C++11, we switched to use the "override" keyword
|
||||
Since LAMMPS requires C++11 we switched to use the "override" keyword
|
||||
instead of "virtual" to indicate polymorphism in derived classes. This
|
||||
allows the C++ compiler to better detect inconsistencies when an
|
||||
override is intended or not. Please note that "override" has to be
|
||||
@ -371,7 +267,7 @@ Simplified function names for forward and reverse communication
|
||||
|
||||
.. versionchanged:: 24Mar2022
|
||||
|
||||
Rather than using the function name to distinguish between the different
|
||||
Rather then using the function name to distinguish between the different
|
||||
forward and reverse communication functions for styles, LAMMPS now uses
|
||||
the type of the "this" pointer argument.
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user