Compare commits

..

241 Commits

Author SHA1 Message Date
260e6bafd5 Merge pull request #2064 from akohlmey/next_lammps_version
Update version strings for the next patch release
2020-05-04 19:43:12 -04:00
1329603184 Merge pull request #2019 from z-gong/viscosity
Fix and compute styles for calculating viscosity with periodic perturbation method
2020-05-04 17:42:31 -04:00
71ab9dc02b Merge pull request #2049 from rbberger/singularity_container_update
Singularity container update
2020-05-04 17:27:54 -04:00
6d0ef85671 Merge pull request #2055 from akohlmey/reaxc-runtime-adjust
Make MIN_HBONDS define for reax/c configurable via an input option
2020-05-04 10:28:13 -04:00
48262fd0a9 Merge pull request #2051 from akohlmey/collected-small-changes
Collected small changes for the next patch release
2020-05-04 10:06:45 -04:00
bed6ad4660 manually incorporate fixes for ave/correlate/long from PR #2066 2020-05-04 08:18:56 -04:00
7295e93e9b step version strings for the next patch release 2020-05-03 07:28:38 -04:00
61284891ee add a few more packages to the "most" preset 2020-05-03 05:04:07 -04:00
b12b69f6dc silence compiler warning 2020-05-03 04:55:35 -04:00
f1e1644fe1 fix typo that resulted in LAPACK not being properly linked with USER-ATC 2020-05-03 04:55:25 -04:00
d811fd0da7 skip building chain.x, if no Fortran compiler is available 2020-05-03 04:23:52 -04:00
fdb4ba51da add patch to VORONOI package external build so it will compile with BSD make 2020-05-03 04:04:02 -04:00
f5be3ccab4 add the check for MPI in USER-ATC at the correct location 2020-05-03 03:06:41 -04:00
863b50501c port MPI stubs workaround to USER-ATC 2020-05-03 02:49:52 -04:00
4bf9c47317 support diskfree option to "fix halt" also on BSD variants 2020-05-03 02:34:40 -04:00
e8d4cc424e use different header for alloca(3) on *BSD 2020-05-03 01:10:04 -04:00
fa2a6d7c6b replace legacy preprocessor tests for linux with POSIX compliant ones 2020-05-03 01:04:52 -04:00
d5b9948129 extend FreeBSD preprocessor checks to other BSD flavors 2020-05-03 01:00:01 -04:00
795e2cb133 recover compilation of fix imd on FreeBSD 2020-05-02 16:04:01 -04:00
2b542eacb7 add FreeBSD compatibility 2020-05-02 15:56:24 -04:00
613b8a7596 use static_cast<>() for casting NULL 2020-05-02 06:29:43 -04:00
c18efdbfa7 initialize pointers in order of definition 2020-05-02 06:29:12 -04:00
1418ec4ace make MIN_HBONDS define for reax/c configurable via an input option 2020-05-01 23:22:48 -04:00
8c52032b7a Merge pull request #1902 from stanmoore1/kk_compute_coord_atom
Add Kokkos version of compute coord/atom
2020-05-01 19:36:19 -04:00
53ac67f522 Merge pull request #2053 from stanmoore1/kk_remap_mpi
Allow Kokkos remap to turn off CUDA-aware MPI
2020-05-01 19:35:03 -04:00
91d871ec27 Merge pull request #2054 from stanmoore1/kk_cb2a9e4
Add change missed in #2004
2020-05-01 19:33:51 -04:00
af3e8b4564 Add change missed in cb2a9e4 2020-05-01 13:25:23 -06:00
f8226508f4 Allow Kokkos remap to turn off Cuda-aware MPI 2020-05-01 12:09:32 -06:00
0cf5636034 Add missing paramemter to compute_orientorder_atom docs 2020-05-01 08:01:29 -06:00
6817355a41 Update docs 2020-05-01 07:53:41 -06:00
f9ba4b497f Use ccache on Ubuntu by default 2020-05-01 08:01:17 -04:00
d9e0bc5d94 Add missing packages for legacy build 2020-05-01 05:55:03 -04:00
71159c4af4 Made orientorder check safer 2020-04-30 21:39:37 -06:00
89f119e8aa avoid segfaults when selecting a subset on MPI ranks that will not have any matching lattice positions to start with 2020-04-30 22:12:07 -04:00
d382db1c76 Merge pull request #2015 from jvita/fix-spline-meam-binning
Fix spline meam binning
2020-04-30 20:55:49 -04:00
814f45d756 Add missing symlink 2020-04-30 18:25:25 -04:00
6913e3a6a4 Merge pull request #1760 from lammps/fix-dummy
added internal fix dummy command to enable more control of fix ordering
2020-04-30 14:46:22 -04:00
14322a9907 Allow compute_coord_atom to use Kokkos orientorder 2020-04-30 12:37:05 -06:00
ac45befbb6 Pre-compute 1/h and store 2020-04-30 12:57:59 -05:00
23c5384b47 Merge branch 'master' of https://github.com/lammps/lammps into kk_compute_coord_atom 2020-04-30 11:34:19 -06:00
6b8f26e8ad Merge pull request #2046 from stanmoore1/kk_cutneighsq
Fix rare issue in Kokkos neighlist
2020-04-30 13:00:51 -04:00
ae3c804cd2 Minor fix in doc 2020-04-30 19:00:37 +02:00
3ecaf0f336 Merge pull request #2047 from lammps/replica-doc-page
Clarifying AMD quote from review paper for 3 AMD methods in LAMMPS
2020-04-30 12:50:01 -04:00
0b02108ba1 add add check to refuse running with 2d systems and document it. 2020-04-30 12:46:16 -04:00
859f644481 make spellchecker and sphinx happy 2020-04-30 12:45:36 -04:00
5062d57ccb Merge branch 'master' into viscosity 2020-04-30 12:32:06 -04:00
c39b71cd1b Merge pull request #2048 from junghans/cmake_disable_static_lib_install
cmake: disable installing of static libs
2020-04-30 12:28:41 -04:00
26321d49c4 Update How-to viscosity and put the example together with other viscosity examples. 2020-04-30 17:05:01 +02:00
eba1a15616 Port changes to Kokkos package 2020-04-30 08:44:55 -06:00
88bf503451 Merge from master 2020-04-30 08:17:05 -06:00
002c49737f update definition for ubuntu20.04 2020-04-29 22:58:08 -04:00
696308a760 set cmake policy to honor HDF5_ROOT and NETCDF_ROOT. search for parallel NetCDF only with parallel builds 2020-04-29 22:39:33 -04:00
e97bf005cb include hdf5 and netcdf in more images 2020-04-29 22:36:33 -04:00
1adda03202 cmake: only install shared lib and friends 2020-04-29 18:06:33 -06:00
aad8659788 Reduce CUDA footprint in containers 2020-04-29 20:02:25 -04:00
600d357155 cmake: disable installing of static libs 2020-04-29 16:26:56 -06:00
18c63ade92 clarified AMD quote from review paper 2020-04-29 16:14:52 -06:00
633651fa56 Add valgrind, gdb to containers and clean caches 2020-04-29 17:32:19 -04:00
63a2f17410 Merge branch 'master' of https://github.com/lammps/lammps into kk_compute_coord_atom 2020-04-29 15:16:52 -06:00
8235c48f49 Avoid errors due to host Lmod in containers
These changes ensure that environment variables that are automatically passed
to the container don't interfere with Lmod inside of the container. The previous
implementation would not take care of sticky packages from the outside and Lmod
would try to reload them.

Note that Lmod defines the 'module' bash function, which doesn't propagate to
the final shell when using 'singularity shell'. If the 'module' command is needed
a login shell needs to be launched:

$ singularity exec <CONTAINER> bash -l
2020-04-29 17:01:55 -04:00
82b1fc717f Add missing python36 and hdf5-devel to CentOS containers 2020-04-29 16:46:22 -04:00
0588232a34 Fix rare issue in Kokkos neighlist 2020-04-29 14:29:18 -06:00
5c2f0ecc65 Merge pull request #2045 from stanmoore1/kk_team_coul
Fix issue in Kokkos "team" energy
2020-04-29 15:32:45 -04:00
feed7302d5 Merge pull request #2044 from stanmoore1/kk_reax_full
Remove full neigh list option in Kokkos ReaxFF
2020-04-29 14:54:54 -04:00
e10d62c89f Fix energy tally issue 2020-04-29 10:06:09 -06:00
04388c26f8 Fix Kokkos view runtime issue 2020-04-29 10:05:47 -06:00
7508660d8a Merge pull request #2036 from stanmoore1/kk_dihedral_charmm
Fix issues in dihedral_charmm_kokkos
2020-04-29 10:24:32 -04:00
fe9e6736e1 Merge branch 'master' into kk_dihedral_charmm 2020-04-29 08:00:55 -06:00
910d00f500 Merge pull request #2041 from stanmoore1/kk_team_ev
Fix Kokkos issue and remove N2 neigh list option
2020-04-28 19:23:35 -04:00
17f7bf2fb9 Merge pull request #2035 from stanmoore1/kk_uvm
Fix UVM compile issues
2020-04-28 19:23:12 -04:00
e47dc6fec9 Merge pull request #2043 from ellio167/ubuntu-install-docs
Update ubuntu ppa install docs
2020-04-28 19:22:27 -04:00
a88364a2ea Tweak error message 2020-04-28 15:39:01 -06:00
754d9fabc6 Merge branch 'ubuntu-install-docs' of github.com:ellio167/lammps into ubuntu-install-docs 2020-04-28 17:27:49 -04:00
b3d8986603 list update kokkos flag 2020-04-28 17:27:23 -04:00
846146c9d4 correct minor formatting and markup issues 2020-04-28 17:23:16 -04:00
e9a777e63d Add explaination of potenentials directory behavior for lmp_daily 2020-04-28 16:16:28 -05:00
4bb5f99801 fix underline 2020-04-28 17:15:48 -04:00
fa0f10f2f5 Remove debug output 2020-04-28 15:15:26 -06:00
6ed2adcd31 Removed unused functions 2020-04-28 15:12:41 -06:00
681878aa24 Merge branch 'master' into viscosity 2020-04-28 17:11:04 -04:00
62cdc9d6f1 Remove full neigh list option in Kokkos ReaxFF 2020-04-28 15:08:30 -06:00
c6dc0cf8c5 flag commands and paths as literals. 2020-04-28 17:03:20 -04:00
3392dca7b8 fix typos in manual 2020-04-28 16:45:02 -04:00
87ca8a0627 Update ubuntu ppa install docs 2020-04-28 15:38:41 -05:00
f5a8d40a51 Merge pull request #1906 from stanmoore1/kk_copycpu
Add method to copy Kokkos neighbor list to CPU list
2020-04-28 15:34:05 -04:00
32f5fd2373 Comment cleanup 2020-04-28 10:39:31 -06:00
712b8668cb Fix Kokkos neighlist issue and remove N2 option 2020-04-28 10:33:10 -06:00
21cb0d394f Merge branch 'master' into kk_copycpu 2020-04-28 11:56:22 -04:00
2e07345cea Merge pull request #2023 from akohlmey/collected-small-changes
Collected small changes and bugfixes
2020-04-28 11:52:54 -04:00
7863dfa1d2 Merge pull request #2033 from stanmoore1/kk_stencil
Fix bug in Kokkos occasional neighlist build
2020-04-28 10:51:34 -04:00
8f9323a3d7 Merge pull request #2013 from wverestek/master
small modification to fix bond/react to allow equal style variables as probability input
2020-04-28 10:51:07 -04:00
ad47b64cb9 Merge pull request #65 from junghans/collected-small-changes
GPU.cmake: localize hackery
2020-04-28 10:49:39 -04:00
ef3e071067 GPU.cmake: localize hackery 2020-04-28 07:43:31 -06:00
672d593241 Merge pull request #64 from junghans/collected-small-changes
cmake: reenable CMAKE_TUNE_FLAGS check
2020-04-28 08:50:37 -04:00
24fe5bc187 cmake: reenable CMAKE_TUNE_FLAGS check 2020-04-28 06:03:34 -06:00
6be36196da explicitly include STUBS MPI headers for serial compile since we seem to pick up the OpenMP ones otherwise 2020-04-28 01:36:21 -04:00
705c10ef47 restore original command 2020-04-28 01:12:49 -04:00
867088dbd8 add packages to also allow a regular build not just cross-compilation 2020-04-28 01:12:31 -04:00
d931365e4e fix typos 2020-04-28 01:11:54 -04:00
d3017744a9 updates for building with hip 2020-04-28 00:39:11 -04:00
25d1ad7714 update HIP compilation makefile for updated legacy build 2020-04-27 23:18:25 -04:00
b362a06ca3 (temporarily) disable CMAKE_TUNE_FLAGS verification script code 2020-04-27 23:17:43 -04:00
dd5ebb0a81 add preset to compile with hcc 2020-04-27 22:30:17 -04:00
29d667721a tweak GPU.cmake so that hip_get_devices compiles and links 2020-04-27 22:29:41 -04:00
5006c2c329 Merge branch 'latte_super_build' of github.com:junghans/lammps into collected-small-changes 2020-04-27 21:19:45 -04:00
0b93b45f2a Fix issues in dihedral_charmm_kokkos 2020-04-27 15:55:15 -06:00
c828492dee Merge branch 'collected-small-changes' of github.com:akohlmey/lammps into collected-small-changes 2020-04-27 17:18:59 -04:00
edd708dbce fix command ordering issues with gpu image build 2020-04-27 17:17:33 -04:00
76d7699abe remove trailing whitespace 2020-04-27 16:58:43 -04:00
74e8505a1f Merge branch 'master' into collected-small-changes 2020-04-27 16:57:47 -04:00
2dd737e765 Fix UVM compile issues 2020-04-27 14:47:03 -06:00
b38e95f88c Merge pull request #1895 from stanmoore1/kk_compute_orientorder_atom
Add Kokkos version of compute orientorder/atom
2020-04-27 16:34:29 -04:00
0f28e0eb0f Merge pull request #2030 from lammps/revert-2018-cmake_kim-api_find
Revert "cmake: move kim-api detection to cmake config"
2020-04-27 16:16:55 -04:00
121b40ebaa Merge pull request #2026 from ndtrung81/ellipsoid-gpu-special-bonds
Fixed bugs with special bonds for ellipsoid gpu pair styles
2020-04-27 16:15:58 -04:00
d4c06a2e2a Merge pull request #2027 from junghans/cmake_clean_up_plumed
USER-PLUMED: remove unused defines
2020-04-27 16:12:58 -04:00
0a9bed0ca6 Merge branch 'cmake_clean_up_plumed' of github.com:junghans/lammps into collected-small-changes 2020-04-27 16:07:52 -04:00
7b79b31018 remove latex support from accelerator image definitions 2020-04-27 15:17:45 -04:00
1aaf3ee03f add new combined container for compiling with GPU support. 2020-04-27 15:14:02 -04:00
0338d57857 Merge branch 'kokkos_fix' of github.com:yafshar/lammps into collected-small-changes 2020-04-27 15:00:04 -04:00
f9b873db24 Merge pull request #2032 from akohlmey/change-box-image-flags
Reset image flag(s) when changing from periodic to non-periodic
2020-04-27 14:58:36 -04:00
437967bfd8 adding the standard header to prevent ‘NULL’ was not declared error 2020-04-27 12:49:03 -05:00
a4b3af7d95 Fix bug in Kokkos occasional neighlist build 2020-04-27 10:07:26 -06:00
73ec2d8182 fix typo in MPI_Allreduce call. 2020-04-27 11:06:17 -04:00
b04cc115f3 document the image flag reset for switching boundaries 2020-04-27 10:51:53 -04:00
644f74c585 when changing boundaries from periodic to non-periodic, we need to reset the image flags for these dimensions to 0 2020-04-27 10:39:34 -04:00
a96f0af271 Merge branch 'kk_compute_orientorder_atom' of ssh://github.com/stanmoore1/lammps into kk_compute_coord_atom 2020-04-27 08:32:55 -06:00
ee9757b155 Add missing copymode flag statement 2020-04-27 08:31:56 -06:00
3028b028f0 Merge branch 'kk_compute_orientorder_atom' of ssh://github.com/stanmoore1/lammps into kk_compute_coord_atom 2020-04-27 08:14:52 -06:00
5de6224bd3 Fix logic error 2020-04-27 08:14:19 -06:00
f1aaad2b13 remove trailing whitespace 2020-04-27 09:54:05 -04:00
bc3a1187ae make behavior of comparing cutoff and long-range coulomb independent of order 2020-04-27 08:06:20 -04:00
d946c61789 re-indent code to better match LAMMPS conventions 2020-04-26 23:25:52 -04:00
d53e468ce0 do not mix c++ style and c-style comments 2020-04-26 22:50:24 -04:00
8fec14f593 Update fix_bond_react.rst 2020-04-26 13:08:40 -06:00
6baca04447 round up 'nevery' variable eval 2020-04-26 12:45:42 -06:00
281c105a34 KIM.cmake: add workaround for <cmake-3.12 2020-04-26 12:02:18 -06:00
d092b24c2e Revert "cmake: move kim-api detection to cmake config" 2020-04-26 11:56:48 -06:00
0b6e5be379 cosmetic edit to trigger new CI test runs 2020-04-26 00:25:07 -04:00
9a5b7141af move MPI compilation variable definitions workaround to MPI4WIN.cmake 2020-04-26 00:14:27 -04:00
a614242595 allow variable-input for Nevery, Rmin, Rmax keywords 2020-04-25 21:45:43 -06:00
e5360bb68a Merge remote-tracking branch 'github/cmake_latte_link_fix' into collected-small-changes 2020-04-25 23:07:58 -04:00
758a27c1e7 update MPI detection and handling of MPI to not automatically assume that a windows target means cross-compiling 2020-04-25 22:06:36 -04:00
7fd50045fe USER-PLUMED: remove unused defines 2020-04-25 10:16:58 -06:00
1295a9ef46 Fixed bugs with special bonds for ellipsoid gpu pair styles 2020-04-25 10:28:18 -05:00
5308b00c7b Update LATTE.cmake 2020-04-25 07:28:16 -06:00
3bebf017c0 Rename log.22Apr20.tiny_nylon.unstabilized.g++.4 to log.22Apr20.tiny_nylon.stabilized_variable_probability.g++.4 2020-04-25 15:05:32 +02:00
a6c3f2c0e3 Rename log.22Apr20.tiny_nylon.unstabilized.g++.1 to log.22Apr20.tiny_nylon.stabilized_variable_probability.g++.1 2020-04-25 15:04:46 +02:00
643ef2e2bc return of the data file 2020-04-24 22:59:20 -06:00
bac681b9dc cmake: fix linkage against external latte 2020-04-24 20:51:58 -06:00
1de3995598 rename src/MAKE/MINE/... to src/MAKE/MINE/.gitignore to avoid penalizing people downloading LAMMPS via git on windows 2020-04-24 21:26:11 -04:00
0a96a8c3a5 make check for running under hybrid/overlay compatible with suffix styles
also improve error message
2020-04-24 21:23:21 -04:00
72ff0dd87d Merge pull request #2004 from stanmoore1/kk_3.1
Update Kokkos library in LAMMPS to v3.1
2020-04-24 18:35:53 -04:00
5cbebddae6 Merge pull request #2006 from ndtrung81/body-doc-fix
Fixed the doc page for fix wall/body/polyhedron
2020-04-24 18:01:50 -04:00
3f8efed1fd Merge pull request #2010 from akohlmey/collected-small-fixes
Collected bug fixes and small updates
2020-04-24 17:44:49 -04:00
5855d334e6 Merge pull request #2014 from ellio167/kim_charge
Added changes to support SMs setting charges in kim_interactions
2020-04-24 17:13:58 -04:00
4dae4578ad Merge pull request #2018 from junghans/cmake_kim-api_find
cmake: move kim-api detection to cmake config
2020-04-24 16:55:48 -04:00
91d958faff Remove Kokkos deprecated code 2020-04-24 12:52:46 -06:00
756724c9e3 Merge branch 'kk_compute_orientorder_atom' of ssh://github.com/stanmoore1/lammps into kk_compute_coord_atom 2020-04-24 12:50:40 -06:00
261b826cfc Remove Kokkos deprecated code 2020-04-24 12:49:50 -06:00
700bb2e0f4 Merge branch 'master' of github.com:lammps/lammps into kk_copycpu 2020-04-24 12:33:05 -06:00
0545de5137 clean up comments in fix_accelerate_cos.h 2020-04-24 20:23:14 +02:00
85f1cb6a63 Merge branch 'kk_compute_orientorder_atom' of ssh://github.com/stanmoore1/lammps into kk_compute_coord_atom 2020-04-24 12:22:42 -06:00
cf702c4b1a fixed a type in README 2020-04-24 20:20:49 +02:00
9c081cf439 Update from master 2020-04-24 12:18:53 -06:00
4890c328d9 add comment to trigger jenkins rerun 2020-04-24 13:21:38 -04:00
08dc8e860e Merge pull request #2022 from junghans/github-template-comments
github templates: turn comments in real comments
2020-04-24 13:18:40 -04:00
e114a8d15b Revert accidental change 2020-04-24 10:14:31 -06:00
cb2a9e4329 Clear sharedsize for flat method 2020-04-24 10:10:22 -06:00
47b06cf541 github templates: turn comments in real comments 2020-04-24 09:51:13 -06:00
9266c74370 move fix_accelerate_cos and compute_viscosity_cos to USER-MISC 2020-04-24 15:30:20 +02:00
0bb41bf00b Add ouput for the example for USER-VISCOSITY package 2020-04-24 14:41:03 +02:00
a30d4a6c6f Add documents and minor fix for USER-VISCOSITY package 2020-04-24 14:41:03 +02:00
c7e4304ab6 add package and examples for viscosity calculation 2020-04-24 14:28:46 +02:00
7a366de0a9 Delete log.22Apr20.tiny_nylon.unstabilized.g++ 2020-04-24 09:39:11 +02:00
5a9cc9e380 updated log files 2020-04-24 09:35:32 +02:00
68dd6d0f19 cmake: move kim-api detection to cmake config 2020-04-23 09:20:38 -06:00
1a286d5722 Fix repeat of same bug 2020-04-22 16:14:11 -05:00
623f03e322 cmake: add support for latte super-build 2020-04-22 14:21:34 -06:00
2493987875 Fix binning bug 2020-04-22 14:33:20 -05:00
fc10e885b2 make description of eflux as a variable less convoluted 2020-04-22 08:13:27 -04:00
73bf1874c5 update code owner entry for fix bond/react 2020-04-22 08:12:56 -04:00
e321719558 Merge branch 'master' of https://github.com/wverestek/lammps 2020-04-22 14:09:55 +02:00
34d73a3c67 wrong script. 2020-04-22 14:10:43 +02:00
1751a27ff6 removing example script from nylon melt and adding to tiny nylon 2020-04-22 14:07:11 +02:00
48ab70f9ee avoid segfault when using compute_scalar() on the initial step and no scaling has yet been done. 2020-04-22 07:30:06 -04:00
0288bb4b6b small modification to fix bond/react to allow equal style variables as probability o
On branch master
Your branch is up to date with 'origin/master'.

Changes to be committed:
	modified:   doc/src/fix_bond_react.rst
	new file:   examples/USER/reaction/nylon,6-6_melt/in.large_nylon_melt_variable_probability
	modified:   src/USER-REACTION/fix_bond_react.cpp
	modified:   src/USER-REACTION/fix_bond_react.h
2020-04-22 13:27:10 +02:00
5eccaecf9b use #include <cstdint> now that we require C++11 2020-04-21 19:31:57 -04:00
db4c6e4056 update include file conventions since we no longer require C++98 for LAMMPS core files 2020-04-21 19:31:18 -04:00
0f9d8efe69 state in external Kokkos error message the version 3.1 or later is required 2020-04-21 12:50:27 -04:00
ea31fc11a6 add more explicit note about lack of support for pair styles in compute centroid/stress/atom 2020-04-21 12:44:13 -04:00
9f923c51f8 update singularity definition files for ubuntu variants to enable more LAMMPS build options and features 2020-04-21 12:07:34 -04:00
3c144600a5 update Kokkos related documentation for Kokkos 3.1 and refactor build info a bit 2020-04-21 11:46:16 -04:00
2348d6db62 use HOSTARCH/HOST instead of CPUARCH/CPU to better distinguish from GPUARCH/GPU 2020-04-21 08:30:16 -04:00
729646d7b5 update table of Kokkos supported archs and indicate HOST/GPU designation 2020-04-21 08:27:00 -04:00
2ac7bfc9cf rephrase note about kernel JIT recompilation and Kepler vs. the rest compatibility 2020-04-21 08:26:01 -04:00
0711232e5b Merge pull request #2000 from akohlmey/polymorphic-update
Update for pair style polymorphic from Xiaowang Zhou
2020-04-20 17:14:47 -04:00
0dfb1329be we must not write out per-type pair cutoff when long-range LJ is enabled 2020-04-20 16:56:09 -04:00
1c15ba88f3 need to copy maxspecial and "extra" data to do a proper recreation 2020-04-20 15:27:30 -04:00
91153eaa1a Added changes to support SMs setting charges in kim_interactions 2020-04-20 13:15:25 -05:00
dcc074215d fix inconsistent memory allocate/free 2020-04-20 06:04:33 -04:00
42203bbc35 fix two more typos 2020-04-19 16:37:52 -04:00
a7391d1e36 small corrections/updates for the polymorphic pair style docs 2020-04-18 10:14:38 -04:00
1599d98425 Fixed the doc page for fix wall/body/polyhedron 2020-04-17 13:33:47 -05:00
d3498591f3 Merge branch 'master' of github.com:lammps/lammps into kk_3.1 2020-04-17 12:01:32 -06:00
822c396e3a Work around Kokkos issue 2020-04-17 11:30:43 -06:00
ba66f05a04 some reformatting and minor cleanup of the documentation 2020-04-16 19:14:42 -04:00
42a59921f9 fix spelling issues 2020-04-16 19:04:26 -04:00
21e9db6bdf Merge branch 'master' into polymorphic-update 2020-04-16 18:18:41 -04:00
4fa0186b68 update docs to cleanly translate 2020-04-16 18:17:38 -04:00
0766350838 Merge pull request #2003 from stanmoore1/dpd_error
Remove unnecessary error check in USER-DPD fix rx
2020-04-16 16:49:29 -04:00
8c54507371 forward Kokkos library variables from CMake configuration for LAMMPS to the downloaded Kokkos library build 2020-04-16 16:46:27 -04:00
850bee2331 update KOKKOS.cmake for Kokkos 3.1. no more patch needed. 2020-04-16 15:39:53 -04:00
b3c7c1f93c utils.h is not used anymore 2020-04-16 15:13:21 -04:00
348118317c Update Kokkos docs 2020-04-16 12:36:43 -06:00
f8f69996eb Remove obsolete note 2020-04-16 11:49:03 -06:00
19ac94e9a3 remove @timmattox as a code owner of USER-DPD 2020-04-16 13:15:41 -04:00
ba8d043c7e Update Kokkos library in LAMMPS to v3.1 2020-04-16 09:06:08 -06:00
ca64c461ff Remove unnecessary error check in USER-DPD fix rx 2020-04-16 08:19:50 -06:00
08d01e6417 import polymorphic pair style update from Xiaowang Zhou 2020-04-15 11:31:30 -04:00
60bba3e238 Fix var name 2020-03-04 13:09:25 -07:00
72a9ce0f32 Add loop chunking option to compute_orientorder_atom_kokkos 2020-03-04 12:31:37 -07:00
21f278f47f Merge branch 'master' of github.com:lammps/lammps into kk_compute_orientorder_atom 2020-03-04 09:08:53 -07:00
c31917186e Tweak error message 2020-02-26 14:34:42 -07:00
eb80fd3031 Add method to copy Kokkos neighbor list to CPU list 2020-02-26 14:26:46 -07:00
928ac7f271 Fix typo 2020-02-25 10:34:29 -07:00
a44e49e276 Add Kokkos version of compute coord/atom 2020-02-25 10:22:30 -07:00
a3c5c49a6b Make k_qnarray public 2020-02-25 10:20:21 -07:00
59370d797f Use more generic type for k_qnarray 2020-02-25 08:58:01 -07:00
c505058c5c Add flag for Kokkos computes 2020-02-24 15:43:29 -07:00
29075c8257 Fix compile issue 2020-02-24 13:31:13 -07:00
796e1ac4e9 Update docs 2020-02-24 13:29:22 -07:00
dd3d5f1f95 Merge branch 'master' of github.com:lammps/lammps into kk_compute_orientorder_atom 2020-02-24 13:28:06 -07:00
674781fe0e Add Kokkos version of compute orientorder/atom 2020-02-24 13:27:40 -07:00
b3a7aa6541 correct whitespace issue 2020-01-22 17:48:50 -05:00
25cdcc7592 Merge branch 'master' into fix-dummy 2020-01-22 17:25:52 -05:00
f2795f26b8 Merge branch 'master' into fix-dummy
sync with latest whitespace changes
2019-11-06 13:49:59 -07:00
6af726e589 undo a re-bug change - sigh 2019-11-06 10:26:13 -07:00
d34502669c fixed a typo 2019-11-06 09:38:38 -07:00
09e539cce1 make IDs of 2 fix neigh history instances unique 2019-11-06 08:35:31 -07:00
ca0cf23a4b fix a bug with indexing the replaced fix and optional args 2019-11-05 16:59:44 -07:00
d8ef5f6991 added internal fix dummy command to enable more control of fix ordering 2019-11-05 12:57:34 -07:00
842 changed files with 111121 additions and 16867 deletions

3
.github/CODEOWNERS vendored
View File

@ -22,7 +22,6 @@ src/SPIN/* @julient31
src/USER-CGDNA/* @ohenrich
src/USER-CGSDK/* @akohlmey
src/USER-COLVARS/* @giacomofiorin
src/USER-DPD/* @timattox
src/USER-INTEL/* @wmbrownintel
src/USER-MANIFOLD/* @Pakketeretet2
src/USER-MEAMC/* @martok
@ -46,7 +45,7 @@ src/GPU/pair_vashishta_gpu.* @andeplane
src/KOKKOS/pair_vashishta_kokkos.* @andeplane
src/MANYBODY/pair_vashishta_table.* @andeplane
src/MANYBODY/pair_atm.* @sergeylishchuk
src/USER-MISC/fix_bond_react.* @jrgissing
src/USER-REACTION/fix_bond_react.* @jrgissing
src/USER-MISC/*_grem.* @dstelter92
src/USER-MISC/compute_stress_mop*.* @RomainVermorel

View File

@ -9,24 +9,24 @@ assignees: ''
**Summary**
_Please provide a clear and concise description of what the bug is._
<!--Please provide a clear and concise description of what the bug is.-->
**LAMMPS Version and Platform**
_Please specify precisely which LAMMPS version this issue was detected with (the first line of the output) and what platform (operating system and its version, hardware) you are running on. If possible, test with the most recent LAMMPS patch version_
<!--Please specify precisely which LAMMPS version this issue was detected with (the first line of the output) and what platform (operating system and its version, hardware) you are running on. If possible, test with the most recent LAMMPS patch version-->
**Expected Behavior**
_Describe the expected behavior. Quote from the LAMMPS manual where needed, or explain why the expected behavior is meaningful, especially when it differs from the manual_
<!--Describe the expected behavior. Quote from the LAMMPS manual where needed, or explain why the expected behavior is meaningful, especially when it differs from the manual-->
**Actual Behavior**
_Describe the actual behavior, how it differs from the expected behavior, and how this can be observed. Try to be specific and do **not** use vague terms like "doesn't work" or "wrong result". Do not assume that the person reading this has any experience with or knowledge of your specific area of research._
<!--Describe the actual behavior, how it differs from the expected behavior, and how this can be observed. Try to be specific and do **not** use vague terms like "doesn't work" or "wrong result". Do not assume that the person reading this has any experience with or knowledge of your specific area of research.-->
**Steps to Reproduce**
_Describe the steps required to (quickly) reproduce the issue. You can attach (small) files to the section below or add URLs where to download an archive with all necessary files. Please try to create an input set that is as minimal and small as possible and reproduces the bug as quickly as possible. **NOTE:** the less effort and time it takes to reproduce your reported bug, the more likely it becomes, that somebody will look into it and fix the problem._
<!--Describe the steps required to (quickly) reproduce the issue. You can attach (small) files to the section below or add URLs where to download an archive with all necessary files. Please try to create an input set that is as minimal and small as possible and reproduces the bug as quickly as possible. **NOTE:** the less effort and time it takes to reproduce your reported bug, the more likely it becomes, that somebody will look into it and fix the problem.-->
**Further Information, Files, and Links**
_Put any additional information here, attach relevant text or image files and URLs to external sites, e.g. relevant publications_
<!--Put any additional information here, attach relevant text or image files and URLs to external sites, e.g. relevant publications-->

View File

@ -9,12 +9,12 @@ assignees: ''
**Summary**
_Please provide a brief and concise description of the suggested feature or change_
<!--Please provide a brief and concise description of the suggested feature or change-->
**Detailed Description**
_Please explain how you would like to see LAMMPS enhanced, what feature(s) you are looking for, what specific problems this will solve. If possible, provide references to relevant background information like publications or web pages, and whether you are planning to implement the enhancement yourself or would like to participate in the implementation. If applicable add a reference to an existing bug report or issue that this will address._
<!--Please explain how you would like to see LAMMPS enhanced, what feature(s) you are looking for, what specific problems this will solve. If possible, provide references to relevant background information like publications or web pages, and whether you are planning to implement the enhancement yourself or would like to participate in the implementation. If applicable add a reference to an existing bug report or issue that this will address.-->
**Further Information, Files, and Links**
_Put any additional information here, attach relevant text or image files and URLs to external sites, e.g. relevant publications_
<!--Put any additional information here, attach relevant text or image files and URLs to external sites, e.g. relevant publications-->

View File

@ -9,13 +9,13 @@ assignees: ''
**Summary**
_Please provide a clear and concise description of what this issue report is about._
<!--Please provide a clear and concise description of what this issue report is about.-->
**LAMMPS Version and Platform**
_Please specify precisely which LAMMPS version this issue was detected with (the first line of the output) and what platform (operating system and its version, hardware) you are running on. If possible, test with the most recent LAMMPS patch version_
<!--Please specify precisely which LAMMPS version this issue was detected with (the first line of the output) and what platform (operating system and its version, hardware) you are running on. If possible, test with the most recent LAMMPS patch version-->
**Details**
_Please explain the issue in detail here_
<!--Please explain the issue in detail here-->

View File

@ -1,14 +1,14 @@
**Summary**
_Briefly describe the new feature(s), enhancement(s), or bugfix(es) included in this pull request._
<!--Briefly describe the new feature(s), enhancement(s), or bugfix(es) included in this pull request.-->
**Related Issues**
_If this addresses an open GitHub issue for this project, please mention the issue number here, and describe the relation. Use the phrases `fixes #221` or `closes #135`, when you want an issue to be automatically closed when the pull request is merged_
<!--If this addresses an open GitHub issue for this project, please mention the issue number here, and describe the relation. Use the phrases `fixes #221` or `closes #135`, when you want an issue to be automatically closed when the pull request is merged-->
**Author(s)**
_Please state name and affiliation of the author or authors that should be credited with the changes in this pull request. If this pull request adds new files to the distribution, please also provide a suitable "long-lived" e-mail address (ideally something that can outlive your institution's e-mail, in case you change jobs) for the *corresponding* author, i.e. the person the LAMMPS developers can contact directly with questions and requests related to maintenance and support of this contributed code._
<!--Please state name and affiliation of the author or authors that should be credited with the changes in this pull request. If this pull request adds new files to the distribution, please also provide a suitable "long-lived" e-mail address (ideally something that can outlive your institution's e-mail, in case you change jobs) for the *corresponding* author, i.e. the person the LAMMPS developers can contact directly with questions and requests related to maintenance and support of this contributed code.-->
**Licensing**
@ -16,15 +16,15 @@ By submitting this pull request, I agree, that my contribution will be included
**Backward Compatibility**
_Please state whether any changes in the pull request will break backward compatibility for inputs, and - if yes - explain what has been changed and why_
<!--Please state whether any changes in the pull request will break backward compatibility for inputs, and - if yes - explain what has been changed and why-->
**Implementation Notes**
_Provide any relevant details about how the changes are implemented, how correctness was verified, how other features - if any - in LAMMPS are affected_
<!--Provide any relevant details about how the changes are implemented, how correctness was verified, how other features - if any - in LAMMPS are affected-->
**Post Submission Checklist**
_Please check the fields below as they are completed **after** the pull request has been submitted. Delete lines that don't apply_
<!--Please check the fields below as they are completed **after** the pull request has been submitted. Delete lines that don't apply-->
- [ ] The feature or features in this pull request is complete
- [ ] Licensing information is complete
@ -39,6 +39,6 @@ _Please check the fields below as they are completed **after** the pull request
**Further Information, Files, and Links**
_Put any additional information here, attach relevant text or image files, and URLs to external sites (e.g. DOIs or webpages)_
<!--Put any additional information here, attach relevant text or image files, and URLs to external sites (e.g. DOIs or webpages)-->

View File

@ -9,15 +9,15 @@ assignees: ''
**Summary**
_Briefly describe the bug or bugs, that are eliminated by this pull request._
<!--Briefly describe the bug or bugs, that are eliminated by this pull request.-->
**Related Issue(s)**
_If this request addresses or is related to an existing (open) GitHub issue, e.g. a bug report, mention the issue number number here following a pound sign (aka hashmark), e.g.`#222`._
<!--If this request addresses or is related to an existing (open) GitHub issue, e.g. a bug report, mention the issue number number here following a pound sign (aka hashmark), e.g.`#222`.-->
**Author(s)**
_Please state name and affiliation of the author or authors that should be credited with the changes in this pull request_
<!--Please state name and affiliation of the author or authors that should be credited with the changes in this pull request-->
**Licensing**
@ -25,18 +25,18 @@ By submitting this pull request I implicitly accept, that my submission is subje
**Backward Compatibility**
_Please state whether any changes in the pull request break backward compatibility for inputs, and - if yes - explain what has been changed and why_
<!--Please state whether any changes in the pull request break backward compatibility for inputs, and - if yes - explain what has been changed and why-->
**Detailed Description**
_Provide any relevant details about how the fixed bug can be reproduced, how the changes are implemented, how correctness was verified, how other features - if any - in LAMMPS are affected_
<!--Provide any relevant details about how the fixed bug can be reproduced, how the changes are implemented, how correctness was verified, how other features - if any - in LAMMPS are affected-->
## Post Submission Checklist
_Please check the fields below as they are completed *after* the pull request is submitted_
<!--Please check the fields below as they are completed *after* the pull request is submitted-->
- [ ] The code in this pull request is complete
- [ ] The source code follows the LAMMPS formatting guidelines
## Further Information, Files, and Links
_Put any additional information here, attach relevant text or image files, and URLs to external sites (e.g. to download input decks for testing)_
<!--Put any additional information here, attach relevant text or image files, and URLs to external sites (e.g. to download input decks for testing)-->

View File

@ -9,15 +9,15 @@ assignees: ''
**Summary**
_Briefly describe the included changes._
<!--Briefly describe the included changes.-->
**Related Issue(s)**
_If this request addresses or is related to an existing (open) GitHub issue, e.g. a bug report, mention the issue number number here following a pound sign (aka hashmark), e.g.`#222`.
<!--If this request addresses or is related to an existing (open) GitHub issue, e.g. a bug report, mention the issue number number here following a pound sign (aka hashmark), e.g.`#222`.
**Author(s)**
_Please state name and affiliation of the author or authors that should be credited with the changes in this pull request_
<!--Please state name and affiliation of the author or authors that should be credited with the changes in this pull request-->
**Licensing**
@ -25,11 +25,11 @@ By submitting this pull request I implicitly accept, that my submission is subje
**Detailed Description**
_Provide any relevant details about the included changes._
<!--Provide any relevant details about the included changes.-->
## Post Submission Checklist
_Please check the fields below as they are completed *after* the pull request is submitted_
<!--Please check the fields below as they are completed *after* the pull request is submitted-->
- [ ] The pull request is complete
- [ ] The source code follows the LAMMPS formatting guidelines

View File

@ -9,34 +9,34 @@ assignees: ''
**Summary**
_Briefly describe the new feature(s) included in this pull request._
<!--Briefly describe the new feature(s) included in this pull request.-->
**Related Issues**
_If this addresses an existing (open) GitHub issue, e.g. a feature request, mention the issue number here following a pound sign (aka hashmark), e.g. `#331`._
<!--If this addresses an existing (open) GitHub issue, e.g. a feature request, mention the issue number here following a pound sign (aka hashmark), e.g. `#331`.-->
**Author(s)**
_Please state name and affiliation of the author or authors that should be credited with the features added in this pull request. Please provide a suitable "long-lived" e-mail address (e.g. from gmail, yahoo, outlook, etc.) for the *corresponding* author, i.e. the person the LAMMPS developers can contact directly with questions and requests related to maintenance and support of this code. now and in the future_
<!--Please state name and affiliation of the author or authors that should be credited with the features added in this pull request. Please provide a suitable "long-lived" e-mail address (e.g. from gmail, yahoo, outlook, etc.) for the *corresponding* author, i.e. the person the LAMMPS developers can contact directly with questions and requests related to maintenance and support of this code. now and in the future-->
**Licensing**
_Please add *yes* or *no* to the following two statements (please contact @lammps/core if you have questions about this)_
<!--Please add *yes* or *no* to the following two statements (please contact @lammps/core if you have questions about this)-->
My contribution may be licensed as GPL v2 (default LAMMPS license):
My contribution may be licensed as LGPL (for use as a library with proprietary software):
**Backward Compatibility**
_Please state if any of the changes in this pull request will affect backward compatibility for inputs, and - if yes - explain what has been changed and why_
<!--Please state if any of the changes in this pull request will affect backward compatibility for inputs, and - if yes - explain what has been changed and why-->
**Implementation Notes**
_Provide any relevant details about how the new features are implemented, how correctness was verified, what platforms (OS, compiler, MPI, hardware, number of processors, accelerator(s)) it was tested on_
<!--Provide any relevant details about how the new features are implemented, how correctness was verified, what platforms (OS, compiler, MPI, hardware, number of processors, accelerator(s)) it was tested on-->
## Post Submission Checklist
_Please check the fields below as they are completed *after* the pull request has been submitted_
<!--Please check the fields below as they are completed *after* the pull request has been submitted-->
- [ ] The feature or features in this pull request is complete
- [ ] Licensing information is complete
@ -51,6 +51,6 @@ _Please check the fields below as they are completed *after* the pull request ha
## Further Information, Files, and Links
_Put any additional information here, attach relevant text or image files, and URLs to external sites (e.g. DOIs or webpages)_
<!--Put any additional information here, attach relevant text or image files, and URLs to external sites (e.g. DOIs or webpages)-->

View File

@ -9,11 +9,11 @@ assignees: ''
**Summary**
_Briefly describe what kind of updates or enhancements for a package or feature are included. If you are not the original author of the package or feature, please mention, whether your contribution was created independently or in collaboration/cooperation with the original author._
<!--Briefly describe what kind of updates or enhancements for a package or feature are included. If you are not the original author of the package or feature, please mention, whether your contribution was created independently or in collaboration/cooperation with the original author.-->
**Author(s)**
_Please state name and affiliation of the author or authors that should be credited with the changes in this pull request_
<!--Please state name and affiliation of the author or authors that should be credited with the changes in this pull request-->
**Licensing**
@ -21,15 +21,15 @@ By submitting this pull request I implicitly accept, that my submission is subje
**Backward Compatibility**
_Please state whether any changes in the pull request break backward compatibility for inputs, and - if yes - explain what has been changed and why_
<!--Please state whether any changes in the pull request break backward compatibility for inputs, and - if yes - explain what has been changed and why-->
**Implementation Notes**
_Provide any relevant details about how the changes are implemented, how correctness was verified, how other features - if any - in LAMMPS are affected_
<!--Provide any relevant details about how the changes are implemented, how correctness was verified, how other features - if any - in LAMMPS are affected-->
**Post Submission Checklist**
_Please check the fields below as they are completed_
<!--Please check the fields below as they are completed-->
- [ ] The feature or features in this pull request is complete
- [ ] Suitable updates to the existing docs are included
- [ ] One or more example input decks are included
@ -37,6 +37,6 @@ _Please check the fields below as they are completed_
**Further Information, Files, and Links**
_Put any additional information here, attach relevant text or image files, and URLs to external sites (e.g. DOIs or webpages)_
<!--Put any additional information here, attach relevant text or image files, and URLs to external sites (e.g. DOIs or webpages)-->

View File

@ -135,23 +135,20 @@ if(PKG_USER-ADIOS)
target_link_libraries(lammps PRIVATE adios2::adios2)
endif()
if (CMAKE_SYSTEM_NAME STREQUAL Windows)
option(BUILD_MPI "Build MPI version" OFF)
else()
# do MPI detection after language activation,
# in case MPI for these languages is required
if(NOT CMAKE_CROSSCOMPILING)
set(MPI_CXX_SKIP_MPICXX TRUE)
find_package(MPI QUIET)
option(BUILD_MPI "Build MPI version" ${MPI_FOUND})
else()
option(BUILD_MPI "Build MPI version" OFF)
endif()
if(BUILD_MPI)
# We use a non-standard procedure to compile with MPI on windows
if (CMAKE_SYSTEM_NAME STREQUAL Windows)
# We use a non-standard procedure to cross-compile with MPI on Windows
if((CMAKE_SYSTEM_NAME STREQUAL Windows) AND CMAKE_CROSSCOMPILING)
include(MPI4WIN)
target_link_libraries(lammps PUBLIC MPI::MPI_CXX)
else()
set(MPI_CXX_SKIP_MPICXX ON)
find_package(MPI REQUIRED)
target_link_libraries(lammps PUBLIC MPI::MPI_CXX)
option(LAMMPS_LONGLONG_TO_LONG "Workaround if your system or MPI version does not recognize 'long long' data types" OFF)
@ -163,9 +160,6 @@ else()
enable_language(C)
file(GLOB MPI_SOURCES ${LAMMPS_SOURCE_DIR}/STUBS/mpi.c)
add_library(mpi_stubs STATIC ${MPI_SOURCES})
if(NOT BUILD_SHARED_LIBS)
install(TARGETS mpi_stubs EXPORT LAMMPS_Targets LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
endif()
set_target_properties(mpi_stubs PROPERTIES OUTPUT_NAME lammps_mpi_stubs${LAMMPS_MACHINE})
target_include_directories(mpi_stubs PUBLIC $<BUILD_INTERFACE:${LAMMPS_SOURCE_DIR}/STUBS> $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/lammps/mpi>)
install(FILES ${LAMMPS_SOURCE_DIR}/STUBS/mpi.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/lammps/mpi)
@ -252,9 +246,6 @@ if(PKG_MSCG OR PKG_USER-ATC OR PKG_USER-AWPMD OR PKG_USER-QUIP OR PKG_LATTE)
enable_language(Fortran)
file(GLOB LAPACK_SOURCES ${LAMMPS_LIB_SOURCE_DIR}/linalg/[^.]*.[fF])
add_library(linalg STATIC ${LAPACK_SOURCES})
if(NOT BUILD_SHARED_LIBS)
install(TARGETS linalg EXPORT LAMMPS_Targets LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
endif()
set_target_properties(linalg PROPERTIES OUTPUT_NAME lammps_linalg${LAMMPS_MACHINE})
set(BLAS_LIBRARIES "$<TARGET_FILE:linalg>")
set(LAPACK_LIBRARIES "$<TARGET_FILE:linalg>")
@ -332,8 +323,9 @@ set(CMAKE_TUNE_FLAGS "${CMAKE_TUNE_DEFAULT}" CACHE STRING "Compiler specific opt
separate_arguments(CMAKE_TUNE_FLAGS)
include(CheckCXXCompilerFlag)
foreach(_FLAG ${CMAKE_TUNE_FLAGS})
check_cxx_compiler_flag("${_FLAG}" COMPILER_SUPPORTS${_FLAG})
if(COMPILER_SUPPORTS${_FLAG})
string(REGEX REPLACE "[=\"]" "" _FLAGX ${_FLAG})
check_cxx_compiler_flag("${_FLAG}" COMPILER_SUPPORTS${_FLAGX})
if(COMPILER_SUPPORTS${_FLAGX})
target_compile_options(lammps PRIVATE ${_FLAG})
else()
message(WARNING "${_FLAG} found in CMAKE_TUNE_FLAGS, but not supported by the compiler, skipping")
@ -413,9 +405,6 @@ foreach(SIMPLE_LIB POEMS USER-ATC USER-AWPMD USER-H5MD)
${LAMMPS_LIB_SOURCE_DIR}/${PKG_LIB}/[^.]*.c
${LAMMPS_LIB_SOURCE_DIR}/${PKG_LIB}/[^.]*.cpp)
add_library(${PKG_LIB} STATIC ${${PKG_LIB}_SOURCES})
if(NOT BUILD_SHARED_LIBS)
install(TARGETS ${PKG_LIB} EXPORT LAMMPS_Targets LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
endif()
set_target_properties(${PKG_LIB} PROPERTIES OUTPUT_NAME lammps_${PKG_LIB}${LAMMPS_MACHINE})
target_link_libraries(lammps PRIVATE ${PKG_LIB})
if(PKG_LIB STREQUAL awpmd)
@ -436,7 +425,12 @@ if(PKG_USER-ATC)
if(LAMMPS_SIZES STREQUAL BIGBIG)
message(FATAL_ERROR "The USER-ATC Package is not compatible with -DLAMMPS_BIGBIG")
endif()
target_link_libraries(atc PRIVATE ${LAPACK_LIBRARIES} MPI::MPI_CXX)
target_link_libraries(atc PRIVATE ${LAPACK_LIBRARIES})
if(BUILD_MPI)
target_link_libraries(atc PRIVATE MPI::MPI_CXX)
else()
target_link_libraries(atc PRIVATE mpi_stubs)
endif()
target_include_directories(atc PRIVATE ${LAMMPS_SOURCE_DIR})
target_compile_definitions(atc PRIVATE -DLAMMPS_${LAMMPS_SIZES})
endif()
@ -522,14 +516,15 @@ endif()
set_target_properties(lammps PROPERTIES OUTPUT_NAME lammps${LAMMPS_MACHINE})
set_target_properties(lammps PROPERTIES SOVERSION ${SOVERSION})
install(TARGETS lammps EXPORT LAMMPS_Targets LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
target_include_directories(lammps PUBLIC $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/includes/lammps)
foreach(_HEADER ${LAMMPS_CXX_HEADERS})
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/includes/lammps/${_HEADER} COMMAND ${CMAKE_COMMAND} -E copy_if_different ${LAMMPS_SOURCE_DIR}/${_HEADER} ${CMAKE_CURRENT_BINARY_DIR}/includes/lammps/${_HEADER} DEPENDS ${LAMMPS_SOURCE_DIR}/${_HEADER})
add_custom_target(${_HEADER} DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/includes/lammps/${_HEADER})
add_dependencies(lammps ${_HEADER})
install(FILES ${LAMMPS_SOURCE_DIR}/${_HEADER} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/lammps)
if(BUILD_SHARED_LIBS)
install(FILES ${LAMMPS_SOURCE_DIR}/${_HEADER} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/lammps)
endif()
endforeach()
target_include_directories(lammps INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/includes>)
add_library(LAMMPS::lammps ALIAS lammps)
@ -538,15 +533,18 @@ set(LAMMPS_API_DEFINES)
foreach(_DEF ${LAMMPS_DEFINES})
set(LAMMPS_API_DEFINES "${LAMMPS_API_DEFINES} -D${_DEF}")
endforeach()
configure_file(pkgconfig/liblammps.pc.in ${CMAKE_CURRENT_BINARY_DIR}/liblammps${LAMMPS_MACHINE}.pc @ONLY)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/liblammps${LAMMPS_MACHINE}.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
install(EXPORT LAMMPS_Targets FILE LAMMPS_Targets.cmake NAMESPACE LAMMPS:: DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/LAMMPS)
file(GLOB MODULE_FILES ${CMAKE_CURRENT_SOURCE_DIR}/Modules/Find*.cmake)
install(FILES ${MODULE_FILES} DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/LAMMPS)
include(CMakePackageConfigHelpers)
configure_file(LAMMPSConfig.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/LAMMPSConfig.cmake @ONLY)
write_basic_package_version_file("LAMMPSConfigVersion.cmake" VERSION ${PROJECT_VERSION} COMPATIBILITY ExactVersion)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/LAMMPSConfig.cmake" "${CMAKE_CURRENT_BINARY_DIR}/LAMMPSConfigVersion.cmake" DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/LAMMPS)
if(BUILD_SHARED_LIBS)
install(TARGETS lammps EXPORT LAMMPS_Targets LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
configure_file(pkgconfig/liblammps.pc.in ${CMAKE_CURRENT_BINARY_DIR}/liblammps${LAMMPS_MACHINE}.pc @ONLY)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/liblammps${LAMMPS_MACHINE}.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
install(EXPORT LAMMPS_Targets FILE LAMMPS_Targets.cmake NAMESPACE LAMMPS:: DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/LAMMPS)
file(GLOB MODULE_FILES ${CMAKE_CURRENT_SOURCE_DIR}/Modules/Find*.cmake)
install(FILES ${MODULE_FILES} DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/LAMMPS)
include(CMakePackageConfigHelpers)
configure_file(LAMMPSConfig.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/LAMMPSConfig.cmake @ONLY)
write_basic_package_version_file("LAMMPSConfigVersion.cmake" VERSION ${PROJECT_VERSION} COMPATIBILITY ExactVersion)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/LAMMPSConfig.cmake" "${CMAKE_CURRENT_BINARY_DIR}/LAMMPSConfigVersion.cmake" DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/LAMMPS)
endif()
install(FILES ${LAMMPS_DOC_DIR}/lammps.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1 RENAME ${LAMMPS_BINARY}.1)
if(BUILD_TOOLS)
@ -555,7 +553,7 @@ if(BUILD_TOOLS)
install(TARGETS binary2txt DESTINATION ${CMAKE_INSTALL_BINDIR})
include(CheckGeneratorSupport)
if(CMAKE_GENERATOR_SUPPORT_FORTRAN)
if(CMAKE_GENERATOR_SUPPORT_FORTRAN AND CMAKE_Fortran_COMPILER)
enable_language(Fortran)
add_executable(chain.x ${LAMMPS_TOOLS_DIR}/chain.f)
target_link_libraries(chain.x PRIVATE ${CMAKE_Fortran_IMPLICIT_LINK_LIBRARIES})
@ -705,6 +703,7 @@ else()
endif()
if(BUILD_MPI)
message(STATUS "<<< MPI flags >>>
-- MPI_defines: ${MPI_CXX_COMPILE_DEFINITIONS}
-- MPI includes: ${MPI_CXX_INCLUDE_PATH}
-- MPI libraries: ${MPI_CXX_LIBRARIES};${MPI_Fortran_LIBRARIES}")
endif()

View File

@ -1,4 +1,4 @@
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR})
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR})
include(CMakeFindDependencyMacro)
if(@BUILD_MPI@)
find_dependency(MPI REQUIRED CXX)
@ -8,80 +8,4 @@ if(@PKG_KSPACE@)
find_dependency(@FFTW@ REQUIRED MODULE)
endif()
endif()
if(NOT @BUILD_SHARED_LIBS@)
if(@BUILD_OMP@)
find_dependency(OpenMP REQUIRED)
endif()
if(@WITH_JPEG@)
find_dependency(JPEG REQUIRED)
endif()
if(@WITH_PNG@)
find_dependency(PNG REQUIRED)
find_dependency(ZLIB REQUIRED)
endif()
if(@PKG_KIM@)
find_dependency(PkgConfig REQUIRED)
pkg_check_modules(KIM-API REQUIRED IMPORTED_TARGET libkim-api>=@KIM-API_MIN_VERSION@)
if(@CURL_FOUND@)
find_dependency(CURL REQUIRED)
endif()
endif()
if(@PKG_USER-SMD@)
find_dependency(Eigen3 NO_MODULE REQUIRED)
endif()
if(@PKG_USER-SCAFACOS@)
find_dependency(PkgConfig REQUIRED)
find_ependency(GSL REQUIRED)
find_dependency(MPI REQUIRED C Fortran)
pkg_check_modules(SCAFACOS REQUIRED IMPORTED_TARGET scafacos)
endif()
if(@PKG_PYTHON@ AND NOT CMAKE_VERSION VERSION_LESS 3.12)
find_package(Python REQUIRED COMPONENTS Development)
endif()
if(@PKG_COMPRESS@)
find_dependency(ZLIB REQUIRED)
endif()
if(@PKG_KOKKOS@)
if(@EXTERNAL_KOKKOS@)
find_dependency(Kokkos 3 REQUIRED)
endif()
endif()
if(@PKG_VORONOI@)
find_dependency(VORO REQUIRED)
endif()
if(@PKG_USER-INTEL@)
if(@INTEL_LRT_MODE@ STREQUAL "THREADS")
find_dependency(Threads REQUIRED)
endif()
if(@TBB_MALLOC_FOUND@)
find_ependency(TBB_MALLOC REQUIRED)
endif()
endif()
if(@PKG_USER-ADIOS@)
find_ependency(ADIOS2 REQUIRED)
endif()
if(@PKG_LATTE@)
find_ependency(LATTE REQUIRED)
endif()
if(@PKG_MESSAGE@)
if(@MESSAGE_ZMQ@)
find_ependency(ZMQ REQUIRED)
endif()
endif()
if(@PKG_MSCG@)
find_ependency(GSL REQUIRED)
find_ependency(MSCG REQUIRED)
endif()
if(@USER-NETCDF@)
if(@NETCDF_FOUND@)
find_ependency(NetCDF REQUIRED)
endif()
if(@PNETCDF_FOUND@)
find_ependency(PNetCDF REQUIRED)
endif()
endif()
if(@PKG_QUIP@)
find_ependency(QUIP REQUIRED)
endif()
endif()
include("${CMAKE_CURRENT_LIST_DIR}/LAMMPS_Targets.cmake")

View File

@ -23,3 +23,8 @@ set_target_properties(MPI::MPI_CXX PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${SOURCE_DIR}/include"
INTERFACE_COMPILE_DEFINITIONS "MPICH_SKIP_MPICXX")
add_dependencies(MPI::MPI_CXX mpi4win_build)
# set variables for status reporting at the end of CMake run
set(MPI_CXX_INCLUDE_PATH "${SOURCE_DIR}/include")
set(MPI_CXX_COMPILE_DEFINITIONS "MPICH_SKIP_MPICXX")
set(MPI_CXX_LIBRARIES "${SOURCE_DIR}/lib/libmpi.a")

View File

@ -330,7 +330,7 @@ elseif(GPU_API STREQUAL "HIP")
if(HIP_PLATFORM STREQUAL "nvcc")
target_compile_definitions(gpu PRIVATE -D__HIP_PLATFORM_NVCC__)
target_include_directories(gpu PRIVATE ${HIP_ROOT_DIR}/include)
target_include_directories(gpu PRIVATE ${HIP_ROOT_DIR}/../include)
target_include_directories(gpu PRIVATE ${CUDA_INCLUDE_DIRS})
target_link_libraries(gpu PRIVATE ${CUDA_LIBRARIES} ${CUDA_CUDA_LIBRARY})
@ -338,6 +338,12 @@ elseif(GPU_API STREQUAL "HIP")
target_include_directories(hip_get_devices PRIVATE ${HIP_ROOT_DIR}/include)
target_include_directories(hip_get_devices PRIVATE ${CUDA_INCLUDE_DIRS})
target_link_libraries(hip_get_devices PRIVATE ${CUDA_LIBRARIES} ${CUDA_CUDA_LIBRARY})
elseif(HIP_PLATFORM STREQUAL "hcc")
target_compile_definitions(gpu PRIVATE -D__HIP_PLATFORM_HCC__)
target_include_directories(gpu PRIVATE ${HIP_ROOT_DIR}/../include)
target_compile_definitions(hip_get_devices PRIVATE -D__HIP_PLATFORM_HCC__)
target_include_directories(hip_get_devices PRIVATE ${HIP_ROOT_DIR}/../include)
endif()
target_link_libraries(lammps PRIVATE gpu)
@ -353,9 +359,11 @@ RegisterStylesExt(${GPU_SOURCES_DIR} gpu GPU_SOURCES)
get_property(GPU_SOURCES GLOBAL PROPERTY GPU_SOURCES)
target_link_libraries(gpu PRIVATE MPI::MPI_CXX)
if(NOT BUILD_SHARED_LIBS)
install(TARGETS gpu EXPORT LAMMPS_Targets LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
if(NOT BUILD_MPI)
# mpistubs is aliased to MPI::MPI_CXX, but older versions of cmake won't work forward the include path
target_link_libraries(gpu PRIVATE mpi_stubs)
else()
target_link_libraries(gpu PRIVATE MPI::MPI_CXX)
endif()
target_compile_definitions(gpu PRIVATE -DLAMMPS_${LAMMPS_SIZES})
set_target_properties(gpu PROPERTIES OUTPUT_NAME lammps_gpu${LAMMPS_MACHINE})

View File

@ -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)
@ -51,9 +56,6 @@ if(DOWNLOAD_KIM)
INTERFACE_INCLUDE_DIRECTORIES "${INSTALL_DIR}/include/kim-api")
target_link_libraries(lammps PRIVATE LAMMPS::KIM)
add_dependencies(LAMMPS::KIM kim_build)
if(NOT BUILD_SHARED_LIBS)
install(CODE "MESSAGE(FATAL_ERROR \"Installing liblammps with downloaded libraries is currently not supported.\")")
endif()
else()
find_package(PkgConfig REQUIRED)
pkg_check_modules(KIM-API REQUIRED IMPORTED_TARGET libkim-api>=${KIM-API_MIN_VERSION})

View File

@ -14,16 +14,30 @@ endif()
option(EXTERNAL_KOKKOS "Build against external kokkos library" OFF)
option(DOWNLOAD_KOKKOS "Download the KOKKOS library instead of using the bundled one" OFF)
if(DOWNLOAD_KOKKOS)
# extract Kokkos-related variables and values so we can forward them to the Kokkos library build
get_cmake_property(_VARS VARIABLES)
list(FILTER _VARS INCLUDE REGEX ^Kokkos_)
foreach(_VAR IN LISTS _VARS)
list(APPEND KOKKOS_LIB_BUILD_ARGS "-D${_VAR}=${${_VAR}}")
endforeach()
message(STATUS "KOKKOS download requested - we will build our own")
file(DOWNLOAD https://github.com/kokkos/kokkos/compare/3.0.00...stanmoore1:lammps.diff ${CMAKE_CURRENT_BINARY_DIR}/kokkos-lammps.patch)
list(APPEND KOKKOS_LIB_BUILD_ARGS "-DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>")
if(CMAKE_REQUEST_PIC)
list(APPEND KOKKOS_LIB_BUILD_ARGS ${CMAKE_REQUEST_PIC})
endif()
# append other CMake variables that need to be forwarded to CMAKE_ARGS
list(APPEND KOKKOS_LIB_BUILD_ARGS "-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}")
list(APPEND KOKKOS_LIB_BUILD_ARGS "-DCMAKE_INSTALL_LIBDIR=lib")
list(APPEND KOKKOS_LIB_BUILD_ARGS "-DCMAKE_MAKE_PROGRAM=${CMAKE_MAKE_PROGRAM}")
list(APPEND KOKKOS_LIB_BUILD_ARGS "-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}")
list(APPEND KOKKOS_LIB_BUILD_ARGS "-DCMAKE_CXX_STANDARD=${CMAKE_CXX_STANDARD}")
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)
ExternalProject_Add(kokkos_build
URL https://github.com/kokkos/kokkos/archive/3.0.00.tar.gz
URL_MD5 281c7093aa3a603276e93abdf4be23b9
PATCH_COMMAND patch -p1 < ${CMAKE_CURRENT_BINARY_DIR}/kokkos-lammps.patch
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR> ${CMAKE_REQUEST_PIC}
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DCMAKE_INSTALL_LIBDIR=lib
-DCMAKE_MAKE_PROGRAM=${CMAKE_MAKE_PROGRAM} -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}
URL https://github.com/kokkos/kokkos/archive/3.1.00.tar.gz
URL_MD5 f638a6c786f748a602b26faa0e96ebab
CMAKE_ARGS ${KOKKOS_LIB_BUILD_ARGS}
BUILD_BYPRODUCTS <INSTALL_DIR>/lib/libkokkoscore.a
)
ExternalProject_get_property(kokkos_build INSTALL_DIR)
@ -35,13 +49,10 @@ if(DOWNLOAD_KOKKOS)
INTERFACE_LINK_LIBRARIES ${CMAKE_DL_LIBS})
target_link_libraries(lammps PRIVATE LAMMPS::KOKKOS)
add_dependencies(LAMMPS::KOKKOS kokkos_build)
if(NOT BUILD_SHARED_LIBS)
install(CODE "MESSAGE(FATAL_ERROR \"Installing liblammps with downloaded libraries is currently not supported.\")")
endif()
elseif(EXTERNAL_KOKKOS)
find_package(Kokkos 3)
find_package(Kokkos 3.1)
if(NOT Kokkos_FOUND)
message(FATAL_ERROR "KOKKOS library not found, help CMake to find it by setting KOKKOS_LIBRARY, or set DOWNLOAD_KOKKOS=ON to download it")
message(FATAL_ERROR "KOKKOS library version 3.1 or later not found, help CMake to find it by setting KOKKOS_LIBRARY, or set DOWNLOAD_KOKKOS=ON to download it")
endif()
target_link_libraries(lammps PRIVATE Kokkos::kokkos)
else()

View File

@ -1,4 +1,11 @@
enable_language(Fortran)
# using lammps in a super-build setting
if(TARGET LATTE::latte)
target_link_libraries(lammps PRIVATE LATTE::latte)
return()
endif()
find_package(LATTE)
if(LATTE_FOUND)
set(DOWNLOAD_LATTE_DEFAULT OFF)
@ -27,13 +34,11 @@ if(DOWNLOAD_LATTE)
INTERFACE_LINK_LIBRARIES "${LAPACK_LIBRARIES}")
target_link_libraries(lammps PRIVATE LAMMPS::LATTE)
add_dependencies(LAMMPS::LATTE latte_build)
if(NOT BUILD_SHARED_LIBS)
install(CODE "MESSAGE(FATAL_ERROR \"Installing liblammps with downloaded libraries is currently not supported.\")")
endif()
else()
find_package(LATTE)
if(NOT LATTE_FOUND)
message(FATAL_ERROR "LATTE library not found, help CMake to find it by setting LATTE_LIBRARY, or set DOWNLOAD_LATTE=ON to download it")
endif()
target_link_libraries(lammps PRIVATE LATTE::latte)
# latte needs lapack
target_link_libraries(lammps PRIVATE LATTE::latte ${LAPACK_LIBRARIES})
endif()

View File

@ -7,9 +7,6 @@ file(GLOB_RECURSE cslib_SOURCES ${LAMMPS_LIB_SOURCE_DIR}/message/cslib/[^.]*.F
${LAMMPS_LIB_SOURCE_DIR}/message/cslib/[^.]*.cpp)
add_library(cslib STATIC ${cslib_SOURCES})
if(NOT BUILD_SHARED_LIBS)
install(TARGETS cslib EXPORT LAMMPS_Targets LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
endif()
target_compile_definitions(cslib PRIVATE -DLAMMPS_${LAMMPS_SIZES})
set_target_properties(cslib PROPERTIES OUTPUT_NAME lammps_cslib${LAMMPS_MACHINE})
if(BUILD_MPI)

View File

@ -35,9 +35,6 @@ if(DOWNLOAD_MSCG)
INTERFACE_LINK_LIBRARIES "${LAPACK_LIBRARIES}")
target_link_libraries(lammps PRIVATE LAMMPS::MSCG)
add_dependencies(LAMMPS::MSCG mscg_build)
if(NOT BUILD_SHARED_LIBS)
install(CODE "MESSAGE(FATAL_ERROR \"Installing liblammps with downloaded libraries is currently not supported.\")")
endif()
else()
find_package(MSCG)
if(NOT MSCG_FOUND)

View File

@ -9,9 +9,6 @@ if(COLVARS_LEPTON)
set(LEPTON_DIR ${LAMMPS_LIB_SOURCE_DIR}/colvars/lepton)
file(GLOB LEPTON_SOURCES ${LEPTON_DIR}/src/[^.]*.cpp)
add_library(lepton STATIC ${LEPTON_SOURCES})
if(NOT BUILD_SHARED_LIBS)
install(TARGETS lepton EXPORT LAMMPS_Targets LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
endif()
# Change the define below to LEPTON_BUILDING_SHARED_LIBRARY when linking Lepton as a DLL with MSVC
target_compile_definitions(lepton PRIVATE -DLEPTON_BUILDING_STATIC_LIBRARY)
set_target_properties(lepton PROPERTIES OUTPUT_NAME lammps_lepton${LAMMPS_MACHINE})
@ -19,9 +16,6 @@ if(COLVARS_LEPTON)
endif()
add_library(colvars STATIC ${COLVARS_SOURCES})
if(NOT BUILD_SHARED_LIBS)
install(TARGETS colvars EXPORT LAMMPS_Targets LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
endif()
target_compile_definitions(colvars PRIVATE -DLAMMPS_${LAMMPS_SIZES})
set_target_properties(colvars PROPERTIES OUTPUT_NAME lammps_colvars${LAMMPS_MACHINE})
target_include_directories(colvars PUBLIC ${LAMMPS_LIB_SOURCE_DIR}/colvars)

View File

@ -1,5 +1,8 @@
enable_language(C)
if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.12)
cmake_policy(SET CMP0074 NEW)
endif()
find_package(HDF5 REQUIRED)
target_link_libraries(h5md PRIVATE ${HDF5_LIBRARIES})
target_include_directories(h5md PUBLIC ${HDF5_INCLUDE_DIRS})

View File

@ -1,8 +1,5 @@
set(MOLFILE_INCLUDE_DIRS "${LAMMPS_LIB_SOURCE_DIR}/molfile" CACHE STRING "Path to VMD molfile plugin headers")
add_library(molfile INTERFACE)
if(NOT BUILD_SHARED_LIBS)
install(TARGETS molfile EXPORT LAMMPS_Targets LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
endif()
target_include_directories(molfile INTERFACE ${MOLFILE_INCLUDE_DIRS})
# no need to link with -ldl on windows
if(NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Windows")

View File

@ -1,11 +1,18 @@
# USER-NETCDF can use NetCDF, Parallel NetCDF (PNetCDF), or both. At least one necessary.
# NetCDF library enables dump style "netcdf", while PNetCDF enables dump style "netcdf/mpiio"
find_package(NetCDF)
if(NETCDF_FOUND)
find_package(PNetCDF)
else(NETCDF_FOUND)
find_package(PNetCDF REQUIRED)
endif(NETCDF_FOUND)
if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.12)
cmake_policy(SET CMP0074 NEW)
endif()
if(NOT BUILD_MPI)
find_package(NetCDF REQUIRED)
else()
find_package(NetCDF)
if(NETCDF_FOUND)
find_package(PNetCDF)
else()
find_package(PNetCDF REQUIRED)
endif()
endif()
if(NETCDF_FOUND)
target_link_libraries(lammps PRIVATE NetCDF::NetCDF)

View File

@ -70,16 +70,12 @@ if(DOWNLOAD_PLUMED)
ExternalProject_get_property(plumed_build INSTALL_DIR)
add_library(LAMMPS::PLUMED UNKNOWN IMPORTED)
add_dependencies(LAMMPS::PLUMED plumed_build)
if(NOT BUILD_SHARED_LIBS)
install(CODE "MESSAGE(FATAL_ERROR \"Installing liblammps with downloaded libraries is currently not supported.\")")
endif()
if(PLUMED_MODE STREQUAL "STATIC")
set_target_properties(LAMMPS::PLUMED PROPERTIES INTERFACE_COMPILE_DEFINITIONS "__PLUMED_WRAPPER_CXX=1")
set_target_properties(LAMMPS::PLUMED PROPERTIES IMPORTED_LOCATION ${INSTALL_DIR}/lib/libplumed.a INTERFACE_LINK_LIBRARIES "${PLUMED_LINK_LIBS};${CMAKE_DL_LIBS}")
elseif(PLUMED_MODE STREQUAL "SHARED")
set_target_properties(LAMMPS::PLUMED PROPERTIES IMPORTED_LOCATION ${INSTALL_DIR}/lib/libplumed${CMAKE_SHARED_LIBRARY_SUFFIX} INTERFACE_LINK_LIBRARIES "${INSTALL_DIR}/lib/libplumedKernel${CMAKE_SHARED_LIBRARY_SUFFIX};${CMAKE_DL_LIBS}")
elseif(PLUMED_MODE STREQUAL "RUNTIME")
set_target_properties(LAMMPS::PLUMED PROPERTIES INTERFACE_COMPILE_DEFINITIONS "__PLUMED_HAS_DLOPEN=1;__PLUMED_DEFAULT_KERNEL=${INSTALL_DIR}/lib/libplumedKernel${CMAKE_SHARED_LIBRARY_SUFFIX}")
set_target_properties(LAMMPS::PLUMED PROPERTIES INTERFACE_COMPILE_DEFINITIONS "__PLUMED_DEFAULT_KERNEL=${INSTALL_DIR}/lib/libplumedKernel${CMAKE_SHARED_LIBRARY_SUFFIX}")
set_target_properties(LAMMPS::PLUMED PROPERTIES IMPORTED_LOCATION ${INSTALL_DIR}/lib/libplumedWrapper.a INTERFACE_LINK_LIBRARIES "${CMAKE_DL_LIBS}")
endif()
set_target_properties(LAMMPS::PLUMED PROPERTIES INTERFACE_INCLUDE_DIRECTORIES ${INSTALL_DIR}/include)
@ -89,12 +85,11 @@ else()
pkg_check_modules(PLUMED REQUIRED plumed)
add_library(LAMMPS::PLUMED INTERFACE IMPORTED)
if(PLUMED_MODE STREQUAL "STATIC")
set_target_properties(LAMMPS::PLUMED PROPERTIES INTERFACE_COMPILE_DEFINITIONS "__PLUMED_WRAPPER_CXX=1")
include(${PLUMED_LIBDIR}/plumed/src/lib/Plumed.cmake.static)
elseif(PLUMED_MODE STREQUAL "SHARED")
include(${PLUMED_LIBDIR}/plumed/src/lib/Plumed.cmake.shared)
elseif(PLUMED_MODE STREQUAL "RUNTIME")
set_target_properties(LAMMPS::PLUMED PROPERTIES INTERFACE_COMPILE_DEFINITIONS "__PLUMED_HAS_DLOPEN=1;__PLUMED_DEFAULT_KERNEL=${PLUMED_LIBDIR}/libplumedKernel${CMAKE_SHARED_LIBRARY_SUFFIX}")
set_target_properties(LAMMPS::PLUMED PROPERTIES INTERFACE_COMPILE_DEFINITIONS "__PLUMED_DEFAULT_KERNEL=${PLUMED_LIBDIR}/libplumedKernel${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}")

View File

@ -1,12 +1,6 @@
enable_language(C)
if(NOT BUILD_SHARED_LIBS)
message(WARNING "It is recommended to use BUILD_SHARED_LIBS=yes with USER-QMMM")
endif()
add_library(qmmm STATIC ${LAMMPS_LIB_SOURCE_DIR}/qmmm/libqmmm.c)
if(NOT BUILD_SHARED_LIBS)
install(TARGETS qmmm EXPORT LAMMPS_Targets LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
endif()
set_target_properties(qmmm PROPERTIES OUTPUT_NAME lammps_qmmm${LAMMPS_MACHINE})
target_link_libraries(lammps PRIVATE qmmm)
target_include_directories(qmmm PUBLIC ${LAMMPS_LIB_SOURCE_DIR}/qmmm)

View File

@ -52,9 +52,6 @@ if(DOWNLOAD_SCAFACOS)
INTERFACE_LINK_LIBRARIES "${INSTALL_DIR}/lib/libfcs.a;${INSTALL_DIR}/lib/libfcs_direct.a;${INSTALL_DIR}/lib/libfcs_ewald.a;${INSTALL_DIR}/lib/libfcs_fmm.a;${INSTALL_DIR}/lib/libfcs_p2nfft.a;${INSTALL_DIR}/lib/libfcs_p3m.a;GSL::gsl;${INSTALL_DIR}/lib/libfcs_near.a;${INSTALL_DIR}/lib/libfcs_gridsort.a;${INSTALL_DIR}/lib/libfcs_resort.a;${INSTALL_DIR}/lib/libfcs_redist.a;${INSTALL_DIR}/lib/libfcs_common.a;${INSTALL_DIR}/lib/libfcs_pnfft.a;${INSTALL_DIR}/lib/libfcs_pfft.a;${INSTALL_DIR}/lib/libfcs_fftw3_mpi.a;${INSTALL_DIR}/lib/libfcs_fftw3.a;MPI::MPI_Fortran;MPI::MPI_C")
target_link_libraries(lammps PRIVATE LAMMPS::SCAFACOS)
add_dependencies(LAMMPS::SCAFACOS scafacos_build)
if(NOT BUILD_SHARED_LIBS)
install(CODE "MESSAGE(FATAL_ERROR \"Installing liblammps with downloaded libraries is currently not supported.\")")
endif()
else()
find_package(PkgConfig REQUIRED)
pkg_check_modules(SCAFACOS REQUIRED IMPORTED_TARGET scafacos)

View File

@ -18,9 +18,6 @@ if(DOWNLOAD_EIGEN3)
set_target_properties(LAMMPS::EIGEN3 PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${SOURCE_DIR}")
target_link_libraries(lammps PRIVATE LAMMPS::EIGEN3)
add_dependencies(LAMMPS::EIGEN3 Eigen3_build)
if(NOT BUILD_SHARED_LIBS)
install(CODE "MESSAGE(FATAL_ERROR \"Installing liblammps with downloaded libraries is currently not supported.\")")
endif()
else()
find_package(Eigen3 NO_MODULE)
mark_as_advanced(Eigen3_DIR)

View File

@ -24,7 +24,11 @@ if(DOWNLOAD_VORO)
ExternalProject_Add(voro_build
URL https://download.lammps.org/thirdparty/voro++-0.4.6.tar.gz
URL_MD5 2338b824c3b7b25590e18e8df5d68af9
CONFIGURE_COMMAND "" BUILD_COMMAND make ${VORO_BUILD_OPTIONS} BUILD_IN_SOURCE 1 INSTALL_COMMAND ""
PATCH_COMMAND patch -b -p0 < ${LAMMPS_LIB_SOURCE_DIR}/voronoi/voro-make.patch
CONFIGURE_COMMAND ""
BUILD_COMMAND make ${VORO_BUILD_OPTIONS}
BUILD_IN_SOURCE 1
INSTALL_COMMAND ""
BUILD_BYPRODUCTS <SOURCE_DIR>/src/libvoro++.a
)
ExternalProject_get_property(voro_build SOURCE_DIR)
@ -35,9 +39,6 @@ if(DOWNLOAD_VORO)
INTERFACE_INCLUDE_DIRECTORIES "${SOURCE_DIR}/src")
target_link_libraries(lammps PRIVATE LAMMPS::VORO)
add_dependencies(LAMMPS::VORO voro_build)
if(NOT BUILD_SHARED_LIBS)
install(CODE "MESSAGE(FATAL_ERROR \"Installing liblammps with downloaded libraries is currently not supported.\")")
endif()
else()
find_package(VORO)
if(NOT VORO_FOUND)

View File

@ -2,7 +2,7 @@
set(CMAKE_CXX_COMPILER "clang++" CACHE STRING "" FORCE)
set(CMAKE_C_COMPILER "clang" CACHE STRING "" FORCE)
set(CMAKE_CXX_FLAGS "-Wall -Wextra -g -O2 -DNDEBG" CACHE STRING "" FORCE)
set(CMAKE_CXX_FLAGS "-Wall -Wextra -g -O2 -DNDEBUG" CACHE STRING "" FORCE)
set(MPI_CXX "clang++" CACHE STRING "" FORCE)
set(MPI_CXX_COMPILER "mpicxx" CACHE STRING "" FORCE)
unset(HAVE_OMP_H_INCLUDE CACHE)

12
cmake/presets/hip.cmake Normal file
View File

@ -0,0 +1,12 @@
# preset that will enable hipcc plus gcc with support for MPI and OpenMP (on Linux boxes)
set(CMAKE_CXX_COMPILER "hipcc" CACHE STRING "" FORCE)
set(CMAKE_C_COMPILER "gcc" CACHE STRING "" FORCE)
set(CMAKE_CXX_FLAGS "-Wall -Wextra -g -O2 -DNDEBUG" CACHE STRING "" FORCE)
unset(HAVE_OMP_H_INCLUDE CACHE)
set(OpenMP_CXX "hipcc" CACHE STRING "" FORCE)
set(OpenMP_CXX_FLAGS "-fopenmp" CACHE STRING "" FORCE)
set(OpenMP_CXX_LIB_NAMES "omp" CACHE STRING "" FORCE)
set(OpenMP_omp_LIBRARY "libomp.so" CACHE PATH "" FORCE)

View File

@ -5,10 +5,10 @@
set(ALL_PACKAGES ASPHERE BODY CLASS2 COLLOID COMPRESS CORESHELL
DIPOLE GRANULAR KSPACE MANYBODY MC MISC MOLECULE OPT PERI
POEMS PYTHON QEQ REPLICA RIGID SHOCK SNAP SPIN SRD VORONOI
USER-CGDNA USER-CGSDK USER-COLVARS USER-DIFFRACTION
USER-DPD USER-DRUDE USER-FEP USER-MEAMC USER-MESODPD
USER-BOCS USER-CGDNA USER-CGSDK USER-COLVARS USER-DIFFRACTION
USER-DPD USER-DRUDE USER-EFF USER-FEP USER-MEAMC USER-MESODPD
USER-MISC USER-MOFFF USER-OMP USER-PHONON USER-REACTION
USER-REAXC USER-SPH USER-SMD USER-UEF USER-YAFF)
USER-REAXC USER-SDPD USER-SPH USER-SMD USER-UEF USER-YAFF)
foreach(PKG ${ALL_PACKAGES})
set(PKG_${PKG} ON CACHE BOOL "" FORCE)

View File

@ -49,22 +49,15 @@ include files provided with LAMMPS are included with double quotes
For headers declaring functions of the C-library, the corresponding
C++ versions should be included (examples: `#include <cstdlib>` or
`#include <cctypes>`). However, these includes are limited to those defined
in the C++98 standard. Some files thus must use the older style until
the minimum C++ standard requirement of LAMMPS is lifted to C++11 or
even beyond (examples: `#include <stdint.h>` versus `#include <cstdint>`
or `#include <inttypes.h>` versus `#include <cinttypes>`).
`#include <cctypes>` instead of `#include <stdlib.h>` or
`#include<ctypes.h>` ).
### C++ Standard Compliance
LAMMPS core files currently correspond to the C++98 standard. Files
requiring C++11 or later are only permitted in (optional) packages
and particularly packages that are not part of the list of commonly
used packages such as MOLECULE, KSPACE, MANYBODY, or RIGID.
Also, LAMMPS uses the C-style stdio library for I/O instead of iostreams.
Since using both at the same time can cause problems, iostreams should
be avoided where possible.
LAMMPS core files use standard conforming C++ compatible with the
C++11 standard, unless explicitly noted. Also, LAMMPS uses the C-style
stdio library for I/O instead of iostreams. Since using both at the
same time can cause problems, iostreams should be avoided where possible.
### Lean Header Files

View File

@ -1,4 +1,4 @@
.TH LAMMPS "15 April 2020" "2020-04-15"
.TH LAMMPS "5 May 2020" "2020-05-5"
.SH NAME
.B LAMMPS
\- Molecular Dynamics Simulator.

View File

@ -320,11 +320,12 @@ to have an executable that will run on this and newer architectures.
.. note::
NVIDIA GPUs with CC 5.0 (Maxwell) and newer are not compatible with
CC 3.x (Kepler). If you run Kokkos on a newer architecture than what
LAMMPS was compiled with, there will be a significant delay during
device initialization since the just-in-time compiler has to
recompile the GPU kernel code for the new hardware.
If you run Kokkos on a newer GPU architecture than what LAMMPS was
compiled with, there will be a delay during device initialization
since the just-in-time compiler has to recompile all GPU kernels
for the new hardware. This is, however, not possible when compiled
for NVIDIA GPUs with CC 3.x (Kepler) for GPUs with CC 5.0 (Maxwell)
and newer as they are not compatible.
The settings discussed below have been tested with LAMMPS and are
confirmed to work. Kokkos is an active project with ongoing improvements
@ -343,73 +344,109 @@ be specified in uppercase.
:widths: auto
* - **Arch-ID**
- **HOST or GPU**
- **Description**
* - AMDAVX
- HOST
- AMD 64-bit x86 CPU (AVX 1)
* - EPYC
- HOST
- AMD EPYC Zen class CPU (AVX 2)
* - ARMV80
- HOST
- ARMv8.0 Compatible CPU
* - ARMV81
- HOST
- ARMv8.1 Compatible CPU
* - ARMV8_THUNDERX
- HOST
- ARMv8 Cavium ThunderX CPU
* - ARMV8_THUNDERX2
- HOST
- ARMv8 Cavium ThunderX2 CPU
* - WSM
- HOST
- Intel Westmere CPU (SSE 4.2)
* - SNB
- HOST
- Intel Sandy/Ivy Bridge CPU (AVX 1)
* - HSW
- HOST
- Intel Haswell CPU (AVX 2)
* - BDW
- HOST
- Intel Broadwell Xeon E-class CPU (AVX 2 + transactional mem)
* - SKX
- HOST
- Intel Sky Lake Xeon E-class HPC CPU (AVX512 + transactional mem)
* - KNC
- HOST
- Intel Knights Corner Xeon Phi
* - KNL
- HOST
- Intel Knights Landing Xeon Phi
* - BGQ
- HOST
- IBM Blue Gene/Q CPU
* - POWER7
- IBM POWER8 CPU
- HOST
- IBM POWER7 CPU
* - POWER8
- HOST
- IBM POWER8 CPU
* - POWER9
- HOST
- IBM POWER9 CPU
* - KEPLER30
- GPU
- NVIDIA Kepler generation CC 3.0 GPU
* - KEPLER32
- GPU
- NVIDIA Kepler generation CC 3.2 GPU
* - KEPLER35
- GPU
- NVIDIA Kepler generation CC 3.5 GPU
* - KEPLER37
- GPU
- NVIDIA Kepler generation CC 3.7 GPU
* - MAXWELL50
- GPU
- NVIDIA Maxwell generation CC 5.0 GPU
* - MAXWELL52
- GPU
- NVIDIA Maxwell generation CC 5.2 GPU
* - MAXWELL53
- GPU
- NVIDIA Maxwell generation CC 5.3 GPU
* - PASCAL60
- GPU
- NVIDIA Pascal generation CC 6.0 GPU
* - PASCAL61
- GPU
- NVIDIA Pascal generation CC 6.1 GPU
* - VOLTA70
- GPU
- NVIDIA Volta generation CC 7.0 GPU
* - VOLTA72
- GPU
- NVIDIA Volta generation CC 7.2 GPU
* - TURING75
- GPU
- NVIDIA Turing generation CC 7.5 GPU
* - VEGA900
- GPU
- AMD GPU MI25 GFX900
* - VEGA906
- GPU
- AMD GPU MI50/MI60 GFX906
CMake build settings:
^^^^^^^^^^^^^^^^^^^^^
Basic CMake build settings:
^^^^^^^^^^^^^^^^^^^^^^^^^^^
For multicore CPUs using OpenMP, set these 2 variables.
.. code-block:: bash
-D Kokkos_ARCH_CPUARCH=yes # CPUARCH = CPU from list above
-D Kokkos_ARCH_HOSTARCH=yes # HOSTARCH = HOST from list above
-D Kokkos_ENABLE_OPENMP=yes
-D BUILD_OMP=yes
@ -427,15 +464,19 @@ For NVIDIA GPUs using CUDA, set these variables:
.. code-block:: bash
-D Kokkos_ARCH_CPUARCH=yes # CPUARCH = CPU from list above
-D Kokkos_ARCH_HOSTARCH=yes # HOSTARCH = HOST from list above
-D Kokkos_ARCH_GPUARCH=yes # GPUARCH = GPU from list above
-D Kokkos_ENABLE_CUDA=yes
-D Kokkos_ENABLE_OPENMP=yes
-D CMAKE_CXX_COMPILER=wrapper # wrapper = full path to Cuda nvcc wrapper
The wrapper value is the Cuda nvcc compiler wrapper provided in the
Kokkos library: ``lib/kokkos/bin/nvcc_wrapper``\ . The setting should
include the full path name to the wrapper, e.g.
This will also enable executing FFTs on the GPU, either via the internal
KISSFFT library, or - by preference - with the cuFFT library bundled
with the CUDA toolkit, depending on whether CMake can identify its
location. The *wrapper* value for ``CMAKE_CXX_COMPILER`` variable is
the path to the CUDA nvcc compiler wrapper provided in the Kokkos
library: ``lib/kokkos/bin/nvcc_wrapper``\ . The setting should include
the full path name to the wrapper, e.g.
.. code-block:: bash
@ -455,8 +496,8 @@ common packages enabled, you can do the following:
cmake -C ../cmake/presets/minimal.cmake -C ../cmake/presets/kokkos-cuda.cmake ../cmake
cmake --build .
Traditional make settings:
^^^^^^^^^^^^^^^^^^^^^^^^^^
Basic traditional make settings:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Choose which hardware to support in ``Makefile.machine`` via
``KOKKOS_DEVICES`` and ``KOKKOS_ARCH`` settings. See the
@ -467,7 +508,7 @@ For multicore CPUs using OpenMP:
.. code-block:: make
KOKKOS_DEVICES = OpenMP
KOKKOS_ARCH = CPUARCH # CPUARCH = CPU from list above
KOKKOS_ARCH = HOSTARCH # HOSTARCH = HOST from list above
For Intel KNLs using OpenMP:
@ -481,7 +522,8 @@ For NVIDIA GPUs using CUDA:
.. code-block:: make
KOKKOS_DEVICES = Cuda
KOKKOS_ARCH = CPUARCH,GPUARCH # CPUARCH = CPU from list above that is hosting the GPU
KOKKOS_ARCH = HOSTARCH,GPUARCH # HOSTARCH = HOST from list above that is hosting the GPU
KOKKOS_CUDA_OPTIONS = "enable_lambda"
# GPUARCH = GPU from list above
FFT_INC = -DFFT_CUFFT # enable use of cuFFT (optional)
FFT_LIB = -lcufft # link to cuFFT library
@ -504,6 +546,44 @@ C++ compiler for non-Kokkos, non-CUDA files.
KOKKOS_ABSOLUTE_PATH = $(shell cd $(KOKKOS_PATH); pwd)
CC = mpicxx -cxx=$(KOKKOS_ABSOLUTE_PATH)/config/nvcc_wrapper
Advanced KOKKOS compilation settings
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
There are other allowed options when building with the KOKKOS package
that can improve performance or assist in debugging or profiling. Below
are some examples that may be useful in combination with LAMMPS. For
the full list (which keeps changing as the Kokkos package itself evolves),
please consult the Kokkos library documentation.
As alternative to using multi-threading via OpenMP
(``-DKokkos_ENABLE_OPENMP=on`` or ``KOKKOS_DEVICES=OpenMP``) it is also
possible to use Posix threads directly (``-DKokkos_ENABLE_PTHREAD=on``
or ``KOKKOS_DEVICES=Pthread``). While binding of threads to individual
or groups of CPU cores is managed in OpenMP with environment variables,
you need assistance from either the "hwloc" or "libnuma" library for the
Pthread thread parallelization option. To enable use with CMake:
``-DKokkos_ENABLE_HWLOC=on`` or ``-DKokkos_ENABLE_LIBNUMA=on``; and with
conventional make: ``KOKKOS_USE_TPLS=hwloc`` or
``KOKKOS_USE_TPLS=libnuma``.
The CMake option ``-DKokkos_ENABLE_LIBRT=on`` or the makefile setting
``KOKKOS_USE_TPLS=librt`` enables the use of a more accurate timer
mechanism on many Unix-like platforms for internal profiling.
The CMake option ``-DKokkos_ENABLE_DEBUG=on`` or the makefile setting
``KOKKOS_DEBUG=yes`` enables printing of run-time
debugging information that can be useful. It also enables runtime
bounds checking on Kokkos data structures. As to be expected, enabling
this option will negatively impact the performance and thus is only
recommended when developing a Kokkos-enabled style in LAMMPS.
The CMake option ``-DKokkos_ENABLE_CUDA_UVM=on`` or the makefile
setting ``KOKKOS_CUDA_OPTIONS=enable_lambda,force_uvm`` enables the
use of CUDA "Unified Virtual Memory" in Kokkos. Please note, that
the LAMMPS KOKKOS package must **always** be compiled with the
*enable_lambda* option when using GPUs.
----------
.. _latte:

View File

@ -42,7 +42,7 @@ KOKKOS, o = USER-OMP, t = OPT.
* :doc:`com <compute_com>`
* :doc:`com/chunk <compute_com_chunk>`
* :doc:`contact/atom <compute_contact_atom>`
* :doc:`coord/atom <compute_coord_atom>`
* :doc:`coord/atom (k) <compute_coord_atom>`
* :doc:`damage/atom <compute_damage_atom>`
* :doc:`dihedral <compute_dihedral>`
* :doc:`dihedral/local <compute_dihedral_local>`
@ -87,7 +87,7 @@ KOKKOS, o = USER-OMP, t = OPT.
* :doc:`msd/chunk <compute_msd_chunk>`
* :doc:`msd/nongauss <compute_msd_nongauss>`
* :doc:`omega/chunk <compute_omega_chunk>`
* :doc:`orientorder/atom <compute_orientorder_atom>`
* :doc:`orientorder/atom (k) <compute_orientorder_atom>`
* :doc:`pair <compute_pair>`
* :doc:`pair/local <compute_pair_local>`
* :doc:`pe <compute_pe>`
@ -161,5 +161,6 @@ KOKKOS, o = USER-OMP, t = OPT.
* :doc:`torque/chunk <compute_torque_chunk>`
* :doc:`vacf <compute_vacf>`
* :doc:`vcm/chunk <compute_vcm_chunk>`
* :doc:`viscosity/cos <compute_viscosity_cos>`
* :doc:`voronoi/atom <compute_voronoi_atom>`
* :doc:`xrd <compute_xrd>`

View File

@ -22,6 +22,7 @@ OPT.
.. table_from_list::
:columns: 5
* :doc:`accelerate/cos <fix_accelerate_cos>`
* :doc:`adapt <fix_adapt>`
* :doc:`adapt/fep <fix_adapt_fep>`
* :doc:`addforce <fix_addforce>`

View File

@ -378,9 +378,9 @@ change some variables later with additional *-D* flags. A few examples:
.. code-block:: bash
cmake -C ../cmake/preset/minimal.cmake -D PKG_MISC=on ../cmake
cmake -C ../cmake/preset/clang.cmake -C ../cmake/preset/most.cmake ../cmake
cmake -C ../cmake/preset/minimal.cmake -D BUILD_MPI=off ../cmake
cmake -C ../cmake/presets/minimal.cmake -D PKG_MISC=on ../cmake
cmake -C ../cmake/presets/clang.cmake -C ../cmake/presets/most.cmake ../cmake
cmake -C ../cmake/presets/minimal.cmake -D BUILD_MPI=off ../cmake
The first command will install the packages ``KSPACE``, ``MANYBODY``,
``MOLECULE``, ``RIGID`` and ``MISC``; the first four from the preset
@ -396,7 +396,7 @@ It is also possible to do this incrementally.
.. code-block:: bash
cmake -C ../cmake/preset/minimal.cmake ../cmake
cmake -C ../cmake/presets/minimal.cmake ../cmake
cmake -D PKG_MISC=on .
will achieve the same configuration like in the first example above. In

View File

@ -1,10 +1,11 @@
Calculate viscosity
===================
The shear viscosity eta of a fluid can be measured in at least 5 ways
The shear viscosity eta of a fluid can be measured in at least 6 ways
using various options in LAMMPS. See the examples/VISCOSITY directory
for scripts that implement the 5 methods discussed here for a simple
Lennard-Jones fluid model. Also, see the :doc:`Howto kappa <Howto_kappa>` doc page for an analogous discussion for
Lennard-Jones fluid model and 1 method for SPC/E water model.
Also, see the :doc:`Howto kappa <Howto_kappa>` doc page for an analogous discussion for
thermal conductivity.
Eta is a measure of the propensity of a fluid to transmit momentum in
@ -130,9 +131,25 @@ time-integrated momentum fluxes play the role of Cartesian
coordinates, whose mean-square displacement increases linearly
with time at sufficiently long times.
The sixth is periodic perturbation method. It is also a non-equilibrium MD method.
However, instead of measure the momentum flux in response of applied velocity gradient,
it measures the velocity profile in response of applied stress.
A cosine-shaped periodic acceleration is added to the system via the
:doc:`fix accelerate/cos <fix_accelerate_cos>` command,
and the :doc:`compute viscosity/cos<compute_viscosity_cos>` command is used to monitor the
generated velocity profile and remove the velocity bias before thermostatting.
.. note::
An article by :ref:`(Hess) <Hess3>` discussed the accuracy and efficiency of these methods.
----------
.. _Daivis-viscosity:
**(Daivis and Todd)** Daivis and Todd, Nonequilibrium Molecular Dynamics (book),
Cambridge University Press, https://doi.org/10.1017/9781139017848, (2017).
.. _Hess3:
**(Hess)** Hess, B. The Journal of Chemical Physics 2002, 116 (1), 209-217.

View File

@ -24,12 +24,13 @@ allows you to install LAMMPS with a single command, and stay
up-to-date with the current version of LAMMPS by simply updating your
operating system.
To install the appropriate personal-package archive (PPA), do the
To install the appropriate personal-package archives (PPAs), do the
following once:
.. code-block:: bash
$ sudo add-apt-repository ppa:gladky-anton/lammps
$ sudo add-apt-repository ppa:openkim/latest
$ sudo apt-get update
To install LAMMPS do the following once:
@ -38,7 +39,7 @@ To install LAMMPS do the following once:
$ sudo apt-get install lammps-daily
This downloads an executable named "lmp_daily" to your box, which
This downloads an executable named ``lmp_daily`` to your box, which
can then be used in the usual way to run input scripts:
.. code-block:: bash
@ -60,11 +61,29 @@ To get a copy of the current documentation and examples:
$ sudo apt-get install lammps-daily-doc
which will download the doc files in
/usr/share/doc/lammps-daily-doc/doc and example problems in
/usr/share/doc/lammps-doc/examples.
``/usr/share/doc/lammps-daily-doc/doc`` and example problems in
``/usr/share/doc/lammps-doc/examples``.
Note that you may still wish to download the tarball to get potential
files and auxiliary tools.
To get a copy of the current potentials files:
.. code-block:: bash
$ sudo apt-get install lammps-daily-data
which will download the potentials files to
``/usr/share/lammps-daily/potentials``. The ``lmp_daily`` binary is
hard-coded to look for potential files in this directory (it does not
use the `LAMMPS_POTENTIALS` environment variable, as described
in :doc:`pair_coeff <pair_coeff>` command).
The ``lmp_daily`` binary is built with the :ref:`KIM package <kim>` which
results in the above command also installing the `kim-api` binaries when LAMMPS
is installed. In order to use potentials from `openkim.org <openkim_>`_, you
can install the `openkim-models` package
.. code-block:: bash
$ sudo apt-get install openkim-models
To un-install LAMMPS, do the following:
@ -72,17 +91,8 @@ To un-install LAMMPS, do the following:
$ sudo apt-get remove lammps-daily
Note that the lammps-daily executable is built with the following
sequence of make commands, as if you had done the same with the
unpacked tarball files in the src directory:
.. code-block:: bash
$ make yes-all
$ make no-lib
$ make mpi
Thus it builds with FFTW3 and OpenMPI.
Please use ``lmp_daily -help`` to see which compilation options, packages,
and styles are included in the binary.
Thanks to Anton Gladky (gladky.anton at gmail.com) for setting up this
Ubuntu package capability.
@ -103,14 +113,14 @@ linking to the C library interface (lammps-devel, lammps-mpich-devel,
lammps-openmpi-devel), the header for compiling programs using
the C library interface (lammps-headers), and the LAMMPS python
module for Python 3. All packages can be installed at the same
time and the name of the LAMMPS executable is *lmp* and *lmp_openmpi*
or *lmp_mpich* respectively. By default, *lmp* will refer to the
time and the name of the LAMMPS executable is ``lmp`` and ``lmp_openmpi``
or ``lmp_mpich`` respectively. By default, ``lmp`` will refer to the
serial executable, unless one of the MPI environment modules is loaded
("module load mpi/mpich-x86_64" or "module load mpi/openmpi-x86_64").
(``module load mpi/mpich-x86_64`` or ``module load mpi/openmpi-x86_64``).
Then the corresponding parallel LAMMPS executable can be used.
The same mechanism applies when loading the LAMMPS python module.
To install LAMMPS with OpenMPI and run an input in.lj with 2 CPUs do:
To install LAMMPS with OpenMPI and run an input ``in.lj`` with 2 CPUs do:
.. code-block:: bash
@ -118,10 +128,10 @@ To install LAMMPS with OpenMPI and run an input in.lj with 2 CPUs do:
$ module load mpi/openmpi-x86_64
$ mpirun -np 2 lmp -in in.lj
The "dnf install" command is needed only once. In case of a new LAMMPS
stable release, "dnf update" will automatically update to the newer
The ``dnf install`` command is needed only once. In case of a new LAMMPS
stable release, ``dnf update`` will automatically update to the newer
version as soon at the RPM files are built and uploaded to the download
mirrors. The "module load" command is needed once per (shell) session
mirrors. The ``module load`` command is needed once per (shell) session
or shell terminal instance, unless it is automatically loaded from the
shell profile.
@ -134,7 +144,7 @@ can install the `openkim-models` package
$ dnf install openkim-models
Please use "lmp -help" to see which compilation options, packages,
Please use ``lmp -help`` to see which compilation options, packages,
and styles are included in the binary.
Thanks to Christoph Junghans (LANL) for making LAMMPS available in Fedora.
@ -153,10 +163,10 @@ in the `Extra Packages for Enterprise Linux (EPEL) repository <https://fedorapro
for use with Red Hat Enterprise Linux (RHEL) or CentOS version 7.x
and compatible Linux distributions. Names of packages, executable,
and content are the same as described above for Fedora Linux.
But RHEL/CentOS 7.x uses the "yum" package manager instead of "dnf"
But RHEL/CentOS 7.x uses the ``yum`` package manager instead of ``dnf``
in Fedora 28.
Please use "lmp -help" to see which compilation options, packages,
Please use ``lmp -help`` to see which compilation options, packages,
and styles are included in the binary.
Thanks to Christoph Junghans (LANL) for making LAMMPS available in EPEL.
@ -176,13 +186,13 @@ in OpenSuse as of Leap 15.0. You can install the package with:
$ zypper install lammps
This includes support for OpenMPI. The name of the LAMMPS executable
is *lmp*\ . Thus to run an input in parallel on 2 CPUs you would do:
is ``lmp``. Thus to run an input in parallel on 2 CPUs you would do:
.. code-block:: bash
$ mpirun -np 2 lmp -in in.lj
Please use "lmp -help" to see which compilation options, packages,
Please use ``lmp -help`` to see which compilation options, packages,
and styles are included in the binary.
The LAMMPS binary is built with the :ref:`KIM package <kim>` which

View File

@ -9,10 +9,7 @@ different back end languages such as CUDA, OpenMP, or Pthreads. The
Kokkos library also provides data abstractions to adjust (at compile
time) the memory layout of data structures like 2d and 3d arrays to
optimize performance on different hardware. For more information on
Kokkos, see `GitHub <https://github.com/kokkos/kokkos>`_. Kokkos is
part of `Trilinos <https://www.trilinos.org/>`_. The Kokkos
library was written primarily by Carter Edwards, Christian Trott, and
Dan Sunderland (all Sandia).
Kokkos, see `GitHub <https://github.com/kokkos/kokkos>`_.
The LAMMPS KOKKOS package contains versions of pair, fix, and atom
styles that use data structures and macros provided by the Kokkos
@ -21,7 +18,7 @@ package was developed primarily by Christian Trott (Sandia) and Stan
Moore (Sandia) with contributions of various styles by others,
including Sikandar Mashayak (UIUC), Ray Shan (Sandia), and Dan Ibanez
(Sandia). For more information on developing using Kokkos abstractions
see the Kokkos programmers' guide at /lib/kokkos/doc/Kokkos_PG.pdf.
see the Kokkos `Wiki <https://github.com/kokkos/kokkos/wiki>`_.
Kokkos currently provides support for 3 modes of execution (per MPI
task). These are Serial (MPI-only for CPUs and Intel Phi), OpenMP
@ -31,33 +28,30 @@ compatible with specific hardware.
.. note::
Kokkos support within LAMMPS must be built with a C++11 compatible
compiler. This means GCC version 4.7.2 or later, Intel 14.0.4 or later, or
Clang 3.5.2 or later is required.
.. note::
To build with Kokkos support for NVIDIA GPUs, NVIDIA CUDA
To build with Kokkos support for NVIDIA GPUs, the NVIDIA CUDA toolkit
software version 9.0 or later must be installed on your system. See
the discussion for the :doc:`GPU package <Speed_gpu>` for details of how
to check and do this.
the discussion for the :doc:`GPU package <Speed_gpu>` for details of
how to check and do this.
.. note::
Kokkos with CUDA currently implicitly assumes that the MPI library
is CUDA-aware. This is not always the case, especially when using
pre-compiled MPI libraries provided by a Linux distribution. This is not
a problem when using only a single GPU with a single MPI rank. When
running with multiple MPI ranks, you may see segmentation faults without
CUDA-aware MPI support. These can be avoided by adding the flags :doc:`-pk kokkos cuda/aware off <Run_options>` to the LAMMPS command line or by
using the command :doc:`package kokkos cuda/aware off <package>` in the
input file.
Kokkos with CUDA currently implicitly assumes that the MPI library is
CUDA-aware. This is not always the case, especially when using
pre-compiled MPI libraries provided by a Linux distribution. This is
not a problem when using only a single GPU with a single MPI
rank. When running with multiple MPI ranks, you may see segmentation
faults without CUDA-aware MPI support. These can be avoided by adding
the flags :doc:`-pk kokkos cuda/aware off <Run_options>` to the
LAMMPS command line or by using the command :doc:`package kokkos
cuda/aware off <package>` in the input file.
**Building LAMMPS with the KOKKOS package:**
Building LAMMPS with the KOKKOS package
"""""""""""""""""""""""""""""""""""""""
See the :ref:`Build extras <kokkos>` doc page for instructions.
**Running LAMMPS with the KOKKOS package:**
Running LAMMPS with the KOKKOS package
""""""""""""""""""""""""""""""""""""""
All Kokkos operations occur within the context of an individual MPI
task running on a single node of the machine. The total number of MPI
@ -66,7 +60,8 @@ usual manner via the mpirun or mpiexec commands, and is independent of
Kokkos. E.g. the mpirun command in OpenMPI does this via its -np and
-npernode switches. Ditto for MPICH via -np and -ppn.
**Running on a multi-core CPU:**
Running on a multi-core CPU
^^^^^^^^^^^^^^^^^^^^^^^^^^^
Here is a quick overview of how to use the KOKKOS package
for CPU acceleration, assuming one or more 16-core nodes.
@ -142,7 +137,8 @@ atom. When using the Kokkos Serial back end or the OpenMP back end with
a single thread, no duplication or atomic operations are used. For CUDA
and half neighbor lists, the KOKKOS package always uses atomic operations.
**Core and Thread Affinity:**
CPU Cores, Sockets and Thread Affinity
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
When using multi-threading, it is important for performance to bind
both MPI tasks to physical cores, and threads to physical cores, so
@ -156,15 +152,16 @@ for your MPI installation), binding can be forced with these flags:
OpenMPI 1.8: mpirun -np 2 --bind-to socket --map-by socket ./lmp_openmpi ...
Mvapich2 2.0: mpiexec -np 2 --bind-to socket --map-by socket ./lmp_mvapich ...
For binding threads with KOKKOS OpenMP, use thread affinity
environment variables to force binding. With OpenMP 3.1 (gcc 4.7 or
later, intel 12 or later) setting the environment variable
OMP_PROC_BIND=true should be sufficient. In general, for best
performance with OpenMP 4.0 or better set OMP_PROC_BIND=spread and
OMP_PLACES=threads. For binding threads with the KOKKOS pthreads
option, compile LAMMPS the KOKKOS HWLOC=yes option as described below.
For binding threads with KOKKOS OpenMP, use thread affinity environment
variables to force binding. With OpenMP 3.1 (gcc 4.7 or later, intel 12
or later) setting the environment variable ``OMP_PROC_BIND=true`` should
be sufficient. In general, for best performance with OpenMP 4.0 or later
set ``OMP_PROC_BIND=spread`` and ``OMP_PLACES=threads``. For binding
threads with the KOKKOS pthreads option, compile LAMMPS with the hwloc
or libnuma support enabled as described in the :ref:`extra build options page <kokkos>`.
**Running on Knight's Landing (KNL) Intel Xeon Phi:**
Running on Knight's Landing (KNL) Intel Xeon Phi
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Here is a quick overview of how to use the KOKKOS package for the
Intel Knight's Landing (KNL) Xeon Phi:
@ -222,7 +219,8 @@ threads/task as Nt. The product of these two values should be N, i.e.
them in "native" mode, not "offload" mode like the USER-INTEL package
supports.
**Running on GPUs:**
Running on GPUs
^^^^^^^^^^^^^^^
Use the "-k" :doc:`command-line switch <Run_options>` to specify the
number of GPUs per node. Typically the -np setting of the mpirun command
@ -257,7 +255,7 @@ one or more nodes, each with two GPUs:
running on GPUs is to use "full" neighbor lists and set the Newton flag
to "off" for both pairwise and bonded interactions, along with threaded
communication. When running on Maxwell or Kepler GPUs, this will
typically be best. For Pascal GPUs, using "half" neighbor lists and
typically be best. For Pascal GPUs and beyond, using "half" neighbor lists and
setting the Newton flag to "on" may be faster. For many pair styles,
setting the neighbor binsize equal to twice the CPU default value will
give speedup, which is the default when running on GPUs. Use the "-pk
@ -270,13 +268,6 @@ one or more nodes, each with two GPUs:
mpirun -np 2 lmp_kokkos_cuda_openmpi -k on g 2 -sf kk -pk kokkos newton on neigh half binsize 2.8 -in in.lj # Newton on, half neighbor list, set binsize = neighbor ghost cutoff
.. note::
For good performance of the KOKKOS package on GPUs, you must
have Kepler generation GPUs (or later). The Kokkos library exploits
texture cache options not supported by Telsa generation GPUs (or
older).
.. note::
When using a GPU, you will achieve the best performance if your
@ -293,7 +284,8 @@ one or more nodes, each with two GPUs:
kspace, etc., you must set the environment variable CUDA_LAUNCH_BLOCKING=1.
However, this will reduce performance and is not recommended for production runs.
**Run with the KOKKOS package by editing an input script:**
Run with the KOKKOS package by editing an input script
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Alternatively the effect of the "-sf" or "-pk" switches can be
duplicated by adding the :doc:`package kokkos <package>` or :doc:`suffix kk <suffix>` commands to your input script.
@ -316,17 +308,24 @@ You only need to use the :doc:`package kokkos <package>` command if you
wish to change any of its option defaults, as set by the "-k on"
:doc:`command-line switch <Run_options>`.
**Using OpenMP threading and CUDA together (experimental):**
**Using OpenMP threading and CUDA together:**
With the KOKKOS package, both OpenMP multi-threading and GPUs can be
used together in a few special cases. In the Makefile, the
KOKKOS_DEVICES variable must include both "Cuda" and "OpenMP", as is
the case for /src/MAKE/OPTIONS/Makefile.kokkos_cuda_mpi
compiled and used together in a few special cases. In the makefile for
the conventional build, the KOKKOS_DEVICES variable must include both,
"Cuda" and "OpenMP", as is the case for ``/src/MAKE/OPTIONS/Makefile.kokkos_cuda_mpi``.
.. code-block:: bash
KOKKOS_DEVICES=Cuda,OpenMP
When building with CMake you need to enable both features as it is done
in the ``kokkos-cuda.cmake`` CMake preset file.
.. code-block:: bash
cmake ../cmake -DKokkos_ENABLE_CUDA=yes -DKokkos_ENABLE_OPENMP=yes
The suffix "/kk" is equivalent to "/kk/device", and for Kokkos CUDA,
using the "-sf kk" in the command line gives the default CUDA version
everywhere. However, if the "/kk/host" suffix is added to a specific
@ -360,7 +359,8 @@ suffix for kspace and bonds, angles, etc. in the input file and the
sure the environment variable CUDA_LAUNCH_BLOCKING is not set to "1"
so CPU/GPU overlap can occur.
**Speed-ups to expect:**
Performance to expect
"""""""""""""""""""""
The performance of KOKKOS running in different modes is a function of
your hardware, which KOKKOS-enable styles are used, and the problem
@ -377,52 +377,26 @@ Generally speaking, the following rules of thumb apply:
performance of a KOKKOS style is a bit slower than the USER-OMP
package.
* When running large number of atoms per GPU, KOKKOS is typically faster
than the GPU package.
than the GPU package when compiled for double precision. The benefit
of using single or mixed precision with the GPU package depends
significantly on the hardware in use and the simulated system and pair
style.
* When running on Intel hardware, KOKKOS is not as fast as
the USER-INTEL package, which is optimized for that hardware.
the USER-INTEL package, which is optimized for x86 hardware (not just
from Intel) and compilation with the Intel compilers. The USER-INTEL
package also can increase the vector length of vector instructions
by switching to single or mixed precision mode.
See the `Benchmark page <https://lammps.sandia.gov/bench.html>`_ of the
LAMMPS web site for performance of the KOKKOS package on different
hardware.
**Advanced Kokkos options:**
Advanced Kokkos options
"""""""""""""""""""""""
There are other allowed options when building with the KOKKOS package.
As explained on the :ref:`Build extras <kokkos>` doc page,
they can be set either as variables on the make command line or in
Makefile.machine, or they can be specified as CMake variables. Each
takes a value shown below. The default value is listed, which is set
in the lib/kokkos/Makefile.kokkos file.
* KOKKOS_DEBUG, values = *yes*\ , *no*\ , default = *no*
* KOKKOS_USE_TPLS, values = *hwloc*\ , *librt*\ , *experimental_memkind*, default = *none*
* KOKKOS_CXX_STANDARD, values = *c++11*\ , *c++1z*\ , default = *c++11*
* KOKKOS_OPTIONS, values = *aggressive_vectorization*, *disable_profiling*, default = *none*
* KOKKOS_CUDA_OPTIONS, values = *force_uvm*, *use_ldg*, *rdc*\ , *enable_lambda*, default = *enable_lambda*
KOKKOS_USE_TPLS=hwloc binds threads to hardware cores, so they do not
migrate during a simulation. KOKKOS_USE_TPLS=hwloc should always be
used if running with KOKKOS_DEVICES=Pthreads for pthreads. It is not
necessary for KOKKOS_DEVICES=OpenMP for OpenMP, because OpenMP
provides alternative methods via environment variables for binding
threads to hardware cores. More info on binding threads to cores is
given on the :doc:`Speed omp <Speed_omp>` doc page.
KOKKOS_USE_TPLS=librt enables use of a more accurate timer mechanism
on most Unix platforms. This library is not available on all
platforms.
KOKKOS_DEBUG is only useful when developing a Kokkos-enabled style
within LAMMPS. KOKKOS_DEBUG=yes enables printing of run-time
debugging information that can be useful. It also enables runtime
bounds checking on Kokkos data structures.
KOKKOS_CXX_STANDARD and KOKKOS_OPTIONS are typically not changed when
building LAMMPS.
KOKKOS_CUDA_OPTIONS are additional options for CUDA. The LAMMPS KOKKOS
package must be compiled with the *enable_lambda* option when using
GPUs.
There are other allowed options when building with the KOKKOS package
that can improve performance or assist in debugging or profiling.
They are explained on the :ref:`KOKKOS section of the build extras <kokkos>` doc page,
Restrictions
""""""""""""

View File

@ -299,6 +299,12 @@ match what is stored in the restart file. So if you wish to change
them, you should use the change_box command after the read_restart
command.
.. note::
Changing a periodic boundary to a non-periodic one will also
cause the image flag for that dimension to be reset to 0 for
all atoms. LAMMPS will print a warning message, if that happens.
----------
The *ortho* and *triclinic* keywords convert the simulation box to be

View File

@ -307,6 +307,7 @@ The individual style names on the :doc:`Commands compute <Commands_compute>` doc
* :doc:`torque/chunk <compute_torque_chunk>` - torque applied on each chunk
* :doc:`vacf <compute_vacf>` - velocity auto-correlation function of group of atoms
* :doc:`vcm/chunk <compute_vcm_chunk>` - velocity of center-of-mass for each chunk
* :doc:`viscosity/cos <compute_viscosity_cos>` - velocity profile under cosine-shaped acceleration
* :doc:`voronoi/atom <compute_voronoi_atom>` - Voronoi volume and neighbors for each atom
* :doc:`xrd <compute_xrd>` - x-ray diffraction intensity on a mesh of reciprocal lattice nodes

View File

@ -3,6 +3,9 @@
compute coord/atom command
==========================
compute coord/atom/kk command
===================================
Syntax
""""""
@ -109,6 +112,30 @@ too frequently.
:doc:`special_bonds <special_bonds>` command that includes all pairs in
the neighbor list.
----------
Styles with a *gpu*\ , *intel*\ , *kk*\ , *omp*\ , or *opt* suffix are
functionally the same as the corresponding style without the suffix.
They have been optimized to run faster, depending on your available
hardware, as discussed on the :doc:`Speed packages <Speed_packages>` doc
page. The accelerated styles take the same arguments and should
produce the same results, except for round-off and precision issues.
These accelerated styles are part of the GPU, USER-INTEL, KOKKOS,
USER-OMP and OPT packages, respectively. They are only enabled if
LAMMPS was built with those packages. See the :doc:`Build package <Build_package>` doc page for more info.
You can specify the accelerated styles explicitly in your input script
by including their suffix, or you can use the :doc:`-suffix command-line switch <Run_options>` when you invoke LAMMPS, or you can use the
:doc:`suffix <suffix>` command in your input script.
See the :doc:`Speed packages <Speed_packages>` doc page for more
instructions on how to use the accelerated styles effectively.
----------
**Output info:**
For *cstyle* cutoff, this compute can calculate a per-atom vector or

View File

@ -3,6 +3,9 @@
compute orientorder/atom command
================================
compute orientorder/atom/kk command
===================================
Syntax
""""""
@ -16,13 +19,14 @@ Syntax
.. parsed-literal::
keyword = *cutoff* or *nnn* or *degrees* or *components*
keyword = *cutoff* or *nnn* or *degrees* or *components* or *chunksize*
*cutoff* value = distance cutoff
*nnn* value = number of nearest neighbors
*degrees* values = nlvalues, l1, l2,...
*wl* value = yes or no
*wl/hat* value = yes or no
*components* value = ldegree
*chunksize* value = number of atoms in each pass
Examples
""""""""
@ -104,6 +108,14 @@ in conjunction with :doc:`compute coord_atom <compute_coord_atom>` to
calculate the ten Wolde's criterion to identify crystal-like
particles, as discussed in :ref:`ten Wolde <tenWolde2>`.
The optional keyword *chunksize* is only applicable when using the
the KOKKOS package and is ignored otherwise. This keyword controls
the number of atoms in each pass used to compute the bond-orientational
order parameters and is used to avoid running out of memory. For example
if there are 4000 atoms in the simulation and the *chunksize*
is set to 2000, the parameter calculation will be broken up
into two passes.
The value of :math:`Q_l` is set to zero for atoms not in the
specified compute group, as well as for atoms that have less than
*nnn* neighbors within the distance cutoff, unless *nnn* is NULL.
@ -128,6 +140,30 @@ too frequently.
:doc:`special_bonds <special_bonds>` command that includes all pairs in
the neighbor list.
----------
Styles with a *gpu*\ , *intel*\ , *kk*\ , *omp*\ , or *opt* suffix are
functionally the same as the corresponding style without the suffix.
They have been optimized to run faster, depending on your available
hardware, as discussed on the :doc:`Speed packages <Speed_packages>` doc
page. The accelerated styles take the same arguments and should
produce the same results, except for round-off and precision issues.
These accelerated styles are part of the GPU, USER-INTEL, KOKKOS,
USER-OMP and OPT packages, respectively. They are only enabled if
LAMMPS was built with those packages. See the :doc:`Build package <Build_package>` doc page for more info.
You can specify the accelerated styles explicitly in your input script
by including their suffix, or you can use the :doc:`-suffix command-line switch <Run_options>` when you invoke LAMMPS, or you can use the
:doc:`suffix <suffix>` command in your input script.
See the :doc:`Speed packages <Speed_packages>` doc page for more
instructions on how to use the accelerated styles effectively.
----------
**Output info:**
This compute calculates a per-atom array with *nlvalues* columns,
@ -165,7 +201,7 @@ Default
The option defaults are *cutoff* = pair style cutoff, *nnn* = 12,
*degrees* = 5 4 6 8 10 12 i.e. :math:`Q_4`, :math:`Q_6`, :math:`Q_8`, :math:`Q_{10}`, and :math:`Q_{12}`,
*wl* = no, *wl/hat* = no, and *components* off
*wl* = no, *wl/hat* = no, *components* off, and *chunksize* = 2000
----------

View File

@ -2,6 +2,7 @@
compute stress/atom command
===========================
compute centroid/stress/atom command
====================================
@ -223,15 +224,14 @@ The per-atom array values will be in pressure\*volume
Restrictions
""""""""""""
Currently, compute *centroid/stress/atom* does not support
pair styles with many-body interactions,
such as :doc:`Tersoff <pair_tersoff>`,
and LAMMPS will generate an error in such cases.
In principal, equivalent formulation
to that of angle, dihedral and improper contributions
in the virial :math:`W_{ab}` formula
can also be applied to the many-body pair styles,
and is planned in the future.
Currently (Spring 2020), compute *centroid/stress/atom* does not support
pair styles with many-body interactions, such as :doc:`Tersoff
<pair_tersoff>`, or pair styles with long-range Coulomb interactions.
LAMMPS will generate an error in such cases. In principal, equivalent
formulation to that of angle, dihedral and improper contributions in the
virial :math:`W_{ab}` formula can also be applied to the many-body pair
styles, and is planned in the future.
Related commands
""""""""""""""""

View File

@ -0,0 +1,156 @@
.. index:: compute viscosity/cos
compute viscosity/cos command
=============================
Syntax
""""""
.. parsed-literal::
compute ID group-ID viscosity/cos
* ID, group-ID are documented in :doc:`compute <compute>` command
* viscosity/cos = style name of this compute command
Examples
""""""""
.. code-block:: LAMMPS
compute cos all viscosity/cos
variable V equal c_cos[7]
variable A equal 0.02E-5
variable density equal density
variable lz equal lz
variable reciprocalViscosity equal v_V/${A}/v_density*39.4784/v_lz/v_lz*100
Description
"""""""""""
Define a computation that calculates the velocity amplitude of a group of atoms
with an cosine-shaped velocity profile and the temperature of them
after subtracting out the velocity profile before computing the kinetic energy.
A compute of this style can be used by any command that computes a temperature,
e.g. :doc:`thermo_modify <thermo_modify>`, :doc:`fix npt <fix_nh>`, etc.
This command together with :doc:`fix_accelerate/cos<fix_accelerate_cos>`
enables viscosity calculation with periodic perturbation method,
as described by :ref:`Hess<Hess1>`.
An acceleration along the x-direction is applied to the simulation system
by using :doc:`fix_accelerate/cos<fix_accelerate_cos>` command.
The acceleration is a periodic function along the z-direction:
.. math::
a_{x}(z) = A \cos \left(\frac{2 \pi z}{l_{z}}\right)
where :math:`A` is the acceleration amplitude, :math:`l_z` is the z-length
of the simulation box. At steady state, the acceleration generates
a velocity profile:
.. math::
v_{x}(z) = V \cos \left(\frac{2 \pi z}{l_{z}}\right)
The generated velocity amplitude :math:`V` is related to the
shear viscosity :math:`\eta` by:
.. math::
V = \frac{A \rho}{\eta}\left(\frac{l_{z}}{2 \pi}\right)^{2}
and it can be obtained from ensemble average of the velocity profile:
.. math::
V = \frac{\sum_i 2 m_{i} v_{i, x} \cos \left(\frac{2 \pi z_i}{l_{z}}\right)}{\sum_i m_{i}}
where :math:`m_i`, :math:`v_{i,x}` and :math:`z_i` are the mass,
x-component velocity and z coordinate of a particle.
After the cosine-shaped collective velocity in :math:`x` direction
has been subtracted for each atom, the temperature is calculated by the formula
KE = dim/2 N k T, where KE = total kinetic energy of the group of
atoms (sum of 1/2 m v\^2), dim = 2 or 3 = dimensionality of the
simulation, N = number of atoms in the group, k = Boltzmann constant,
and T = temperature.
A kinetic energy tensor, stored as a 6-element vector, is also
calculated by this compute for use in the computation of a pressure
tensor. The formula for the components of the tensor is the same as
the above formula, except that v\^2 is replaced by vx\*vy for the xy
component, etc. The 6 components of the vector are ordered xx, yy,
zz, xy, xz, yz.
The number of atoms contributing to the temperature is assumed to be
constant for the duration of the run; use the *dynamic* option of the
:doc:`compute_modify <compute_modify>` command if this is not the case.
However, in order to get meaningful result, the group ID of this compute should be all.
The removal of the cosine-shaped velocity component by this command is
essentially computing the temperature after a "bias" has been removed
from the velocity of the atoms. If this compute is used with a fix
command that performs thermostatting then this bias will be subtracted
from each atom, thermostatting of the remaining thermal velocity will
be performed, and the bias will be added back in. Thermostatting
fixes that work in this way include :doc:`fix nvt <fix_nh>`, :doc:`fix temp/rescale <fix_temp_rescale>`, :doc:`fix temp/berendsen <fix_temp_berendsen>`, and :doc:`fix langevin <fix_langevin>`.
This compute subtracts out degrees-of-freedom due to fixes that
constrain molecular motion, such as :doc:`fix shake <fix_shake>` and
:doc:`fix rigid <fix_rigid>`. This means the temperature of groups of
atoms that include these constraints will be computed correctly. If
needed, the subtracted degrees-of-freedom can be altered using the
*extra* option of the :doc:`compute_modify <compute_modify>` command.
See the :doc:`Howto thermostat <Howto_thermostat>` doc page for a
discussion of different ways to compute temperature and perform
thermostatting.
----------
**Output info:**
This compute calculates a global scalar (the temperature) and a global
vector of length 7, which can be accessed by indices 1-7.
The first 6 elements of the vector are the KE tensor,
and the 7-th is the cosine-shaped velocity amplitude :math:`V`,
which can be used to calculate the reciprocal viscosity, as shown in the example.
These values can be used by any command that uses global scalar or
vector values from a compute as input.
See the :doc:`Howto output <Howto_output>` doc page for an overview of LAMMPS output options.
The scalar value calculated by this compute is "intensive". The
first 6 elements of vector values are "extensive",
and the 7-th element of vector values is "intensive".
The scalar value will be in temperature :doc:`units <units>`. The
first 6 elements of vector values will be in energy :doc:`units <units>`.
The 7-th element of vector value will be in velocity :doc:`units <units>`.
Restrictions
""""""""""""
This command is only available when LAMMPS was built with the USER-MISC package.
Since this compute depends on :doc:`fix accelerate/cos <fix_accelerate_cos>` which can
only work for 3d systems, it cannot be used for 2d systems.
Related commands
""""""""""""""""
:doc:`fix accelerate/cos <fix_accelerate_cos>`
Default
"""""""
none
----------
.. _Hess1:
**(Hess)** Hess, B. The Journal of Chemical Physics 2002, 116 (1), 209-217.

View File

@ -165,6 +165,7 @@ The individual style names on the :doc:`Commands fix <Commands_fix>` doc
page are followed by one or more of (g,i,k,o,t) to indicate which
accelerated styles exist.
* :doc:`accelerate/cos <fix_accelerate_cos>` - apply cosine-shaped acceleration to atoms
* :doc:`adapt <fix_adapt>` - change a simulation parameter over time
* :doc:`adapt/fep <fix_adapt_fep>` - enhanced version of fix adapt
* :doc:`addforce <fix_addforce>` - add a force to each atom

View File

@ -0,0 +1,104 @@
.. index:: fix accelerate/cos
fix accelerate/cos command
==========================
Syntax
""""""
.. parsed-literal::
fix ID group-ID accelerate value
* ID, group-ID are documented in :doc:`fix <fix>` command
* accelerate/cos = style name of this fix command
* value = amplitude of acceleration (in unit of force/mass)
Examples
""""""""
.. code-block:: LAMMPS
fix 1 all accelerate/cos 0.02e-5
Description
"""""""""""
Give each atom a acceleration in x-direction based on its z coordinate.
The acceleration is a periodic function along the z-direction:
.. math::
a_{x}(z) = A \cos \left(\frac{2 \pi z}{l_{z}}\right)
where :math:`A` is the acceleration amplitude, :math:`l_z` is the z-length
of the simulation box.
At steady state, the acceleration generates a velocity profile:
.. math::
v_{x}(z) = V \cos \left(\frac{2 \pi z}{l_{z}}\right)
The generated velocity amplitude :math:`V` is related to the
shear viscosity :math:`\eta` by:
.. math::
V = \frac{A \rho}{\eta}\left(\frac{l_{z}}{2 \pi}\right)^{2}
and it can be obtained from ensemble average of the velocity profile:
.. math::
V = \frac{\sum_i 2 m_{i} v_{i, x} \cos \left(\frac{2 \pi z_i}{l_{z}}\right)}{\sum_i m_{i}}
where :math:`m_i`, :math:`v_{i,x}` and :math:`z_i` are the mass,
x-component velocity and z coordinate of a particle.
The velocity amplitude :math:`V` can be calculated with :doc:`compute viscosity/cos <compute_viscosity_cos>`,
which enables viscosity calculation with periodic perturbation method,
as described by :ref:`Hess<Hess2>`.
Because the applied acceleration drives the system away from equilibration,
the calculated shear viscosity is lower than the intrinsic viscosity
due to the shear-thinning effect.
Extrapolation to zero acceleration should generally be performed to
predict the zero-shear viscosity.
As the shear stress decreases, the signal-noise ratio decreases rapidly,
the simulation time must be extended accordingly to get converged result.
In order to get meaningful result, the group ID of this fix should be all.
----------
**Restart, fix_modify, output, run start/stop, minimize info:**
No information about this fix is written to binary restart files.
None of the fix_modify options are relevant to this fix.
No global or per-atom quantities are stored by this fix for access by various output commands.
No parameter of this fix can be used with the start/stop keywords of the run command.
This fix is not invoked during energy minimization.
Restrictions
""""""""""""
This command is only available when LAMMPS was built with the USER-MISC package.
Since this fix depends on the z-coordinate of atoms, it cannot be used in 2d simulations.
Related commands
""""""""""""""""
:doc:`compute viscosity/cos <compute_viscosity_cos>`
Default
"""""""
none
----------
.. _Hess2:
**(Hess)** Hess, B. The Journal of Chemical Physics 2002, 116 (1), 209-217.

View File

@ -26,7 +26,7 @@ Syntax
v_name = global value calculated by an equal-style variable with name
* zero or more keyword/arg pairs may be appended
* keyword = *type* or *start* or *file* or *overwrite* or *title1* or *title2* or *ncorr* or *p* or *m*
* keyword = *type* or *start* or *file* or *overwrite* or *title1* or *title2* or *ncorr* or *nlen* or *ncount*
.. parsed-literal::

52
doc/src/fix_bond_react.rst Normal file → Executable file
View File

@ -158,7 +158,9 @@ The following comments pertain to each *react* argument (in other
words, can be customized for each reaction, or reaction step):
A check for possible new reaction sites is performed every *Nevery*
timesteps.
timesteps. *Nevery* can be specified with an equal-style
:doc:`variable <variable>`, whose value is rounded up to the nearest
integer.
Three physical conditions must be met for a reaction to occur. First,
a bonding atom pair must be identified within the reaction distance
@ -171,19 +173,29 @@ modified to match the post-reaction template.
A bonding atom pair will be identified if several conditions are met.
First, a pair of atoms I,J within the specified react-group-ID of type
itype and jtype must be separated by a distance between *Rmin* and
*Rmax*\ . It is possible that multiple bonding atom pairs are
identified: if the bonding atoms in the pre-reacted template are 1-2
neighbors, i.e. directly bonded, the farthest bonding atom partner is
set as its bonding partner; otherwise, the closest potential partner
is chosen. Then, if both an atom I and atom J have each other as their
bonding partners, these two atoms are identified as the bonding atom
pair of the reaction site. Once this unique bonding atom pair is
identified for each reaction, there could two or more reactions that
involve a given atom on the same timestep. If this is the case, only
one such reaction is permitted to occur. This reaction is chosen
randomly from all potential reactions. This capability allows e.g. for
different reaction pathways to proceed from identical reaction sites
with user-specified probabilities.
*Rmax*\ . *Rmin* and *Rmax* can be specified with equal-style
:doc:`variables <variable>`. For example, these reaction cutoffs can
be a function of the reaction conversion using the following commands:
.. code-block:: LAMMPS
variable rmax equal 0 # initialize variable before bond/react
fix myrxn all bond/react react myrxn1 all 1 0 v_rmax mol1 mol2 map_file.txt
variable rmax equal 3+f_myrxn[1]/100 # arbitrary function of reaction count
It is possible that multiple bonding atom pairs are identified: if the
bonding atoms in the pre-reacted template are 1-2 neighbors, i.e.
directly bonded, the farthest bonding atom partner is set as its
bonding partner; otherwise, the closest potential partner is chosen.
Then, if both an atom I and atom J have each other as their bonding
partners, these two atoms are identified as the bonding atom pair of
the reaction site. Once this unique bonding atom pair is identified
for each reaction, there could two or more reactions that involve a
given atom on the same timestep. If this is the case, only one such
reaction is permitted to occur. This reaction is chosen randomly from
all potential reactions. This capability allows e.g. for different
reaction pathways to proceed from identical reaction sites with
user-specified probabilities.
The pre-reacted molecule template is specified by a molecule command.
This molecule template file contains a sample reaction site and its
@ -419,7 +431,8 @@ it occurs:
The *prob* keyword can affect whether or not an eligible reaction
actually occurs. The fraction setting must be a value between 0.0 and
1.0. A uniform random number between 0.0 and 1.0 is generated and the
1.0, and can be specified with an equal-style :doc:`variable <variable>`.
A uniform random number between 0.0 and 1.0 is generated and the
eligible reaction only occurs if the random number is less than the
fraction. Up to N reactions are permitted to occur, as optionally
specified by the *max_rxn* keyword.
@ -489,10 +502,11 @@ local command.
**Restart, fix_modify, output, run start/stop, minimize info:**
Cumulative reaction counts for each reaction are written to :doc:`binary restart files <restart>`. These values are associated with the
reaction name (react-ID). Additionally, internally-created per-atom
properties are stored to allow for smooth restarts. None of the
:doc:`fix_modify <fix_modify>` options are relevant to this fix.
Cumulative reaction counts for each reaction are written to :doc:`binary restart files <restart>`.
These values are associated with the reaction name (react-ID).
Additionally, internally-created per-atom properties are stored to
allow for smooth restarts. None of the :doc:`fix_modify <fix_modify>`
options are relevant to this fix.
This fix computes one statistic for each *react* argument that it
stores in a global vector, of length 'number of react arguments', that

View File

@ -160,7 +160,7 @@ the :doc:`run <run>` command.
Restrictions
""""""""""""
The *diskfree* attribute is currently only supported on Linux and MacOS.
The *diskfree* attribute is currently only supported on Linux, MacOSX, and BSD.
Related commands
""""""""""""""""

View File

@ -47,16 +47,22 @@ and the specified geometric :doc:`region <region>` in order to have
energy added or subtracted to it. If not specified, then the atoms in
the group are affected wherever they may move to.
Heat addition/subtraction is performed every N timesteps. The *eflux*
parameter can be specified as a numeric constant or as a variable (see
below). If it is a numeric constant or equal-style variable which
evaluates to a scalar value, then the *eflux* determines the change in
aggregate energy of the entire group of atoms per unit time, e.g. in
eV/psec for :doc:`metal units <units>`. In this case it is an
"extensive" quantity, meaning its magnitude should be scaled with the
number of atoms in the group. Note that since *eflux* has per-time
units (i.e. it is a flux), this means that a larger value of N will
add/subtract a larger amount of energy each time the fix is invoked.
Heat addition/subtraction is performed every N timesteps.
The *eflux* parameter can be specified as a numeric constant or as an
equal- or atom-style :doc:`variable <variable>`. If the value is a
variable, it should be specified as v_name, where *name* is the variable
name. In this case, the variable will be evaluated each timestep, and
its current value(s) used to determine the flux.
If *eflux* is a numeric constant or equal-style variable which evaluates
to a scalar value, then *eflux* determines the change in aggregate energy
of the entire group of atoms per unit time, e.g. in eV/psec for
:doc:`metal units <units>`. In this case it is an "extensive" quantity,
meaning its magnitude should be scaled with the number of atoms in the
group. Note that since *eflux* also has per-time units (i.e. it is a
flux), this means that a larger value of N will add/subtract a larger
amount of energy each time the fix is invoked.
.. note::
@ -71,12 +77,6 @@ the energy flux for a single atom, again in units of energy per unit
time. In this case, each value is an "intensive" quantity, which need
not be scaled with the number of atoms in the group.
As mentioned above, the *eflux* parameter can be specified as an
equal-style or atom_style :doc:`variable <variable>`. If the value is a
variable, it should be specified as v_name, where name is the variable
name. In this case, the variable will be evaluated each timestep, and
its value(s) used to determine the flux.
Equal-style variables can specify formulas with various mathematical
functions, and include :doc:`thermo_style <thermo_style>` command
keywords for the simulation box parameters and timestep and elapsed

View File

@ -15,15 +15,14 @@ Syntax
* k_n = normal repulsion strength (force/distance units or pressure units - see discussion below)
* c_n = normal damping coefficient (force/distance units or pressure units - see discussion below)
* c_t = tangential damping coefficient (force/distance units or pressure units - see discussion below)
* wallstyle = *xplane* or *yplane* or *zplane* or *zcylinder*
* wallstyle = *xplane* or *yplane* or *zplane*
* args = list of arguments for a particular style
.. parsed-literal::
*xplane* or *yplane* args = lo hi
*xplane* or *yplane* or *zplane* args = lo hi
lo,hi = position of lower and upper plane (distance units), either can be NULL)
*zcylinder* args = radius
radius = cylinder radius (distance units)
* zero or more keyword/value pairs may be appended to args
* keyword = *wiggle*
@ -60,8 +59,7 @@ those specified with the :doc:`pair_style body/rounded/polyhedron <pair_body_rou
The *wallstyle* can be planar or cylindrical. The 3 planar options
specify a pair of walls in a dimension. Wall positions are given by
*lo* and *hi*\ . Either of the values can be specified as NULL if a
single wall is desired. For a *zcylinder* wallstyle, the cylinder's
axis is at x = y = 0.0, and the radius of the cylinder is specified.
single wall is desired.
Optionally, the wall can be moving, if the *wiggle* keyword is appended.
@ -71,8 +69,7 @@ particles. The arguments to the *wiggle* keyword specify a dimension
for the motion, as well as it's *amplitude* and *period*\ . Note that
if the dimension is in the plane of the wall, this is effectively a
shearing motion. If the dimension is perpendicular to the wall, it is
more of a shaking motion. A *zcylinder* wall can only be wiggled in
the z dimension.
more of a shaking motion.
Each timestep, the position of a wiggled wall in the appropriate *dim*
is set according to this equation:

View File

@ -51,19 +51,17 @@ each timestep. In the bond-boost hyperdynamics context, a "bond" is
not a covalent bond between a pair of atoms in a molecule. Rather it
is simply a pair of nearby atoms as discussed below.
Both global and local HD are described in :ref:`(Voter2013) <Voter2013>` by
Art Voter and collaborators. Similar to parallel replica dynamics
(PRD), global and local HD are methods for performing accelerated
dynamics that are suitable for infrequent-event systems that obey
first-order kinetics. A good overview of accelerated dynamics methods
for such systems in given in :ref:`(Voter2002) <Voter2002hd>` from the same
group. To quote from the review paper: "The dynamical evolution is
characterized by vibrational excursions within a potential basin,
punctuated by occasional transitions between basins." The transition
probability is characterized by p(t) = k\*exp(-kt) where k is the rate
constant. Running multiple replicas gives an effective enhancement in
the timescale spanned by the multiple simulations, while waiting for
an event to occur.
Both global and local HD are described in :ref:`(Voter2013)
<Voter2013>` by Art Voter and collaborators. Similar to parallel
replica dynamics (PRD), global and local HD are methods for performing
accelerated dynamics that are suitable for infrequent-event systems
that obey first-order kinetics. A good overview of accelerated
dynamics methods (AMD) for such systems in given in :ref:`(Voter2002)
<Voter2002hd>` from the same group. To quote from the review paper:
"The dynamical evolution is characterized by vibrational excursions
within a potential basin, punctuated by occasional transitions between
basins. The transition probability is characterized by p(t) =
k\*exp(-kt) where k is the rate constant."
Both HD and PRD produce a time-accurate trajectory that effectively
extends the timescale over which a system can be simulated, but they

View File

@ -31,7 +31,7 @@ Style *momb* computes pairwise van der Waals (vdW) and short-range
interactions using the Morse potential and :ref:`(Grimme) <Grimme>` method
implemented in the Many-Body Metal-Organic (MOMB) force field
described comprehensively in :ref:`(Fichthorn) <Fichthorn>` and
:ref:`(Zhou) <Zhou4>`. Grimme's method is widely used to correct for
:ref:`(Zhou) <Zhou5>`. Grimme's method is widely used to correct for
dispersion in density functional theory calculations.
.. math::
@ -76,6 +76,6 @@ Related commands
**(Fichthorn)** Fichthorn, Balankura, Qi, CrystEngComm, 18(29), 5410-5417 (2016).
.. _Zhou4:
.. _Zhou5:
**(Zhou)** Zhou, Saidi, Fichthorn, J Phys Chem C, 118(6), 3366-3374 (2014).

View File

@ -18,21 +18,22 @@ Examples
.. code-block:: LAMMPS
pair_style polymorphic
pair_coeff * * TlBr_msw.polymorphic Tl Br
pair_coeff * * AlCu_eam.polymorphic Al Cu
pair_coeff * * GaN_tersoff.polymorphic Ga N
pair_coeff * * GaN_sw.polymorphic GaN
pair_coeff * * FeCH_BOP_I.poly Fe C H
pair_coeff * * TlBr_msw.poly Tl Br
pair_coeff * * CuTa_eam.poly Cu Ta
pair_coeff * * GaN_tersoff.poly Ga N
pair_coeff * * GaN_sw.poly Ga N
Description
"""""""""""
The *polymorphic* pair style computes a 3-body free-form potential
(:ref:`Zhou <Zhou3>`) for the energy E of a system of atoms as
(:ref:`Zhou3 <Zhou3>`) for the energy E of a system of atoms as
.. math::
E & = \frac{1}{2}\sum_{i=1}^{i=N}\sum_{j=1}^{j=N}\left[\left(1-\delta_{ij}\right)\cdot U_{IJ}\left(r_{ij}\right)-\left(1-\eta_{ij}\right)\cdot F_{IJ}\left(r_{ij}\right)\cdot V_{IJ}\left(r_{ij}\right)\right] \\
X_{ij} & = \sum_{k=i_1,k\neq i,j}^{i_N}W_{IK}\left(r_{ik}\right)\cdot G_{JIK}\left(\theta_{jik}\right)\cdot P_{IK}\left(\Delta r_{jik}\right) \\
E & = \frac{1}{2}\sum_{i=1}^{i=N}\sum_{j=1}^{j=N}\left[\left(1-\delta_{ij}\right)\cdot U_{IJ}\left(r_{ij}\right)-\left(1-\eta_{ij}\right)\cdot F_{IJ}\left(X_{ij}\right)\cdot V_{IJ}\left(r_{ij}\right)\right] \\
X_{ij} & = \sum_{k=i_1,k\neq j}^{i_N}W_{IK}\left(r_{ik}\right)\cdot G_{JIK}\left(\cos\theta_{jik}\right)\cdot P_{JIK}\left(\Delta r_{jik}\right) \\
\Delta r_{jik} & = r_{ij}-\xi_{IJ}\cdot r_{ik}
where I, J, K represent species of atoms i, j, and k, :math:`i_1, ...,
@ -42,230 +43,267 @@ Dirac constant (i.e., :math:`\delta_{ij} = 1` when :math:`i = j`, and
constant that can be set either to :math:`\eta_{ij} = \delta_{ij}` or
:math:`\eta_{ij} = 1 - \delta_{ij}` depending on the potential type,
:math:`U_{IJ}(r_{ij})`, :math:`V_{IJ}(r_{ij})`, :math:`W_{IK}(r_{ik})`
are pair functions, :math:`G_{JIK}(\cos(\theta))` is an angular
function, :math:`P_{IK}(\Delta r_{jik})` is a function of atomic spacing
differential :math:`\Delta r_{jik} = r_{ij} - \xi_{IJ} \cdot r_{ik}`
with :math:`\xi_{IJ}` being a pair-dependent parameter, and
are pair functions, :math:`G_{JIK}(\cos\theta_{jik})` is an angular
function, :math:`P_{JIK}(\Delta r_{jik})` is a function of atomic
spacing differential :math:`\Delta r_{jik} = r_{ij} - \xi_{IJ} \cdot
r_{ik}` with :math:`\xi_{IJ}` being a pair-dependent parameter, and
:math:`F_{IJ}(X_{ij})` is a function of the local environment variable
:math:`X_{ij}`. This generic potential is fully defined once the
constants :math:`\eta_{ij}` and :math:`\xi_{IJ}`, and the six functions
:math:`U_{IJ}(r_{ij})`, :math:`V_{IJ}(r_{ij})`, :math:`W_{IK}(r_{ik})`,
:math:`G_{JIK}(\cos(\theta))`, :math:`P_{IK}(\Delta r_{jik})`, and
:math:`F_{IJ}(X_{ij})` are given. Note that these six functions are all
one dimensional, and hence can be provided in an analytic or tabular
form. This allows users to design different potentials solely based on a
manipulation of these functions. For instance, the potential reduces to
Stillinger-Weber potential (:ref:`SW <SW>`) if we set
:math:`G_{JIK}(\cos\theta_{jik})`, :math:`P_{JIK}(\Delta r_{jik})`, and
:math:`F_{IJ}(X_{ij})` are given. Here LAMMPS uses a global parameter
:math:`\eta` to represent :math:`\eta_{ij}`. When :math:`\eta = 1`,
:math:`\eta_{ij} = 1 - \delta_{ij}`, otherwise :math:`\eta_{ij} =
\delta_{ij}`. Additionally, :math:`\eta = 3` indicates that the function
:math:`P_{JIK}(\Delta r)` depends on species I, J and K, otherwise
:math:`P_{JIK}(\Delta r) = P_{IK}(\Delta r)` only depends on species I
and K. Note that these six functions are all one dimensional, and hence
can be provided in a tabular form. This allows users to design different
potentials solely based on a manipulation of these functions. For
instance, the potential reduces to a Stillinger-Weber potential
(:ref:`SW <SW>`) if we set
.. math::
\left\{\begin{array}{l}
\eta_{ij} = \delta_{ij},\xi_{IJ}=0 \\
U_{IJ}\left(r\right)=A_{IJ}\cdot\epsilon_{IJ}\cdot \left(\frac{\sigma_{IJ}}{r}\right)^q\cdot \left[B_{IJ}\cdot \left(\frac{\sigma_{IJ}}{r}\right)^{p-q}-1\right]\cdot exp\left(\frac{\sigma_{IJ}}{r-a_{IJ}\cdot \sigma_{IJ}}\right) \\
V_{IJ}\left(r\right)=\sqrt{\lambda_{IJ}\cdot \epsilon_{IJ}}\cdot exp\left(\frac{\gamma_{IJ}\cdot \sigma_{IJ}}{r-a_{IJ}\cdot \sigma_{IJ}}\right) \\
F_{IJ}\left(X\right)=-X \\
P_{IJ}\left(\Delta r\right)=1 \\
W_{IJ}\left(r\right)=\sqrt{\lambda_{IJ}\cdot \epsilon_{IJ}}\cdot exp\left(\frac{\gamma_{IJ}\cdot \sigma_{IJ}}{r-a_{IJ}\cdot \sigma_{IJ}}\right) \\
G_{JIK}\left(\theta\right)=\left(cos\theta+\frac{1}{3}\right)^2
\end{array}\right.
\eta_{ij} & = \delta_{ij} (\eta = 2~or~\eta = 0),\xi_{IJ}=0 \\
U_{IJ}\left(r\right) & = A_{IJ}\cdot\epsilon_{IJ}\cdot \left(\frac{\sigma_{IJ}}{r}\right)^q\cdot \left[B_{IJ}\cdot \left(\frac{\sigma_{IJ}}{r}\right)^{p-q}-1\right]\cdot exp\left(\frac{\sigma_{IJ}}{r-a_{IJ}\cdot \sigma_{IJ}}\right) \\
V_{IJ}\left(r\right) & = \sqrt{\lambda_{IJ}\cdot \epsilon_{IJ}}\cdot exp\left(\frac{\gamma_{IJ}\cdot \sigma_{IJ}}{r-a_{IJ}\cdot \sigma_{IJ}}\right) \\
F_{IJ}\left(X\right) & = -X \\
P_{JIK}\left(\Delta r\right) & = P_{IK}\left(\Delta r\right) = 1 \\
W_{IJ}\left(r\right) & = \sqrt{\lambda_{IJ}\cdot \epsilon_{IJ}}\cdot exp\left(\frac{\gamma_{IJ}\cdot \sigma_{IJ}}{r-a_{IJ}\cdot \sigma_{IJ}}\right) \\
G_{JIK}\left(\cos\theta\right) & = \left(\cos\theta+\frac{1}{3}\right)^2
The potential reduces to Tersoff types of potential
(:ref:`Tersoff <Tersoff>` or :ref:`Albe <poly-Albe>`) if we set
The potential reduces to a Tersoff potential (:ref:`Tersoff <Tersoff>`
or :ref:`Albe <poly-Albe>`) if we set
.. math::
\left\{\begin{array}{l}
\eta_{ij}=\delta_{ij},\xi_{IJ}=1 \\
U_{IJ}\left(r\right)=\frac{D_{e,IJ}}{S_{IJ}-1}\cdot exp\left[-\beta_{IJ}\sqrt{2S_{IJ}\left(r-r_{e,IJ}\right)}\right]\cdot f_{c,IJ}\left(r\right) \\
V_{IJ}\left(r\right)=\frac{S_{IJ}\cdot D_{e,IJ}}{S_{IJ}-1}\cdot exp\left[-\beta_{IJ}\sqrt{\frac{2}{S_{IJ}}\left(r-r_{e,IJ}\right)}\right]\cdot f_{c,IJ}\left(r\right) \\
F_{IJ}\left(X\right)=\left(1+X\right)^{-\frac{1}{2}} \\
P_{IJ}\left(\Delta r\right)=exp\left(2\mu_{IK}\cdot \Delta r\right) \\
W_{IJ}\left(r\right)=f_{c,IK}\left(r\right) \\
G_{JIK}\left(\theta\right)=\gamma_{IK}\left[1+\frac{c_{IK}^2}{d_{IK}^2}-\frac{c_{IK}^2}{d_{IK}^2+\left(h_{IK}+cos\theta\right)^2}\right]
\end{array}\right.
\eta_{ij} & = \delta_{ij} (\eta = 2~or~\eta = 0),\xi_{IJ}=1 \\
U_{IJ}\left(r\right) & = \frac{D_{e,IJ}}{S_{IJ}-1}\cdot exp\left[-\beta_{IJ}\sqrt{2S_{IJ}}\left(r-r_{e,IJ}\right)\right]\cdot f_{c,IJ}\left(r\right) \\
V_{IJ}\left(r\right) & = \frac{S_{IJ}\cdot D_{e,IJ}}{S_{IJ}-1}\cdot exp\left[-\beta_{IJ}\sqrt{\frac{2}{S_{IJ}}}\left(r-r_{e,IJ}\right)\right]\cdot f_{c,IJ}\left(r\right) \\
F_{IJ}\left(X\right) & = \left(1+X\right)^{-\frac{1}{2}} \\
P_{JIK}\left(\Delta r\right) & = P_{IK}\left(\Delta r\right) = exp\left(2\mu_{IK}\cdot \Delta r\right) \\
W_{IJ}\left(r\right) & = f_{c,IJ}\left(r\right) \\
G_{JIK}\left(\cos\theta\right) & = \gamma_{IK}\left[1+\frac{c_{IK}^2}{d_{IK}^2}-\frac{c_{IK}^2}{d_{IK}^2+\left(h_{IK}+\cos\theta\right)^2}\right]
where
.. math::
f_{c,IJ}=\left\{\begin{array}{lr}
1, & r\leq r_{s,IJ} \\
\frac{1}{2}+\frac{1}{2} cos \left[\frac{\pi \left(r-r_{s,IJ}\right)}{r_{c,IJ}-r_{s,IJ}}\right], & r_{s,IJ}<r<r_{c,IJ} \\
0, & r \geq r_{c,IJ} \\
f_{c,IJ}\left(r\right)=\left\{\begin{array}{l}
1, r\leq R_{IJ}-D_{IJ} \\
\frac{1}{2}+\frac{1}{2}cos\left[\frac{\pi\left(r+D_{IJ}-R_{IJ}\right)}{2D_{IJ}}\right], R_{IJ}-D_{IJ} < r < R_{IJ}+D_{IJ} \\
0, r \geq R_{IJ}+D_{IJ}
\end{array}\right.
The potential reduces to Rockett-Tersoff (:ref:`Wang <Wang3>`) type if we set
The potential reduces to a modified Stillinger-Weber potential
(:ref:`Zhou3 <Zhou3>`) if we set
.. math::
\left\{\begin{array}{l}
\eta_{ij}=\delta_{ij},\xi_{IJ}=1 \\
U_{IJ}\left(r\right)=\left\{\begin{array}{lr}
A_{IJ}\cdot exp\left(-\lambda_{1,IJ}\cdot r\right)\cdot f_{c,IJ}\left(r\right), & r\leq r_{s,1,IJ} \\
A_{IJ}\cdot exp\left(-\lambda_{1,IJ}\cdot r\right)\cdot f_{c,IJ}\left(r\right)\cdot f_{c,1,IJ}\left(r\right), & r_{s,1,IJ}<r<r_{c,1,IJ} \\
0, & r\ge r_{c,1,IJ}
\end{array}\right. \\
V_{IJ}\left(r\right)=\left\{\begin{array}{lr}
B_{IJ} \cdot exp\left(-\lambda_{2,IJ}\cdot r\right)\cdot f_{c,IJ}\left(r\right), & r\le r_{s,1,IJ} \\
B_{IJ} \cdot exp\left(-\lambda_{2,IJ}\cdot r\right)\cdot f_{c,IJ}\left(r\right)+A_{IJ}\cdot exp\left(-\lambda_{1,IJ}\cdot r\right)\cdot & \\ ~~~~~~ f_{c,IJ}\left(r\right)\cdot \left[1-f_{c,1,IJ}\left(r\right)\right], & r_{s,1,IJ}<r<r_{c,1,IJ} \\
B_{IJ} \cdot exp\left(-\lambda_{2,IJ}\cdot r\right)\cdot f_{c,IJ}\left(r\right)+A_{IJ}\cdot exp\left(-\lambda_{1,IJ}\cdot r\right)\cdot & \\ ~~~~~~ f_{c,IJ}\left(r\right) & r \ge r_{c,1,IJ}
\end{array}\right. \\
F_{IJ}\left(X\right)=\left[1+\left(\beta_{IJ}\cdot X\right)^{n_{IJ}}\right]^{-\frac{1}{2n_{IJ}}} \\
P_{IJ}\left(\Delta r\right)=exp\left(\lambda_{3,IK}\cdot \Delta r^3\right) \\
W_{IJ}\left(r\right)=f_{c,IK}\left(r\right) \\
G_{JIK}\left(\theta\right)=1+\frac{c_{IK}^2}{d_{IK}^2}-\frac{c_{IK}^2}{d_{IK}^2+\left(h_{IK}+cos\theta\right)^2}
\end{array}\right.
\eta_{ij} & = \delta_{ij} (\eta = 2~or~\eta = 0),\xi_{IJ}=0 \\
U_{IJ}\left(r\right) & = \varphi_{R,IJ}\left(r\right)-\varphi_{A,IJ}\left(r\right) \\
V_{IJ}\left(r\right) & = u_{IJ}\left(r\right) \\
F_{IJ}\left(X\right) & = -X \\
P_{JIK}\left(\Delta r\right) & = P_{IK}\left(\Delta r\right) = 1 \\
W_{IJ}\left(r\right) & = u_{IJ}\left(r\right) \\
G_{JIK}\left(\cos\theta\right) & = g_{JIK}\left(\cos\theta\right)
The potential reduces to a Rockett-Tersoff potential (:ref:`Wang3
<Wang3>`) if we set
.. math::
f_{c,IJ}=\left\{\begin{array}{lr}
1, & r\leq r_{s,IJ} \\
\frac{1}{2}+\frac{1}{2} cos \left[\frac{\pi \left(r-r_{s,IJ}\right)}{r_{c,IJ}-r_{s,IJ}}\right], & r_{s,IJ}<r<r_{c,IJ} \\
0, & r \geq r_{c,IJ} \\
\end{array}\right.
\eta_{ij} & = \delta_{ij} (\eta = 2~or~\eta = 0),\xi_{IJ}=1 \\
U_{IJ}\left(r\right) & = A_{IJ}exp\left(-\lambda_{1,IJ}\cdot r\right)f_{c,IJ}\left(r\right)f_{ca,IJ}\left(r\right) \\
V_{IJ}\left(r\right) & = \left\{\begin{array}{l}B_{IJ}exp\left(-\lambda_{2,IJ}\cdot r\right)f_{c,IJ}\left(r\right)+ \\ A_{IJ}exp\left(-\lambda_{1,IJ}\cdot r\right)f_{c,IJ}\left(r\right) \left[1-f_{ca,IJ}\left(r\right)\right]\end{array} \right\} \\
F_{IJ}\left(X\right) & = \left[1+\left(\beta_{IJ}X\right)^{n_{IJ}}\right]^{-\frac{1}{2n_{IJ}}} \\
P_{JIK}\left(\Delta r\right) & = P_{IK}\left(\Delta r\right) = exp\left(\lambda_{3,IK}\cdot \Delta r^3\right) \\
W_{IJ}\left(r\right) & = f_{c,IJ}\left(r\right) \\
G_{JIK}\left(\cos\theta\right) & = 1+\frac{c_{IK}^2}{d_{IK}^2}-\frac{c_{IK}^2}{d_{IK}^2+\left(h_{IK}+\cos\theta\right)^2}
where :math:`f_{ca,IJ}(r)` is similar to the :math:`f_{c,IJ}(r)` defined
above:
.. math::
f_{c,1,IJ}=\left\{\begin{array}{lr}
1, & r\leq r_{s,1,IJ} \\
\frac{1}{2}+\frac{1}{2} cos \left[\frac{\pi \left(r-r_{s,1,IJ}\right)}{r_{c,1,IJ}-r_{s,1,IJ}}\right], & r_{s,1,IJ}<r<r_{c,1,IJ} \\
0, & r \geq r_{c,1,IJ} \\
f_{ca,IJ}\left(r\right)=\left\{\begin{array}{l}
1, r\leq R_{a,IJ}-D_{a,IJ} \\
\frac{1}{2}+\frac{1}{2}cos\left[\frac{\pi\left(r+D_{a,IJ}-R_{a,IJ}\right)}{2D_{a,IJ}}\right], R_{a,IJ}-D_{a,IJ} < r < R_{a,IJ}+D_{a,IJ} \\
0, r \geq R_{a,IJ}+D_{a,IJ}
\end{array}\right.
The potential becomes embedded atom method (:ref:`Daw <poly-Daw>`) if we set
The potential becomes the embedded atom method (:ref:`Daw <poly-Daw>`)
if we set
.. math::
\left\{\begin{array}{l}
\eta_{ij}=1-\delta_{ij},\xi_{IJ}=0 \\
U_{IJ}\left(r\right)=\phi_{IJ}\left(r\right) \\
V_{IJ}\left(r\right)=1 \\
F_{II}\left(X\right)=-2F_I\left(X\right) \\
P_{IJ}\left(\Delta r\right)=1 \\
W_{IJ}\left(r\right)=f_{K}\left(r\right) \\
G_{JIK}\left(\theta\right)=1
\end{array}\right.
\eta_{ij} & = 1-\delta_{ij} (\eta = 1),\xi_{IJ}=0 \\
U_{IJ}\left(r\right) & = \phi_{IJ}\left(r\right) \\
V_{IJ}\left(r\right) & = 1 \\
F_{II}\left(X\right) & = -2F_I\left(X\right) \\
P_{JIK}\left(\Delta r\right) & = P_{IK}\left(\Delta r\right) = 1 \\
W_{IJ}\left(r\right) & = f_{J}\left(r\right) \\
G_{JIK}\left(\cos\theta\right) & = 1
In the embedded atom method case, :math:`\phi_{IJ}(r_{ij})` is the pair
In the embedded atom method case, :math:`\phi_{IJ}(r)` is the pair
energy, :math:`F_I(X)` is the embedding energy, *X* is the local
electron density, and :math:`f_K(r)` is the atomic electron density function.
electron density, and :math:`f_J(r)` is the atomic electron density
function.
If the tabulated functions are created using the parameters of sw,
tersoff, and eam potentials, the polymorphic pair style will produce
the same global properties (energies and stresses) and the same forces
as the sw, tersoff, and eam pair styles. The polymorphic pair style
also produces the same atom properties (energies and stresses) as the
corresponding tersoff and eam pair styles. However, due to a different
partition of global properties to atom properties, the polymorphic
pair style will produce different atom properties (energies and
stresses) as the sw pair style. This does not mean that polymorphic
pair style is different from the sw pair style in this case. It just
means that the definitions of the atom energies and atom stresses are
different.
The potential reduces to another type of Tersoff potential (:ref:`Zhou4
<Zhou4>`) if we set
Only a single pair_coeff command is used with the polymorphic style
which specifies an potential file for all needed elements. These are
.. math::
\eta_{ij} & = \delta_{ij} (\eta = 3),\xi_{IJ}=1 \\
U_{IJ}\left(r\right) & = \frac{D_{e,IJ}}{S_{IJ}-1}\cdot exp\left[-\beta_{IJ}\sqrt{2S_{IJ}}\left(r-r_{e,IJ}\right)\right]\cdot f_{c,IJ}\left(r\right) \cdot T_{IJ}\left(r\right)+V_{ZBL,IJ}\left(r\right)\left[1-T_{IJ}\left(r\right)\right] \\
V_{IJ}\left(r\right) & = \frac{S_{IJ}\cdot D_{e,IJ}}{S_{IJ}-1}\cdot exp\left[-\beta_{IJ}\sqrt{\frac{2}{S_{IJ}}}\left(r-r_{e,IJ}\right)\right]\cdot f_{c,IJ}\left(r\right) \cdot T_{IJ}\left(r\right) \\
F_{IJ}\left(X\right) & = \left(1+X\right)^{-\frac{1}{2}} \\
P_{JIK}\left(\Delta r\right) & = \omega_{JIK} \cdot exp\left(\alpha_{JIK}\cdot \Delta r\right) \\
W_{IJ}\left(r\right) & = f_{c,IJ}\left(r\right) \\
G_{JIK}\left(\cos\theta\right) & = \gamma_{JIK}\left[1+\frac{c_{JIK}^2}{d_{JIK}^2}-\frac{c_{JIK}^2}{d_{JIK}^2+\left(h_{JIK}+\cos\theta\right)^2}\right] \\
T_{IJ}\left(r\right) & = \frac{1}{1+exp\left[-b_{f,IJ}\left(r-r_{f,IJ}\right)\right]} \\
V_{ZBL,IJ}\left(r\right) & = 14.4 \cdot \frac{Z_I \cdot Z_J}{r}\sum_{k=1}^{4}\mu_k \cdot exp\left[-\nu_k \left(Z_I^{0.23}+Z_J^{0.23}\right) r\right]
where :math:`f_{c,IJ}(r)` is the same as defined above. This Tersoff
potential differs from the one above because the :math:`P_{JIK}(\Delta
r)` function is now dependent on all three species I, J, and K.
If the tabulated functions are created using the parameters of
Stillinger-Weber, Tersoff, and EAM potentials, the polymorphic pair
style will produce the same global properties (energies and stresses)
and the same forces as the :doc:`sw <pair_sw>`, :doc:`tersoff
<pair_tersoff>`, and :doc:`eam <pair_eam>` pair styles. The polymorphic
pair style also produces the same per-atom properties (energies and
stresses) as the corresponding :doc:`tersoff <pair_tersoff>` and
:doc:`eam <pair_eam>` pair styles. However, due to a different
partitioning of global properties to per-atom properties, the
polymorphic pair style will produce different per-atom properties
(energies and stresses) as the :doc:`sw <pair_sw>` pair style. This does
not mean that polymorphic pair style is different from the sw pair
style. It just means that the definitions of the atom energies and atom
stresses are different.
Only a single pair_coeff command is used with the polymorphic pair style
which specifies a potential file for all needed elements. These are
mapped to LAMMPS atom types by specifying N additional arguments after
the filename in the pair_coeff command, where N is the number of
LAMMPS atom types:
the filename in the pair_coeff command, where N is the number of LAMMPS
atom types:
* filename
* N element names = mapping of Tersoff elements to atom types
* N element names = mapping of polymorphic potential elements to atom types
See the pair_coeff doc page for alternate ways to specify the path for
the potential file. Several files for polymorphic potentials are
included in the potentials directory of the LAMMPS distribution. They
the potential file. Several files for polymorphic potentials are
included in the potentials directory of the LAMMPS distribution. They
have a "poly" suffix.
As an example, imagine the SiC_tersoff.poly file has tabulated
functions for Si-C tersoff potential. If your LAMMPS simulation has 4
atoms types and you want the 1st 3 to be Si, and the 4th to be C, you
would use the following pair_coeff command:
As an example, imagine the GaN_tersoff.poly file has tabulated functions
for Ga-N tersoff potential. If your LAMMPS simulation has 4 atoms types
and you want the 1st 3 to be Ga, and the 4th to be N, you would use the
following pair_coeff command:
.. code-block:: LAMMPS
pair_coeff * * SiC_tersoff.poly Si Si Si C
pair_coeff * * GaN_tersoff.poly Ga Ga Ga N
The 1st 2 arguments must be \* \* so as to span all LAMMPS atom
types. The first three Si arguments map LAMMPS atom types 1,2,3 to the
Si element in the polymorphic file. The final C argument maps LAMMPS
atom type 4 to the C element in the polymorphic file. If a mapping
value is specified as NULL, the mapping is not performed. This can be
used when an polymorphic potential is used as part of the hybrid pair
style. The NULL values are placeholders for atom types that will be
used with other potentials.
The first two arguments must be \* \* to span all pairs of LAMMPS atom
types. The first three Ga arguments map LAMMPS atom types 1,2,3 to the
Ga element in the polymorphic file. The final N argument maps LAMMPS
atom type 4 to the N element in the polymorphic file. If a mapping value
is specified as NULL, the mapping is not performed. This can be used
when an polymorphic potential is used as part of the hybrid pair
style. The NULL values are placeholders for atom types that will be used
with other potentials.
Potential files in the potentials directory of the LAMMPS distribution
have a ".poly" suffix. At the beginning of the files, an unlimited
number of lines starting with '#' are used to describe the potential
and are ignored by LAMMPS. The next line lists two numbers:
number of lines starting with '#' are used to describe the potential and
are ignored by LAMMPS. The next line lists two numbers:
.. parsed-literal::
ntypes :math:`\eta`
ntypes eta
Here ntypes represent total number of species defined in the potential
file, and :math:`\eta = 0` or 1. The number ntypes must equal the total
number of different species defined in the pair_coeff command. When
:math:`\eta = 1`, :math:\eta_{ij}` defined in the potential functions
above is set to :math:`1 - \delta_{ij}`, otherwise :math:`\eta_{ij}` is
set to :math:`\delta_{ij}`. The next ntypes lines each lists two numbers
and a character string representing atomic number, atomic mass, and name
of the species of the ntypes elements:
Here *ntypes* represent total number of species defined in the potential
file, :math:`\eta = 1` reduces to embedded atom method, :math:`\eta = 3`
assumes a three species dependent :math:`P_{JIK}(\Delta r)` function,
and all other values of :math:`\eta` assume a two species dependent
:math:`P_{JK}(\Delta r)` function. The value of *ntypes* must equal the
total number of different species defined in the pair_coeff command. The
next *ntypes* lines each lists two numbers and a character string
representing atomic number, atomic mass, and name of the species of the
ntypes elements:
.. parsed-literal::
atomic_number atomic-mass element (1)
atomic_number atomic-mass element (2)
atomic-number atomic-mass element-name(1)
atomic-number atomic-mass element-name(2)
...
atomic_number atomic-mass element (ntypes)
atomic-number atomic-mass element-name(ntypes)
The next line contains four numbers:
.. parsed-literal::
nr ntheta nx xmax
Here nr is total number of tabular points for radial functions U, V, W,
P, ntheta is total number of tabular points for the angular function G,
nx is total number of tabular points for the function F, xmax is a
maximum value of the argument of function F. Note that the pair
functions :math:`U_{IJ}(r)`, :math:`V_{IJ}(r)`, :math:`W_{IJ}(r)` are
uniformly tabulated between 0 and cutoff distance of the IJ pair,
:math:`G_{JIK}(\cos\theta)` is uniformly tabulated between -1 and 1,
:math:`P_{JIK}(\Delta r)` is uniformly tabulated between -rcmax and
rcmax where rcmax is the maximum cutoff distance of all pairs, and
:math:`F_{IJ}(X)` is uniformly tabulated between 0 and xmax. Linear
extrapolation is assumed if actual simulations exceed these ranges.
The next ntypes\*(ntypes+1)/2 lines contain two numbers:
.. parsed-literal::
cut :math:`xi` (1)
cut :math:`xi` (2)
cut xi(1)
cut xi(2)
...
cut :math:`xi` (ntypes\*(ntypes+1)/2)
cut xi(ntypes\*(ntypes+1)/2)
Here cut means the cutoff distance of the pair functions, :math:`\xi` is
the same as defined in the potential functions above. The
Here cut means the cutoff distance of the pair functions, "xi" is
:math:`\xi` as defined in the potential functions above. The
ntypes\*(ntypes+1)/2 lines are related to the pairs according to the
sequence of first ii (self) pairs, i = 1, 2, ..., ntypes, and then then
ij (cross) pairs, i = 1, 2, ..., ntypes-1, and j = i+1, i+2, ..., ntypes
sequence of first ii (self) pairs, i = 1, 2, ..., ntypes, and then ij
(cross) pairs, i = 1, 2, ..., ntypes-1, and j = i+1, i+2, ..., ntypes
(i.e., the sequence of the ij pairs follows 11, 22, ..., 12, 13, 14,
..., 23, 24, ...).
The final blocks of the potential file are the U, V, W, P, G, and F
functions are listed sequentially. First, U functions are given for
each of the ntypes\*(ntypes+1)/2 pairs according to the sequence
described above. For each of the pairs, nr values are listed. Next,
similar arrays are given for V, W, and P functions. Then G functions
are given for all the ntypes\*ntypes\*ntypes ijk triplets in a natural
sequence i from 1 to ntypes, j from 1 to ntypes, and k from 1 to
ntypes (i.e., ijk = 111, 112, 113, ..., 121, 122, 123 ..., 211, 212,
...). Each of the ijk functions contains ng values. Finally, the F
functions are listed for all ntypes\*(ntypes+1)/2 pairs, each
containing nx values. Either analytic or tabulated functions can be
specified. Currently, constant, exponential, sine and cosine analytic
functions are available which are specified with: constant c1 , where
f(x) = c1 exponential c1 c2 , where f(x) = c1 exp(c2\*x) sine c1 c2 ,
where f(x) = c1 sin(c2\*x) cos c1 c2 , where f(x) = c1 cos(c2\*x)
Tabulated functions are specified by spline n x1 x2, where n=number of
point, (x1,x2)=range and then followed by n values evaluated uniformly
over these argument ranges. The valid argument ranges of the
functions are between 0 <= r <= cut for the U(r), V(r), W(r)
functions, -cutmax <= delta_r <= cutmax for the P(delta_r) functions,
-1 <= :math:`\cos\theta` <= 1 for the G(:math:`\cos\theta`) functions,
and 0 <= X <= maxX for the F(X) functions.
In the final blocks of the potential file, U, V, W, P, G, and F
functions are listed sequentially. First, U functions are given for each
of the ntypes\*(ntypes+1)/2 pairs according to the sequence described
above. For each of the pairs, nr values are listed. Next, similar arrays
are given for V and W functions. If P functions depend only on pair
species, i.e., :math:`\eta \neq 3`, then P functions are also listed the
same way the next. If P functions depend on three species, i.e.,
:math:`\eta = 3`, then P functions are listed for all the
ntypes*ntypes*ntypes IJK triplets in a natural sequence I from 1 to
ntypes, J from 1 to ntypes, and K from 1 to ntypes (i.e., IJK = 111,
112, 113, ..., 121, 122, 123 ..., 211, 212, ...). Next, G functions are
listed for all the ntypes*ntypes*ntypes IJK triplets similarly. For each
of the G functions, ntheta values are listed. Finally, F functions are
listed for all the ntypes*(ntypes+1)/2 pairs in the same sequence as
described above. For each of the F functions, nx values are listed.
**Mixing, shift, table tail correction, restart**\ :
This pair styles does not support the :doc:`pair_modify <pair_modify>`
shift, table, and tail options.
This pair style does not write their information to :doc:`binary restart files <restart>`, since it is stored in potential files. Thus, you
need to re-specify the pair_style and pair_coeff commands in an input
script that reads a restart file.
This pair style does not write their information to :doc:`binary restart
files <restart>`, since it is stored in potential files. Thus, you need
to re-specify the pair_style and pair_coeff commands in an input script
that reads a restart file.
----------
@ -277,15 +315,15 @@ input script. If using read_data, atomic masses must be defined in the
atomic structure data file.
This pair style is part of the MANYBODY package. It is only enabled if
LAMMPS was built with that package. See the :doc:`Build package <Build_package>` doc page for more info.
LAMMPS was built with that package. See the :doc:`Build package
<Build_package>` doc page for more info.
This pair potential requires the :doc:`newtion <newton>` setting to be
"on" for pair interactions.
The potential files provided with LAMMPS (see the potentials
directory) are parameterized for metal :doc:`units <units>`. You can use
any LAMMPS units, but you would need to create your own potential
files.
The potential files provided with LAMMPS (see the potentials directory)
are parameterized for metal :doc:`units <units>`. You can use any LAMMPS
units, but you would need to create your own potential files.
Related commands
""""""""""""""""
@ -296,12 +334,15 @@ Related commands
.. _Zhou3:
**(Zhou)** X. W. Zhou, M. E. Foster, R. E. Jones, P. Yang, H. Fan, and
F. P. Doty, J. Mater. Sci. Res., 4, 15 (2015).
**(Zhou3)** X. W. Zhou, M. E. Foster, R. E. Jones, P. Yang, H. Fan, and F. P. Doty, J. Mater. Sci. Res., 4, 15 (2015).
.. _Zhou4:
**(Zhou4)** X. W. Zhou, M. E. Foster, J. A. Ronevich, and C. W. San Marchi, J. Comp. Chem., 41, 1299 (2020).
.. _SW:
**(SW)** F. H. Stillinger-Weber, and T. A. Weber, Phys. Rev. B, 31, 5262 (1985).
**(SW)** F. H. Stillinger, and T. A. Weber, Phys. Rev. B, 31, 5262 (1985).
.. _Tersoff:
@ -309,8 +350,7 @@ F. P. Doty, J. Mater. Sci. Res., 4, 15 (2015).
.. _poly-Albe:
**(Albe)** K. Albe, K. Nordlund, J. Nord, and A. Kuronen, Phys. Rev. B,
66, 035205 (2002).
**(Albe)** K. Albe, K. Nordlund, J. Nord, and A. Kuronen, Phys. Rev. B, 66, 035205 (2002).
.. _Wang3:

View File

@ -21,12 +21,13 @@ Syntax
.. parsed-literal::
keyword = *checkqeq* or *lgvdw* or *safezone* or *mincap*
keyword = *checkqeq* or *lgvdw* or *safezone* or *mincap* or *minhbonds*
*checkqeq* value = *yes* or *no* = whether or not to require qeq/reax fix
*enobonds* value = *yes* or *no* = whether or not to tally energy of atoms with no bonds
*lgvdw* value = *yes* or *no* = whether or not to use a low gradient vdW correction
*safezone* = factor used for array allocation
*mincap* = minimum size for array allocation
*minhbonds* = minimum size use for storing hydrogen bonds
Examples
""""""""
@ -146,11 +147,11 @@ zero. The latter behavior is usual not desired, as it causes
discontinuities in the potential energy when the bonding of an atom
drops to zero.
Optional keywords *safezone* and *mincap* are used for allocating
reax/c arrays. Increasing these values can avoid memory problems,
such as segmentation faults and bondchk failed errors, that could
occur under certain conditions. These keywords are not used by the
Kokkos version, which instead uses a more robust memory allocation
Optional keywords *safezone*\ , *mincap*\ , and *minhbonds* are used
for allocating reax/c arrays. Increasing these values can avoid memory
problems, such as segmentation faults and bondchk failed errors, that
could occur under certain conditions. These keywords are not used by
the Kokkos version, which instead uses a more robust memory allocation
scheme that checks if the sizes of the arrays have been exceeded and
automatically allocates more memory.
@ -352,7 +353,7 @@ Default
"""""""
The keyword defaults are checkqeq = yes, enobonds = yes, lgvdw = no,
safezone = 1.2, mincap = 50.
safezone = 1.2, mincap = 50, minhbonds = 25.
----------

View File

@ -52,19 +52,16 @@ replicas of a system. One or more replicas can be used. The total
number of steps *N* to run can be interpreted in one of two ways; see
discussion of the *time* keyword below.
PRD is described in :ref:`(Voter1998) <Voter1998>` by Art Voter. Similar to
global or local hyperdynamics (HD), PRD is a method for performing
accelerated dynamics that is suitable for infrequent-event systems
that obey first-order kinetics. A good overview of accelerated
dynamics methods for such systems in given in this review paper
:ref:`(Voter2002) <Voter2002prd>` from Art's group. To quote from the
paper: "The dynamical evolution is characterized by vibrational
excursions within a potential basin, punctuated by occasional
transitions between basins." The transition probability is
characterized by p(t) = k\*exp(-kt) where k is the rate constant.
Running multiple replicas gives an effective enhancement in the
timescale spanned by the multiple simulations, while waiting for an
event to occur.
PRD is described in :ref:`(Voter1998) <Voter1998>` by Art Voter.
Similar to global or local hyperdynamics (HD), PRD is a method for
performing accelerated dynamics that is suitable for infrequent-event
systems that obey first-order kinetics. A good overview of
accelerated dynamics methods (AMD) for such systems in given in this
review paper :ref:`(Voter2002) <Voter2002prd>` from Art's group. To
quote from the paper: "The dynamical evolution is characterized by
vibrational excursions within a potential basin, punctuated by
occasional transitions between basins. The transition probability is
characterized by p(t) = k\*exp(-kt) where k is the rate constant."
Both PRD and HD produce a time-accurate trajectory that effectively
extends the timescale over which a system can be simulated, but they

View File

@ -58,18 +58,21 @@ Run a temperature accelerated dynamics (TAD) simulation. This method
requires two or more partitions to perform NEB transition state
searches.
TAD is described in :ref:`this paper <Voter2000>` by Art Voter. It is a method
that uses accelerated dynamics at an elevated temperature to generate
results at a specified lower temperature. A good overview of
accelerated dynamics methods for such systems is given in :ref:`this review paper <Voter2002>` from the same group. In general, these methods assume
that the long-time dynamics is dominated by infrequent events i.e. the
system is confined to low energy basins for long periods,
punctuated by brief, randomly-occurring transitions to adjacent
basins. TAD is suitable for infrequent-event systems, where in
TAD is described in :ref:`this paper <Voter2000>` by Art Voter. It is
a method that uses accelerated dynamics at an elevated temperature to
generate results at a specified lower temperature. A good overview of
accelerated dynamics methods (AMD) for such systems is given in
:ref:`this review paper <Voter2002>` from the same group. To quote
from the review paper: "The dynamical evolution is characterized by
vibrational excursions within a potential basin, punctuated by
occasional transitions between basins. The transition probability is
characterized by p(t) = k\*exp(-kt) where k is the rate constant."
TAD is a suitable AMD method for infrequent-event systems, where in
addition, the transition kinetics are well-approximated by harmonic
transition state theory (hTST). In hTST, the temperature dependence of
transition rates follows the Arrhenius relation. As a consequence a
set of event times generated in a high-temperature simulation can be
transition state theory (hTST). In hTST, the temperature dependence
of transition rates follows the Arrhenius relation. As a consequence
a set of event times generated in a high-temperature simulation can be
mapped to a set of much longer estimated times in the low-temperature
system. However, because this mapping involves the energy barrier of
the transition event, which is different for each event, the first
@ -79,8 +82,8 @@ events from the current basin. After each event, the simulation is
reflected backwards into the current basin. This is repeated until
the stopping criterion is satisfied, at which point the event with the
earliest low-temperature occurrence time is selected. The stopping
criterion is that the confidence measure be greater than
1-\ *delta*\ . The confidence measure is the probability that no earlier
criterion is that the confidence measure be greater than 1-\ *delta*\
. The confidence measure is the probability that no earlier
low-temperature event will occur at some later time in the
high-temperature simulation. hTST provides an lower bound for this
probability, based on the user-specified minimum pre-exponential

View File

@ -499,6 +499,7 @@ cuda
Cuda
CUDA
CuH
cuFFT
Cummins
Curk
customIDs
@ -1544,6 +1545,7 @@ libmeam
libmessage
libmpi
libmpich
libnuma
libplumed
libplumedKernel
libpng
@ -1663,6 +1665,7 @@ manybody
MANYBODY
Maras
Marchetti
Marchi
Mariella
Marrink
Marroquin
@ -1783,6 +1786,7 @@ Militzer
Minary
mincap
Mindlin
minhbonds
mingw
minima
minimizations
@ -2442,6 +2446,7 @@ Ravelo
rc
Rc
Rcm
rcmax
Rcmx
Rcmy
Rcut
@ -2560,6 +2565,7 @@ Rockett
Rodrigues
Rohart
Ronchetti
Ronevich
Rosati
Rosenberger
Rossky

View File

@ -0,0 +1,56 @@
# two monomer nylon example
# reaction produces a condensed water molecule
units real
boundary p p p
atom_style full
kspace_style pppm 1.0e-4
pair_style lj/class2/coul/long 8.5
angle_style class2
bond_style class2
dihedral_style class2
improper_style class2
read_data tiny_nylon.data
variable runsteps equal 1000
variable prob1 equal step/v_runsteps*2
variable prob2 equal (step/v_runsteps)>0.5
velocity all create 300.0 4928459 dist gaussian
molecule mol1 rxn1_stp1_unreacted.data_template
molecule mol2 rxn1_stp1_reacted.data_template
molecule mol3 rxn1_stp2_unreacted.data_template
molecule mol4 rxn1_stp2_reacted.data_template
thermo 50
# dump 1 all xyz 1 test_vis.xyz
fix myrxns all bond/react stabilization yes statted_grp .03 &
react rxn1 all 1 0.0 5.0 mol1 mol2 rxn1_stp1_map prob v_prob1 1234 &
react rxn2 all 1 0.0 5.0 mol3 mol4 rxn1_stp2_map prob v_prob2 1234
fix 1 statted_grp_REACT nvt temp 300 300 100
# optionally, you can customize behavior of reacting atoms,
# by using the internally-created 'bond_react_MASTER_group', like so:
fix 4 bond_react_MASTER_group temp/rescale 1 300 300 10 1
thermo_style custom step temp press density v_prob1 v_prob2 f_myrxns[1] f_myrxns[2]
# restart 100 restart1 restart2
run ${runsteps}
# write_restart restart_longrun
# write_data restart_longrun.data

View File

@ -0,0 +1,201 @@
LAMMPS (15 Apr 2020)
OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:94)
using 1 OpenMP thread(s) per MPI task
# two monomer nylon example
# reaction produces a condensed water molecule
units real
boundary p p p
atom_style full
kspace_style pppm 1.0e-4
pair_style lj/class2/coul/long 8.5
angle_style class2
bond_style class2
dihedral_style class2
improper_style class2
read_data tiny_nylon.data
orthogonal box = (-25 -25 -25) to (25 25 25)
1 by 1 by 1 MPI processor grid
reading atoms ...
44 atoms
reading velocities ...
44 velocities
scanning bonds ...
9 = max bonds/atom
scanning angles ...
21 = max angles/atom
scanning dihedrals ...
29 = max dihedrals/atom
scanning impropers ...
29 = max impropers/atom
reading bonds ...
42 bonds
reading angles ...
74 angles
reading dihedrals ...
100 dihedrals
reading impropers ...
44 impropers
4 = max # of 1-2 neighbors
6 = max # of 1-3 neighbors
12 = max # of 1-4 neighbors
41 = max # of special neighbors
special bonds CPU = 0.000385045 secs
read_data CPU = 0.013443 secs
variable runsteps equal 1000
variable prob1 equal step/v_runsteps*2
variable prob2 equal (step/v_runsteps)>0.5
velocity all create 300.0 4928459 dist gaussian
molecule mol1 rxn1_stp1_unreacted.data_template
Read molecule template mol1:
1 molecules
18 atoms with max type 8
16 bonds with max type 14
25 angles with max type 28
23 dihedrals with max type 36
14 impropers with max type 11
molecule mol2 rxn1_stp1_reacted.data_template
Read molecule template mol2:
1 molecules
18 atoms with max type 9
17 bonds with max type 13
31 angles with max type 27
39 dihedrals with max type 33
20 impropers with max type 1
molecule mol3 rxn1_stp2_unreacted.data_template
Read molecule template mol3:
1 molecules
15 atoms with max type 9
14 bonds with max type 13
25 angles with max type 27
30 dihedrals with max type 33
16 impropers with max type 1
molecule mol4 rxn1_stp2_reacted.data_template
Read molecule template mol4:
1 molecules
15 atoms with max type 11
13 bonds with max type 15
19 angles with max type 29
16 dihedrals with max type 32
10 impropers with max type 13
thermo 50
# dump 1 all xyz 1 test_vis.xyz
fix myrxns all bond/react stabilization yes statted_grp .03 react rxn1 all 1 0.0 5.0 mol1 mol2 rxn1_stp1_map prob v_prob1 1234 react rxn2 all 1 0.0 5.0 mol3 mol4 rxn1_stp2_map prob v_prob2 1234
WARNING: Bond/react: Atom affected by reaction rxn1 too close to template edge (src/USER-REACTION/fix_bond_react.cpp:2051)
WARNING: Bond/react: Atom affected by reaction rxn2 too close to template edge (src/USER-REACTION/fix_bond_react.cpp:2051)
dynamic group bond_react_MASTER_group defined
dynamic group statted_grp_REACT defined
fix 1 statted_grp_REACT nvt temp 300 300 100
# optionally, you can customize behavior of reacting atoms,
# by using the internally-created 'bond_react_MASTER_group', like so:
fix 4 bond_react_MASTER_group temp/rescale 1 300 300 10 1
thermo_style custom step temp press density v_prob1 v_prob2 f_myrxns[1] f_myrxns[2]
# restart 100 restart1 restart2
run ${runsteps}
run 1000
PPPM initialization ...
using 12-bit tables for long-range coulomb (src/kspace.cpp:332)
G vector (1/distance) = 0.0534597
grid = 2 2 2
stencil order = 5
estimated absolute RMS force accuracy = 0.0402256
estimated relative force accuracy = 0.000121138
using double precision FFTW3
3d grid and FFT values/proc = 343 8
Neighbor list info ...
update every 1 steps, delay 10 steps, check yes
max neighbors/atom: 2000, page size: 100000
master list distance cutoff = 10.5
ghost atom cutoff = 10.5
binsize = 5.25, bins = 10 10 10
2 neighbor lists, perpetual/occasional/extra = 1 1 0
(1) pair lj/class2/coul/long, perpetual
attributes: half, newton on
pair build: half/bin/newton
stencil: half/bin/3d/newton
bin: standard
(2) fix bond/react, occasional, copy from (1)
attributes: half, newton on
pair build: copy
stencil: none
bin: none
WARNING: Inconsistent image flags (src/domain.cpp:812)
Per MPI rank memory allocation (min/avg/max) = 33.78 | 33.78 | 33.78 Mbytes
Step Temp Press Density v_prob1 v_prob2 f_myrxns[1] f_myrxns[2]
0 300 346.78165 0.0034851739 0 0 0 0
50 262.63913 -492.10749 0.0034851739 0.1 0 1 0
100 766.52962 -29.714349 0.0034851739 0.2 0 1 0
150 503.86837 50.220304 0.0034851739 0.3 0 1 0
200 456.51295 12.312892 0.0034851739 0.4 0 1 0
250 391.54928 9.2335844 0.0034851739 0.5 0 1 0
300 336.6988 -47.193937 0.0034851739 0.6 0 1 0
350 254.06985 -9.2867898 0.0034851739 0.7 0 1 0
400 259.41098 -25.657321 0.0034851739 0.8 0 1 0
450 258.10364 22.5086 0.0034851739 0.9 0 1 0
500 272.13412 -6.5391448 0.0034851739 1 0 1 0
550 202.75504 54.658731 0.0034851739 1.1 1 1 1
600 344.79887 23.798478 0.0034851739 1.2 1 1 1
650 328.44488 -29.908484 0.0034851739 1.3 1 1 1
700 280.13593 -8.3223255 0.0034851739 1.4 1 1 1
750 300.67624 1.0632669 0.0034851739 1.5 1 1 1
800 376.64234 12.488392 0.0034851739 1.6 1 1 1
850 321.07642 19.814074 0.0034851739 1.7 1 1 1
900 332.23751 30.814079 0.0034851739 1.8 1 1 1
950 311.14029 5.7853136 0.0034851739 1.9 1 1 1
1000 253.14634 -37.560642 0.0034851739 2 1 1 1
Loop time of 0.379454 on 1 procs for 1000 steps with 44 atoms
Performance: 227.696 ns/day, 0.105 hours/ns, 2635.368 timesteps/s
99.6% CPU use with 1 MPI tasks x 1 OpenMP threads
MPI task timing breakdown:
Section | min time | avg time | max time |%varavg| %total
---------------------------------------------------------------
Pair | 0.069723 | 0.069723 | 0.069723 | 0.0 | 18.37
Bond | 0.14802 | 0.14802 | 0.14802 | 0.0 | 39.01
Kspace | 0.044252 | 0.044252 | 0.044252 | 0.0 | 11.66
Neigh | 0.072359 | 0.072359 | 0.072359 | 0.0 | 19.07
Comm | 0.0044748 | 0.0044748 | 0.0044748 | 0.0 | 1.18
Output | 0.0022775 | 0.0022775 | 0.0022775 | 0.0 | 0.60
Modify | 0.036509 | 0.036509 | 0.036509 | 0.0 | 9.62
Other | | 0.00184 | | | 0.48
Nlocal: 44 ave 44 max 44 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Nghost: 3 ave 3 max 3 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Neighs: 722 ave 722 max 722 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Total # of neighbors = 722
Ave neighs/atom = 16.4091
Ave special neighs/atom = 9.77273
Neighbor list builds = 1000
Dangerous builds = 0
# write_restart restart_longrun
# write_data restart_longrun.data
Please see the log.cite file for references relevant to this simulation
Total wall time: 0:00:00

View File

@ -0,0 +1,201 @@
LAMMPS (15 Apr 2020)
OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:94)
using 1 OpenMP thread(s) per MPI task
# two monomer nylon example
# reaction produces a condensed water molecule
units real
boundary p p p
atom_style full
kspace_style pppm 1.0e-4
pair_style lj/class2/coul/long 8.5
angle_style class2
bond_style class2
dihedral_style class2
improper_style class2
read_data tiny_nylon.data
orthogonal box = (-25 -25 -25) to (25 25 25)
1 by 2 by 2 MPI processor grid
reading atoms ...
44 atoms
reading velocities ...
44 velocities
scanning bonds ...
9 = max bonds/atom
scanning angles ...
21 = max angles/atom
scanning dihedrals ...
29 = max dihedrals/atom
scanning impropers ...
29 = max impropers/atom
reading bonds ...
42 bonds
reading angles ...
74 angles
reading dihedrals ...
100 dihedrals
reading impropers ...
44 impropers
4 = max # of 1-2 neighbors
6 = max # of 1-3 neighbors
12 = max # of 1-4 neighbors
41 = max # of special neighbors
special bonds CPU = 0.000431282 secs
read_data CPU = 0.0129571 secs
variable runsteps equal 1000
variable prob1 equal step/v_runsteps*2
variable prob2 equal (step/v_runsteps)>0.5
velocity all create 300.0 4928459 dist gaussian
molecule mol1 rxn1_stp1_unreacted.data_template
Read molecule template mol1:
1 molecules
18 atoms with max type 8
16 bonds with max type 14
25 angles with max type 28
23 dihedrals with max type 36
14 impropers with max type 11
molecule mol2 rxn1_stp1_reacted.data_template
Read molecule template mol2:
1 molecules
18 atoms with max type 9
17 bonds with max type 13
31 angles with max type 27
39 dihedrals with max type 33
20 impropers with max type 1
molecule mol3 rxn1_stp2_unreacted.data_template
Read molecule template mol3:
1 molecules
15 atoms with max type 9
14 bonds with max type 13
25 angles with max type 27
30 dihedrals with max type 33
16 impropers with max type 1
molecule mol4 rxn1_stp2_reacted.data_template
Read molecule template mol4:
1 molecules
15 atoms with max type 11
13 bonds with max type 15
19 angles with max type 29
16 dihedrals with max type 32
10 impropers with max type 13
thermo 50
# dump 1 all xyz 1 test_vis.xyz
fix myrxns all bond/react stabilization yes statted_grp .03 react rxn1 all 1 0.0 5.0 mol1 mol2 rxn1_stp1_map prob v_prob1 1234 react rxn2 all 1 0.0 5.0 mol3 mol4 rxn1_stp2_map prob v_prob2 1234
WARNING: Bond/react: Atom affected by reaction rxn1 too close to template edge (src/USER-REACTION/fix_bond_react.cpp:2051)
WARNING: Bond/react: Atom affected by reaction rxn2 too close to template edge (src/USER-REACTION/fix_bond_react.cpp:2051)
dynamic group bond_react_MASTER_group defined
dynamic group statted_grp_REACT defined
fix 1 statted_grp_REACT nvt temp 300 300 100
# optionally, you can customize behavior of reacting atoms,
# by using the internally-created 'bond_react_MASTER_group', like so:
fix 4 bond_react_MASTER_group temp/rescale 1 300 300 10 1
thermo_style custom step temp press density v_prob1 v_prob2 f_myrxns[1] f_myrxns[2]
# restart 100 restart1 restart2
run ${runsteps}
run 1000
PPPM initialization ...
using 12-bit tables for long-range coulomb (src/kspace.cpp:332)
G vector (1/distance) = 0.0534597
grid = 2 2 2
stencil order = 5
estimated absolute RMS force accuracy = 0.0402256
estimated relative force accuracy = 0.000121138
using double precision FFTW3
3d grid and FFT values/proc = 252 2
Neighbor list info ...
update every 1 steps, delay 10 steps, check yes
max neighbors/atom: 2000, page size: 100000
master list distance cutoff = 10.5
ghost atom cutoff = 10.5
binsize = 5.25, bins = 10 10 10
2 neighbor lists, perpetual/occasional/extra = 1 1 0
(1) pair lj/class2/coul/long, perpetual
attributes: half, newton on
pair build: half/bin/newton
stencil: half/bin/3d/newton
bin: standard
(2) fix bond/react, occasional, copy from (1)
attributes: half, newton on
pair build: copy
stencil: none
bin: none
WARNING: Inconsistent image flags (src/domain.cpp:812)
Per MPI rank memory allocation (min/avg/max) = 33.66 | 33.88 | 34.43 Mbytes
Step Temp Press Density v_prob1 v_prob2 f_myrxns[1] f_myrxns[2]
0 300 346.78165 0.0034851739 0 0 0 0
50 266.5092 -90.813802 0.0034851739 0.1 0 1 0
100 559.41271 -53.23688 0.0034851739 0.2 0 1 0
150 489.90516 31.555817 0.0034851739 0.3 0 1 0
200 326.18391 7.7889992 0.0034851739 0.4 0 1 0
250 339.78203 2.3919541 0.0034851739 0.5 0 1 0
300 370.90263 -32.01673 0.0034851739 0.6 0 1 0
350 294.07547 -5.4019813 0.0034851739 0.7 0 1 0
400 287.76477 12.254133 0.0034851739 0.8 0 1 0
450 293.36482 66.372956 0.0034851739 0.9 0 1 0
500 246.84496 26.132317 0.0034851739 1 0 1 0
550 253.08778 -15.350262 0.0034851739 1.1 1 1 1
600 358.83641 25.007371 0.0034851739 1.2 1 1 1
650 320.51492 -32.34823 0.0034851739 1.3 1 1 1
700 310.87976 -8.2306669 0.0034851739 1.4 1 1 1
750 307.54142 12.025818 0.0034851739 1.5 1 1 1
800 272.51724 -22.92823 0.0034851739 1.6 1 1 1
850 268.66181 10.069534 0.0034851739 1.7 1 1 1
900 265.5531 -10.471377 0.0034851739 1.8 1 1 1
950 259.43086 9.4546712 0.0034851739 1.9 1 1 1
1000 247.14622 20.250308 0.0034851739 2 1 1 1
Loop time of 0.357762 on 4 procs for 1000 steps with 44 atoms
Performance: 241.502 ns/day, 0.099 hours/ns, 2795.157 timesteps/s
99.0% CPU use with 4 MPI tasks x 1 OpenMP threads
MPI task timing breakdown:
Section | min time | avg time | max time |%varavg| %total
---------------------------------------------------------------
Pair | 0.0003917 | 0.015545 | 0.033317 | 11.9 | 4.35
Bond | 0.0010131 | 0.030153 | 0.076975 | 18.2 | 8.43
Kspace | 0.092857 | 0.1462 | 0.18688 | 10.7 | 40.87
Neigh | 0.043786 | 0.044014 | 0.044189 | 0.1 | 12.30
Comm | 0.03636 | 0.038345 | 0.040538 | 0.8 | 10.72
Output | 0.00091578 | 0.0012541 | 0.0020923 | 1.4 | 0.35
Modify | 0.075379 | 0.080791 | 0.086052 | 1.8 | 22.58
Other | | 0.00146 | | | 0.41
Nlocal: 11 ave 32 max 0 min
Histogram: 2 0 1 0 0 0 0 0 0 1
Nghost: 40 ave 51 max 19 min
Histogram: 1 0 0 0 0 0 0 1 0 2
Neighs: 191 ave 529 max 0 min
Histogram: 2 0 0 0 1 0 0 0 0 1
Total # of neighbors = 764
Ave neighs/atom = 17.3636
Ave special neighs/atom = 9.77273
Neighbor list builds = 1000
Dangerous builds = 0
# write_restart restart_longrun
# write_data restart_longrun.data
Please see the log.cite file for references relevant to this simulation
Total wall time: 0:00:00

View File

@ -1,5 +1,6 @@
This directory has 5 scripts that compute the viscosity (eta) of a
Lennard-Jones fluid using 5 different methods. See the discussion in
This directory has 6 scripts that compute the viscosity (eta) of fluid
using 6 different methods. 5 of them are for a Lennard-Jones fluid
and the last one is for SPC/E water model. See the discussion in
Section 6.21 of the manual for an overview of the methods and pointers
to doc pages for the commands which implement them. Citations for the
various methods can also be found in the manual.
@ -10,7 +11,7 @@ enough to generate good statistics and highly accurate results.
-------------
These are the 5 methods for computing viscosity. The first 3 are
These are the 5 methods for computing viscosity of a LJ fluid. The first 3 are
non-equilibrium methods; the last 2 are equilibrium methods.
in.wall = move a wall to shear the fluid between two walls
@ -89,3 +90,18 @@ heat/flux doc page - the resulting value prints at the end of the run
and is in the log file
eta = 1.07
-------------
in.cos.1000SPCE is an example script of using cosine periodic perturbation method
to calculate the viscosity of SPC/E water model.
The reciprocal of eta is computed within the script, and printed out as v_invVis
in thermo_style command. The result will converge after hundreds of picoseconds.
Then eta is obtained from the reciprocal of time average of v_invVis.
eta = 0.75 mPa*s
Note that the calculated viscosity by this method decreases with increased acceleration.
It is therefore generally necessary to perform calculation at different accelerations
and extrapolate the viscosity to zero shear.

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,53 @@
# DFF generated Lammps input file
units real
atom_style full
boundary p p p
pair_style lj/cut/coul/long 10.0
pair_modify mix arithmetic
pair_modify tail yes
kspace_style pppm 1.0e-4
dielectric 1.0
special_bonds amber
bond_style harmonic
angle_style harmonic
dihedral_style none
improper_style none
read_data data.cos.1000SPCE
variable T equal 300
variable P equal 1.0
velocity all create ${T} 12345 mom yes rot yes dist gaussian
timestep 1.0
# Constraint ##################################
fix com all momentum 100 linear 1 1 1
fix rigid all shake 1e-4 20 0 b 1 a 1
# Viscosity ##################################
variable A equal 0.05e-5 # angstrom/fs^2
fix cos all accelerate/cos ${A}
compute cos all viscosity/cos
variable density equal density
variable lz equal lz
variable vMax equal c_cos[7] # velocity of atoms at z=0
variable invVis equal v_vMax/${A}/v_density*39.4784/v_lz/v_lz*100 # reciprocal of viscosity 1/Pa/s
fix npt all npt temp ${T} ${T} 100 iso ${P} ${P} 1000
fix_modify npt temp cos
thermo_style custom step cpu temp press pe density v_vMax v_invVis
thermo_modify temp cos
thermo 100
################################################
dump 1 all custom 10000 dump.lammpstrj id mol type element q xu yu zu
dump_modify 1 sort id element O H
run 2000

View File

@ -0,0 +1,160 @@
LAMMPS (3 Mar 2020)
OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:94)
using 1 OpenMP thread(s) per MPI task
# DFF generated Lammps input file
units real
atom_style full
boundary p p p
pair_style lj/cut/coul/long 10.0
pair_modify mix arithmetic
pair_modify tail yes
kspace_style pppm 1.0e-4
dielectric 1.0
special_bonds amber
bond_style harmonic
angle_style harmonic
dihedral_style none
improper_style none
read_data data.1000SPCE.lmp
orthogonal box = (0 0 0) to (31.043 31.043 31.043)
2 by 2 by 2 MPI processor grid
reading atoms ...
3000 atoms
scanning bonds ...
2 = max bonds/atom
scanning angles ...
1 = max angles/atom
reading bonds ...
2000 bonds
reading angles ...
1000 angles
2 = max # of 1-2 neighbors
1 = max # of 1-3 neighbors
1 = max # of 1-4 neighbors
2 = max # of special neighbors
special bonds CPU = 0.00114917 secs
read_data CPU = 0.00953543 secs
variable T equal 300
variable P equal 1.0
velocity all create ${T} 12345 mom yes rot yes dist gaussian
velocity all create 300 12345 mom yes rot yes dist gaussian
timestep 1.0
# Constraint ##################################
fix com all momentum 100 linear 1 1 1
fix rigid all shake 1e-4 20 0 b 1 a 1
0 = # of size 2 clusters
0 = # of size 3 clusters
0 = # of size 4 clusters
1000 = # of frozen angles
find clusters CPU = 0.000442737 secs
# Viscosity ##################################
variable A equal 0.02e-5 # angstrom/fs^2
fix cos all accelerate/cos ${A}
fix cos all accelerate/cos 2e-07
compute cos all viscosity/cos
variable density equal density
variable lz equal lz
variable vMax equal c_cos[7] # velocity of atoms at z=0
variable invVis equal v_vMax/${A}/v_density*39.4784/v_lz/v_lz*100 # reciprocal of viscosity 1/Pa/s
variable invVis equal v_vMax/2e-07/v_density*39.4784/v_lz/v_lz*100
fix npt all npt temp ${T} ${T} 100 iso ${P} ${P} 1000
fix npt all npt temp 300 ${T} 100 iso ${P} ${P} 1000
fix npt all npt temp 300 300 100 iso ${P} ${P} 1000
fix npt all npt temp 300 300 100 iso 1 ${P} 1000
fix npt all npt temp 300 300 100 iso 1 1 1000
fix_modify npt temp cos
thermo_style custom step cpu temp press pe density v_vMax v_invVis
thermo_modify temp cos
thermo 100
################################################
dump 1 all custom 10000 dump.lammpstrj id mol type element q xu yu zu
dump_modify 1 sort id element O H
run 2000
PPPM initialization ...
using 12-bit tables for long-range coulomb (src/kspace.cpp:332)
G vector (1/distance) = 0.263539
grid = 16 16 16
stencil order = 5
estimated absolute RMS force accuracy = 0.0325342
estimated relative force accuracy = 9.79757e-05
using double precision MKL FFT
3d grid and FFT values/proc = 3375 512
Neighbor list info ...
update every 1 steps, delay 10 steps, check yes
max neighbors/atom: 2000, page size: 100000
master list distance cutoff = 12
ghost atom cutoff = 12
binsize = 6, bins = 6 6 6
1 neighbor lists, perpetual/occasional/extra = 1 0 0
(1) pair lj/cut/coul/long, perpetual
attributes: half, newton on
pair build: half/bin/newton
stencil: half/bin/3d/newton
bin: standard
Per MPI rank memory allocation (min/avg/max) = 10.14 | 10.14 | 10.14 Mbytes
Step CPU Temp Press PotEng Density v_vMax v_invVis
0 0 450.04468 9838.6886 -7651.736 0.99999331 0.0001293705 2649.9663
100 0.33736925 497.65155 2024.4827 -8342.2499 0.98595028 0.00019602427 4034.2452
200 0.67116638 446.48518 27.075082 -8908.9684 0.9652009 0.00027615455 5723.7907
300 0.99760895 401.79875 -776.99871 -9381.8986 0.95205822 0.00019626685 4086.6103
400 1.3239019 369.65373 -510.5336 -9803.6463 0.94817309 0.00022998514 4795.2142
500 1.6488092 343.35807 -936.31982 -10146.023 0.94840581 0.0001434423 2990.5423
600 1.9826063 319.86131 -1381.3302 -10405.812 0.95459202 6.6411532e-05 1381.5767
700 2.3172637 307.74606 -98.775733 -10643.5 0.96669652 0.00010446317 2164.0664
800 2.6562841 305.14214 -540.57804 -10865.742 0.97808367 5.4381233e-05 1122.1765
900 2.9938415 288.01316 639.00486 -10925.39 0.98686357 0.00010878474 2238.1355
1000 3.327893 295.07773 -226.06503 -11033.826 0.99128496 0.00011935058 2451.8608
1100 3.6618862 299.21578 306.34231 -11049.152 0.99552203 8.9538943e-05 1836.8166
1200 3.9984287 301.82462 85.804646 -11013.564 0.99713434 0.00015912276 3262.51
1300 4.3320735 308.6009 268.08897 -11009.836 0.99695358 0.00026212596 5374.72
1400 4.668875 298.36903 -258.75495 -10962.299 0.99503447 0.00033087355 6788.7027
1500 5.0003694 299.96073 99.512082 -10980.551 0.99315631 0.00033996557 6979.6425
1600 5.3367337 304.18018 -500.65441 -11002.054 0.9914558 0.00039075642 8026.9849
1700 5.6780828 301.63978 -499.07458 -10992.88 0.99234354 0.00038101175 7824.4738
1800 6.0140638 303.25858 640.03432 -11053.335 0.99553958 0.00041336203 8479.7267
1900 6.3532521 301.40882 208.28331 -11119.481 0.99534534 0.00032474734 6662.3144
2000 6.6938104 298.0462 -236.47954 -11162.212 0.99421846 0.00023869721 4898.8129
Loop time of 6.69387 on 8 procs for 2000 steps with 3000 atoms
Performance: 25.815 ns/day, 0.930 hours/ns, 298.781 timesteps/s
99.7% CPU use with 8 MPI tasks x 1 OpenMP threads
MPI task timing breakdown:
Section | min time | avg time | max time |%varavg| %total
---------------------------------------------------------------
Pair | 4.36 | 4.4981 | 4.6781 | 5.1 | 67.20
Bond | 0.00074545 | 0.00088463 | 0.0012464 | 0.0 | 0.01
Kspace | 0.86696 | 1.0476 | 1.1863 | 10.5 | 15.65
Neigh | 0.37733 | 0.37785 | 0.3784 | 0.1 | 5.64
Comm | 0.19874 | 0.20168 | 0.20729 | 0.6 | 3.01
Output | 0.0015529 | 0.0015803 | 0.0017546 | 0.2 | 0.02
Modify | 0.54083 | 0.55143 | 0.55445 | 0.6 | 8.24
Other | | 0.01483 | | | 0.22
Nlocal: 375 ave 385 max 361 min
Histogram: 1 1 0 0 1 0 2 0 1 2
Nghost: 5772.25 ave 5789 max 5757 min
Histogram: 1 1 2 0 0 0 2 0 0 2
Neighs: 135285 ave 144189 max 127550 min
Histogram: 1 2 1 1 0 0 0 0 1 2
Total # of neighbors = 1082280
Ave neighs/atom = 360.76
Ave special neighs/atom = 2
Neighbor list builds = 101
Dangerous builds = 1
Total wall time: 0:00:06

View File

@ -1,5 +1,11 @@
#ifndef _WIN32
#if !defined(_WIN32)
#if defined(__FreeBSD__) || defined(__DragonFly__) || defined(__OpenBSD__) || defined(__NetBSD__)
#include <cstdlib>
#else
#include <alloca.h>
#endif
#endif
#include "Function.h"
#include "ATC_Error.h"

View File

@ -11,7 +11,7 @@
//
// begin :
// email : brownw@ornl.gov
// ***************************************************************************/
// ***************************************************************************
#if defined(NV_KERNEL) || defined(USE_HIP)
#include "lal_preprocessor.h"

View File

@ -11,7 +11,7 @@
//
// begin :
// email : nguyentd@ornl.gov
// ***************************************************************************/
// ***************************************************************************
#if defined(NV_KERNEL) || defined(USE_HIP)
#include "lal_aux_fun1.h"

View File

@ -11,7 +11,7 @@
//
// begin :
// email : nguyentd@ornl.gov
// ***************************************************************************/
// ***************************************************************************
#if defined(NV_KERNEL) || defined(USE_HIP)
#include "lal_aux_fun1.h"

View File

@ -11,7 +11,7 @@
//
// begin :
// email : nguyentd@ornl.gov
// ***************************************************************************/
// ***************************************************************************
#if defined(NV_KERNEL) || defined(USE_HIP)

View File

@ -11,7 +11,7 @@
//
// begin : June 2018
// email : ndactrung@gmail.com
// ***************************************************************************/
// ***************************************************************************
#if defined(NV_KERNEL) || defined(USE_HIP)
@ -109,7 +109,7 @@ __kernel void k_born_coul_long_cs(const __global numtyp4 *restrict x_,
numtyp rsq = delx*delx+dely*dely+delz*delz;
int mtype=itype*lj_types+jtype;
if (rsq<cutsq_sigma[mtype].x) { // cutsq
if (rsq<cutsq_sigma[mtype].x) { // cutsq
numtyp forcecoul,forceborn,force,r6inv,prefactor,_erfc,rexp;
rsq += EPSILON; // Add Epsilon for case: r = 0; Interaction must be removed by special bond;
@ -250,7 +250,7 @@ __kernel void k_born_coul_long_cs_fast(const __global numtyp4 *restrict x_,
numtyp delz = ix.z-jx.z;
numtyp rsq = delx*delx+dely*dely+delz*delz;
if (rsq<cutsq_sigma[mtype].x) { // cutsq
if (rsq<cutsq_sigma[mtype].x) { // cutsq
numtyp forcecoul,forceborn,force,r6inv,prefactor,_erfc,rexp;
rsq += EPSILON; // Add Epsilon for case: r = 0; Interaction must be removed by special bond;

View File

@ -11,7 +11,7 @@
//
// begin :
// email : nguyentd@ornl.gov
// ***************************************************************************/
// ***************************************************************************
#if defined(NV_KERNEL) || defined(USE_HIP)

View File

@ -11,7 +11,7 @@
//
// begin :
// email : ndactrung@gmail.com
// ***************************************************************************/
// ***************************************************************************
#if defined(NV_KERNEL) || defined(USE_HIP)

View File

@ -11,7 +11,7 @@
//
// begin :
// email : nguyentd@ornl.gov
// ***************************************************************************/
// ***************************************************************************
#if defined(NV_KERNEL) || defined(USE_HIP)
#include "lal_aux_fun1.h"

View File

@ -11,7 +11,7 @@
//
// begin :
// email : nguyentd@ornl.gov
// ***************************************************************************/
// ***************************************************************************
#if defined(NV_KERNEL) || defined(USE_HIP)

View File

@ -11,7 +11,7 @@
//
// begin :
// email : nguyentd@ornl.gov
// ***************************************************************************/
// ***************************************************************************
#if defined(NV_KERNEL) || defined(USE_HIP)

View File

@ -11,7 +11,7 @@
//
// begin :
// email : brownw@ornl.gov
// ***************************************************************************/
// ***************************************************************************
#if defined(NV_KERNEL) || defined(USE_HIP)

View File

@ -11,7 +11,7 @@
//
// begin :
// email : nguyentd@ornl.gov
// ***************************************************************************/
// ***************************************************************************
#if defined(NV_KERNEL) || defined(USE_HIP)
#include "lal_aux_fun1.h"

View File

@ -11,7 +11,7 @@
//
// begin :
// email : ndtrung@umich.edu
// ***************************************************************************/
// ***************************************************************************
#if defined(NV_KERNEL) || defined(USE_HIP)

View File

@ -11,7 +11,7 @@
//
// begin :
// email : ndtrung@umich.edu
// ***************************************************************************/
// ***************************************************************************
#if defined(NV_KERNEL) || defined(USE_HIP)

View File

@ -11,7 +11,7 @@
//
// begin : 8/15/2012
// email : nguyentd@ornl.gov
// ***************************************************************************/
// ***************************************************************************
#if defined(NV_KERNEL) || defined(USE_HIP)

View File

@ -11,7 +11,7 @@
//
// begin : July 2011
// email : a.kohlmeyer@temple.edu
// ***************************************************************************/
// ***************************************************************************
#if defined(NV_KERNEL) || defined(USE_HIP)

View File

@ -11,7 +11,7 @@
//
// begin : June 2018
// email : ndactrung@gmail.com
// ***************************************************************************/
// ***************************************************************************
#if defined(NV_KERNEL) || defined(USE_HIP)

View File

@ -11,7 +11,7 @@
//
// begin :
// email : nguyentd@ornl.gov
// ***************************************************************************/
// ***************************************************************************
#if defined(NV_KERNEL) || defined(USE_HIP)
#include "lal_aux_fun1.h"

View File

@ -11,7 +11,7 @@
//
// begin :
// email : nguyentd@ornl.gov
// ***************************************************************************/
// ***************************************************************************
#if defined(NV_KERNEL) || defined(USE_HIP)
#include "lal_aux_fun1.h"

View File

@ -11,7 +11,7 @@
//
// begin :
// email : nguyentd@ornl.gov
// ***************************************************************************/
// ***************************************************************************
#if defined(NV_KERNEL) || defined(USE_HIP)
#include "lal_aux_fun1.h"

View File

@ -11,7 +11,7 @@
//
// begin : Jan 15, 2014
// email : nguyentd@ornl.gov
// ***************************************************************************/
// ***************************************************************************
#if defined(NV_KERNEL) || defined(USE_HIP)
#include "lal_aux_fun1.h"

View File

@ -11,7 +11,7 @@
//
// begin :
// email : brownw@ornl.gov nguyentd@ornl.gov
// ***************************************************************************/
// ***************************************************************************
#if defined(NV_KERNEL) || defined(USE_HIP)
#include "lal_aux_fun1.h"

View File

@ -9,9 +9,8 @@
// This file is part of the LAMMPS Accelerator Library (LAMMPS_AL)
// __________________________________________________________________________
//
// begin :
// email : brownw@ornl.gov
// ***************************************************************************/
// ***************************************************************************
#if defined(NV_KERNEL) || defined(USE_HIP)
#include "lal_preprocessor.h"
@ -53,8 +52,8 @@ __kernel void kernel_nbor(const __global numtyp4 *restrict x_,
int itype=fast_mul(iw,ntypes);
int newj=0;
for ( ; nbor<nbor_end; nbor+=nbor_pitch) {
int j=dev_ij[nbor];
j &= NEIGHMASK;
int sj=dev_ij[nbor];
int j = sj & NEIGHMASK;
numtyp4 jx; fetch4(jx,j,pos_tex); //x_[j];
int jtype=jx.w;
int mtype=itype+jtype;
@ -69,7 +68,7 @@ __kernel void kernel_nbor(const __global numtyp4 *restrict x_,
rsq+=t*t;
if (rsq<cf.x) {
dev_nbor[packed]=j;
dev_nbor[packed]=sj;
packed+=nbor_pitch;
newj++;
}
@ -117,8 +116,8 @@ __kernel void kernel_nbor_fast(const __global numtyp4 *restrict x_,
int newj=0;
for ( ; nbor<nbor_end; nbor+=nbor_pitch) {
int j=dev_ij[nbor];
j &= NEIGHMASK;
int sj=dev_ij[nbor];
int j = sj & NEIGHMASK;
numtyp4 jx; fetch4(jx,j,pos_tex); //x_[j];
int jtype=jx.w;
int mtype=itype+jtype;
@ -133,7 +132,7 @@ __kernel void kernel_nbor_fast(const __global numtyp4 *restrict x_,
rsq+=t*t;
if (rsq<cutsq[mtype]) {
dev_nbor[packed]=j;
dev_nbor[packed]=sj;
packed+=nbor_pitch;
newj++;
}

View File

@ -11,7 +11,7 @@
//
// begin :
// email : nguyentd@ornl.gov
// ***************************************************************************/
// ***************************************************************************
#if defined(NV_KERNEL) || defined(USE_HIP)
#include "lal_aux_fun1.h"

View File

@ -11,7 +11,7 @@
//
// begin :
// email : brownw@ornl.gov
// ***************************************************************************/
// ***************************************************************************
#if defined(NV_KERNEL) || defined(USE_HIP)
#include "lal_ellipsoid_extra.h"

View File

@ -11,7 +11,7 @@
//
// begin :
// email : brownw@ornl.gov
// ***************************************************************************/
// ***************************************************************************
#if defined(NV_KERNEL) || defined(USE_HIP)
#include "lal_ellipsoid_extra.h"

View File

@ -11,7 +11,7 @@
//
// begin :
// email : brownw@ornl.gov
// ***************************************************************************/
// ***************************************************************************
#if defined(NV_KERNEL) || defined(USE_HIP)
#include "lal_aux_fun1.h"

View File

@ -11,7 +11,7 @@
//
// begin :
// email : brownw@ornl.gov
// ***************************************************************************/
// ***************************************************************************
#if defined(NV_KERNEL) || defined(USE_HIP)
#include "lal_aux_fun1.h"

View File

@ -11,7 +11,7 @@
//
// begin : Mon May 16 2011
// email : brownw@ornl.gov
// ***************************************************************************/
// ***************************************************************************
#if defined(NV_KERNEL) || defined(USE_HIP)

View File

@ -11,7 +11,7 @@
//
// begin :
// email : brownw@ornl.gov
// ***************************************************************************/
// ***************************************************************************
#if defined(NV_KERNEL) || defined(USE_HIP)

View File

@ -11,7 +11,7 @@
//
// begin :
// email : nguyentd@ornl.gov
// ***************************************************************************/
// ***************************************************************************
#if defined(NV_KERNEL) || defined(USE_HIP)

View File

@ -11,7 +11,7 @@
//
// begin :
// email : brownw@ornl.gov
// ***************************************************************************/
// ***************************************************************************
#if defined(NV_KERNEL) || defined(USE_HIP)

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