Compare commits
641 Commits
patch_30Ma
...
patch_29Ju
| Author | SHA1 | Date | |
|---|---|---|---|
| a52ddf8759 | |||
| 0f71ed1fec | |||
| 43ffee980d | |||
| 560b34aad0 | |||
| ea35235ca0 | |||
| 474b59a1f3 | |||
| c63d77d0b8 | |||
| bf9646cbbe | |||
| d2dd76e655 | |||
| d649a6fe38 | |||
| a8b7153f4e | |||
| c3fe26a614 | |||
| bbe77e4c31 | |||
| b819018084 | |||
| 6900f9edf9 | |||
| 11a8d4e1c3 | |||
| d9396df5b9 | |||
| 0e047f2786 | |||
| ec99b0957c | |||
| 75a3968039 | |||
| a3a2981cd2 | |||
| 4f9c0456e6 | |||
| ad4720ef00 | |||
| 946bca82c5 | |||
| 85d7f7ddc9 | |||
| ee0e9f94f1 | |||
| 9f1aabea50 | |||
| b3bc5fd823 | |||
| e0dc53ab3f | |||
| 206d349d5b | |||
| 4d629872d8 | |||
| 7a783870e2 | |||
| 0df8587c18 | |||
| ad3d049edd | |||
| 7abc960d39 | |||
| 23fb0370a9 | |||
| a043ddcb82 | |||
| a2b2507121 | |||
| 6bd5a3d69b | |||
| 086e83456b | |||
| 1db4705a3d | |||
| 8e77be0848 | |||
| fc3694189e | |||
| 75aacfd17f | |||
| 08552fefe9 | |||
| 20fe0cd9d0 | |||
| 8f4b7161c5 | |||
| 38cdc1828d | |||
| 9353569d30 | |||
| 868f5711a2 | |||
| 7ffab9a228 | |||
| 58559d9e62 | |||
| 3eed23d3f7 | |||
| d3b83885d1 | |||
| 3549345830 | |||
| 244963aa19 | |||
| 264f832b18 | |||
| 5c4bf8ac47 | |||
| 6008cee6aa | |||
| f33a2c982c | |||
| 8e14143908 | |||
| e6ef8ce5ee | |||
| ebe622ff7d | |||
| f94cdf856c | |||
| e2622f0230 | |||
| e4dd6dec40 | |||
| b0126dd9d6 | |||
| f36e1a2cdc | |||
| c9d147c366 | |||
| 19f81e0802 | |||
| 49a91db0b2 | |||
| bad750eb2b | |||
| 5e48565761 | |||
| af91f7fa5d | |||
| 0cd86bab22 | |||
| bec82e4045 | |||
| 06b3209ad8 | |||
| 2fd45050cd | |||
| 8ffa96c9e9 | |||
| 6a9251245c | |||
| cb2cf5b773 | |||
| c4d0994d5e | |||
| e2c03f0596 | |||
| 9108306c11 | |||
| 86519ce213 | |||
| 0b1d4a1696 | |||
| 264e4fd3b1 | |||
| d237625d2a | |||
| ce0f3daad6 | |||
| cb7b23e220 | |||
| 3f17d33fbe | |||
| 510834cb7b | |||
| 2165a2aa9b | |||
| ac41cc2c9a | |||
| f5f73b0172 | |||
| 35f5a685f6 | |||
| 62984c1de0 | |||
| 04d040b863 | |||
| 92f0f19df6 | |||
| dcdc7877a4 | |||
| 2f11f2d7b2 | |||
| e25b6c81ee | |||
| 80cca7c4c1 | |||
| 2fe0eabc09 | |||
| 7da8e69b45 | |||
| e8e1349da4 | |||
| dc132c8bf1 | |||
| f0a2c57401 | |||
| 4ca3d30db7 | |||
| cbfb751e92 | |||
| 65c895721f | |||
| bfacfc46be | |||
| 919d95d375 | |||
| 258185690d | |||
| cea0227f14 | |||
| 3e58ebea4f | |||
| 7a22612bea | |||
| 9805b5d34a | |||
| 9f3cb83fb3 | |||
| 9f3fae1c47 | |||
| 0e603493af | |||
| 7f0c88c74b | |||
| 1f770a6a8f | |||
| 596acaf4d2 | |||
| 472a1a501d | |||
| eb485afc45 | |||
| 4265e68ff8 | |||
| 90f0586c9e | |||
| c371ce1005 | |||
| e3a528a493 | |||
| 28504e91c0 | |||
| 47482afbc1 | |||
| 7d3a549de9 | |||
| a9b794b2ab | |||
| 3ae8fdccd8 | |||
| 70a7b37614 | |||
| 036647c102 | |||
| 37b901eadb | |||
| 4a88f53d22 | |||
| d4861e71d2 | |||
| 5a3ef99272 | |||
| 605b4dca22 | |||
| dade67664d | |||
| 93d6510d34 | |||
| 4f8d1893e9 | |||
| 7c7a80b31a | |||
| da5931d65d | |||
| 83ae0ad26f | |||
| b189a328ed | |||
| 469b67a39b | |||
| 1d0773d10d | |||
| 03a7d1cd5d | |||
| 08331da93d | |||
| ab0f3debeb | |||
| fe14bfd1d2 | |||
| d55c7039ee | |||
| 87dcef7115 | |||
| 7e234497ff | |||
| 277b43b2fd | |||
| 6f61ed2af5 | |||
| 16cc613993 | |||
| 6842a527e0 | |||
| d094bf789c | |||
| 3750e0a427 | |||
| 40c4461a78 | |||
| d830fc2301 | |||
| 265b6c261e | |||
| 3411b0e576 | |||
| 47458f1ca0 | |||
| c4bcb7e73d | |||
| 18b543179c | |||
| 14c4438a72 | |||
| acd20512f0 | |||
| 5fcdfe6dcb | |||
| 7c9afc1be2 | |||
| b2e6863d93 | |||
| cb887d48a1 | |||
| 9ef1bfe814 | |||
| 76b85e4d25 | |||
| 8a2faff541 | |||
| fe483a769f | |||
| f312fbfe32 | |||
| f68c6dddb8 | |||
| c5b51df06e | |||
| 479cc9424d | |||
| 673202d05f | |||
| 3e79296dcf | |||
| fcf9ed0fc2 | |||
| 661848139c | |||
| 12d8370ec5 | |||
| 3c781afa6c | |||
| 37268e435b | |||
| 29e555213c | |||
| 965ac3cedd | |||
| 30e3e9ab88 | |||
| 6cb0c2e9c5 | |||
| ebd93cac69 | |||
| a2dd21dca5 | |||
| e78ed7d044 | |||
| 142de878f9 | |||
| 4c28827aa1 | |||
| 5a383aa518 | |||
| a4a3133b76 | |||
| 9dda907f7d | |||
| fa5ecf88a5 | |||
| 7ca794beb9 | |||
| c386bdddf9 | |||
| 56c3a0be29 | |||
| cf3095e938 | |||
| 6056c1db4d | |||
| 38182dcc60 | |||
| ef3c0dbf7b | |||
| 4c18a07193 | |||
| e3e040227b | |||
| f2a6aa249f | |||
| 6457e5eedb | |||
| c27e617fd8 | |||
| b9a8f91753 | |||
| 95e259fe71 | |||
| 69a9f1bf94 | |||
| e7773808a5 | |||
| 0368202d12 | |||
| 3ba87e52e9 | |||
| 1422b0413b | |||
| 18c6d7f289 | |||
| 1b4068b575 | |||
| 5f0e6d0aa7 | |||
| 99f4274483 | |||
| 341fa160fe | |||
| 102be8dd8b | |||
| 6c42c9b378 | |||
| ce4a446cea | |||
| 933cf92e36 | |||
| 69903cb4aa | |||
| 6de4569483 | |||
| ad5cfb5ae6 | |||
| fbc435a0cb | |||
| 108c31e24a | |||
| e550f5120b | |||
| 2f9e6d4566 | |||
| 1641f78e3e | |||
| 4ec31564fe | |||
| f5b7419108 | |||
| 1f193e02e0 | |||
| 838a1938bb | |||
| df3eb36519 | |||
| bb6dcb8ebd | |||
| e6f76451eb | |||
| cfb350d40b | |||
| 5daf1fe0d4 | |||
| 2e7b919774 | |||
| 858c211fdc | |||
| 6997aedf30 | |||
| cab602045e | |||
| 124641dc8a | |||
| 6944973484 | |||
| 9e82c86fbd | |||
| 68dd7d4f2b | |||
| b2da3ca3e9 | |||
| e1361a9dca | |||
| 94c6d2d546 | |||
| 585a164e78 | |||
| 5a4a7cebc1 | |||
| 133f0922b3 | |||
| 1a88ffd5ab | |||
| 307e471456 | |||
| f5d66e74c5 | |||
| bebf25dcb3 | |||
| 3f316f71ef | |||
| 8303d1a375 | |||
| 363d8ef775 | |||
| a449488b1d | |||
| e076d08ee9 | |||
| 1a5144bf37 | |||
| ca6920be72 | |||
| 55d8cc0341 | |||
| 6b73e29f64 | |||
| 09046ad3f7 | |||
| 06c18dd36c | |||
| 55bd823339 | |||
| 77e04a9213 | |||
| 233f03ea8e | |||
| f65b06de0e | |||
| 0f32d603b5 | |||
| 3440b1a2a7 | |||
| 8952b1107c | |||
| b3b3c225e8 | |||
| 4d34e55072 | |||
| 437e854741 | |||
| 4820cef5d4 | |||
| e7598eeec0 | |||
| a5d29fa52e | |||
| 821ef0cf77 | |||
| 42f22a9723 | |||
| 0d8110bc19 | |||
| 44c5e88e24 | |||
| 8d24101df4 | |||
| 308dac6821 | |||
| 944dab1351 | |||
| c3cc07bd3d | |||
| c50258e89c | |||
| 9674512997 | |||
| f864584bce | |||
| 075598b405 | |||
| 7780d92823 | |||
| 66caf1c1a3 | |||
| 95eb86d6c7 | |||
| 724ade0af3 | |||
| d43c556263 | |||
| 40a8b1af79 | |||
| 33a41a4fb3 | |||
| d7992f324d | |||
| 79d1d3458e | |||
| a25895d31d | |||
| 4f762deff8 | |||
| 843f89fc92 | |||
| 6336c3b975 | |||
| a43e74180a | |||
| 6626cd5aaa | |||
| aa1d815fe5 | |||
| 863a85353a | |||
| 662535865f | |||
| 6226ec8831 | |||
| 6c91cc1f76 | |||
| 4e42ee2cfc | |||
| 1224296365 | |||
| 25cef528c9 | |||
| 6359392834 | |||
| 71e1867dd2 | |||
| f90af1839e | |||
| 2ebd4eb26e | |||
| 3682bc47c2 | |||
| 2797afbf3e | |||
| 635383c00c | |||
| b6a8168e3f | |||
| 71fce2e413 | |||
| 994fd2af0e | |||
| d8138a5b4c | |||
| a001f2c248 | |||
| 8104568b6a | |||
| 96d1c421df | |||
| dde271db36 | |||
| a7a83b118d | |||
| 8697cac6aa | |||
| 96c5c92b1a | |||
| 793260f227 | |||
| e5a589e05a | |||
| dc8e141501 | |||
| 9f03a6798f | |||
| b4e5828a60 | |||
| 671876efef | |||
| 8705ea9fc5 | |||
| 16697fc4cb | |||
| 53fc9f1f0f | |||
| 6960529594 | |||
| fccc16f42c | |||
| e7e1827e57 | |||
| c9817b0db9 | |||
| 318dfd0613 | |||
| f4d14c96e8 | |||
| 3394d18a2a | |||
| ff6507e7b7 | |||
| fff962646f | |||
| f39a8d46d1 | |||
| 00b92cd93b | |||
| 808eb2a25e | |||
| 1888b616c4 | |||
| 761b15b8f4 | |||
| cde6e9b7c4 | |||
| 104dde27ed | |||
| bfdfd36c1c | |||
| a4759210a8 | |||
| 7fed6c7e4c | |||
| 82217001c8 | |||
| b2370b6986 | |||
| 624173d25a | |||
| 7cf42e42eb | |||
| d80b375e26 | |||
| d203118286 | |||
| 74fbb84b8c | |||
| 5076b6d161 | |||
| fcdcdb3286 | |||
| 722549965e | |||
| ca96a7ab05 | |||
| 8ec033e823 | |||
| a7c9418629 | |||
| bc0c405bfa | |||
| 1ea5b9eabb | |||
| d9d33ac766 | |||
| d51745fd27 | |||
| c3588f08b7 | |||
| ecfe5c8373 | |||
| 009666d9a5 | |||
| 551ea9694d | |||
| d7339bbd9e | |||
| 934f825388 | |||
| f4fbdea0b3 | |||
| 14588f6242 | |||
| 5e49976b70 | |||
| 9d9d7cb9ed | |||
| 941d289a69 | |||
| e1f9ee1347 | |||
| 916ed71760 | |||
| 9d6891823a | |||
| e14b61e4a4 | |||
| 2d321a602c | |||
| 9acd35abe2 | |||
| 0c53afbfcf | |||
| 2616dd91f9 | |||
| f7c37a7a98 | |||
| 095ca76b5b | |||
| f9f8e2bdbe | |||
| 735bceb468 | |||
| 81293b0fda | |||
| 88dca11b3c | |||
| 460e8bd298 | |||
| ce86ff6cd1 | |||
| 36126ccb7d | |||
| b7210e931c | |||
| 53342a5cec | |||
| d53dc541d8 | |||
| 974ea3420b | |||
| c83fedf100 | |||
| 7edeccae80 | |||
| e242b37619 | |||
| 9a389c946c | |||
| 1b31b4899a | |||
| d24885f805 | |||
| 345c212828 | |||
| 477d9feb5c | |||
| 0a835c499a | |||
| 6dcee30b1a | |||
| 5670dc5e6e | |||
| b11757adb3 | |||
| b61834f28d | |||
| 1d54c93df8 | |||
| 330f29db0b | |||
| 366aaf2450 | |||
| c9d41178d8 | |||
| 6886dcb2e4 | |||
| 23f71ee4ad | |||
| 844858d3a7 | |||
| 2b8576c7c7 | |||
| eeee2d3026 | |||
| 53cc609c4c | |||
| c8a0689d78 | |||
| 28786ef99b | |||
| 749f1ff407 | |||
| 654fec164d | |||
| 35294dafbc | |||
| 83f5c331cd | |||
| 1fdb010c41 | |||
| b5b70b429f | |||
| 07a15a719f | |||
| 75cffc78c5 | |||
| 0c005f5cb0 | |||
| fc0110a2e0 | |||
| 072a063afc | |||
| fbf96b680b | |||
| ed3f8d4b3f | |||
| efbee4a292 | |||
| 2e2f19770c | |||
| 59b59573a7 | |||
| 25ac1fd16c | |||
| 51d2625daf | |||
| 4e6188cff6 | |||
| ca6f99129d | |||
| 0015b15b18 | |||
| e4071d7f46 | |||
| 6b92826a1a | |||
| f202f1bcf6 | |||
| d504dcc465 | |||
| eaaad3f6d5 | |||
| 75069ec55b | |||
| 392816a807 | |||
| 1b8669c620 | |||
| ce80d1a3ea | |||
| 8709f6044b | |||
| a315599bac | |||
| 08bc115380 | |||
| 65b7e43a91 | |||
| 436a5de3a6 | |||
| f0cca6fb9d | |||
| 3ed640666f | |||
| 6a9ecde742 | |||
| 2a3b93ca3d | |||
| e4c6c46b4c | |||
| 7990826ca2 | |||
| fa499ff95d | |||
| 86cfbb3010 | |||
| f409f4ff53 | |||
| eab737a45c | |||
| b422480002 | |||
| 3d18f55155 | |||
| 10b38cda93 | |||
| 6490ee46b7 | |||
| 642c8f9859 | |||
| 755bda2275 | |||
| 05a7e5011f | |||
| 3abb7f0eaf | |||
| 5b93fc6a27 | |||
| 1e096d77ef | |||
| 38e940a392 | |||
| 7cc62f4234 | |||
| 01f378d265 | |||
| ab200cff06 | |||
| 5fe0b0a2cc | |||
| 6df54ac3ec | |||
| 1e9d91bd8f | |||
| 749336ae1f | |||
| 925e647acf | |||
| 148d26d943 | |||
| 2bfd30f7d7 | |||
| f4bb33de4b | |||
| 49f0a7a89a | |||
| f1182df776 | |||
| 1828274a99 | |||
| 813343928a | |||
| cc44a8863c | |||
| f3e58440a2 | |||
| 4cbda74df4 | |||
| c6bb9586ef | |||
| b219392d59 | |||
| f6b4587fe8 | |||
| 72d9795d7f | |||
| 54832a8fe4 | |||
| d144ab0164 | |||
| 87993368f9 | |||
| 3de0cf5ab4 | |||
| f5ff30df83 | |||
| 45ea7b3cc7 | |||
| 023b018ed2 | |||
| 64b08d3ca8 | |||
| c7edc6636a | |||
| 98a22c2b55 | |||
| b88f7aac32 | |||
| 7519dee502 | |||
| 8746ab547e | |||
| 2c5597ae4b | |||
| 8a56b8ad3a | |||
| b934621651 | |||
| bf5b3f96e9 | |||
| 4d375e72f0 | |||
| 7cc59fbbbe | |||
| d53def5853 | |||
| af45d55b3f | |||
| 3168704858 | |||
| bf18d84273 | |||
| 9b0f8a0c55 | |||
| 56d0014a4a | |||
| 26d22a4b7a | |||
| c5e884fb41 | |||
| c4373c7afa | |||
| 69665c218a | |||
| 6f9a2245d2 | |||
| d5ec76290b | |||
| 836027dbd8 | |||
| c5127eca89 | |||
| 91b407570a | |||
| 5bf8e1bc5b | |||
| 164537cf37 | |||
| f1ee46cc64 | |||
| caa990746e | |||
| a087813d01 | |||
| 48e42a4e1e | |||
| 6027de5387 | |||
| 398f3173aa | |||
| 798fcacd77 | |||
| bc0fd5496a | |||
| 430027465f | |||
| 7f9400eadc | |||
| 1b965d4d3a | |||
| 6e31b7da63 | |||
| 8f1487fbc6 | |||
| e2bc4d461e | |||
| dee945c01d | |||
| bc49ce611a | |||
| 72cd13aac7 | |||
| 49d524e442 | |||
| 3c6102a0c3 | |||
| 4517c85c77 | |||
| aa4f044709 | |||
| 2d4e0fcfd3 | |||
| 4fa95de91c | |||
| 24e0ca5377 | |||
| e1a17d428f | |||
| 8e3ba36a4f | |||
| 12bc84163d | |||
| 5221ac2d55 | |||
| af8e258ebb | |||
| d1356c1d76 | |||
| 3f3bab4e71 | |||
| f089d8d247 | |||
| 25d2f4b1f6 | |||
| 020fc66ad9 | |||
| 6d0b53ff16 | |||
| 192f83164c | |||
| 78d8be311c | |||
| 70c5f3bff8 | |||
| 49aad1d157 | |||
| 04bd268745 | |||
| 959883ad03 | |||
| 52446eed6d | |||
| e8eeb52636 | |||
| a323147819 | |||
| 89de70ff32 | |||
| 21364f38b0 | |||
| 51b19dfd1a | |||
| 3b90f60064 | |||
| 7d1de34533 | |||
| d5e43a9ab1 | |||
| 3787b89447 | |||
| 8fef7880e7 | |||
| a8eb3ff77f | |||
| 38ce56f252 | |||
| 5191071581 | |||
| b6821ed942 | |||
| deeba53a24 | |||
| daae906162 | |||
| b252866393 | |||
| d52c5435a7 | |||
| 75a432833b | |||
| 5843be1557 | |||
| a04a975d3a | |||
| 996c62f4e0 | |||
| 3d63c29abd | |||
| b0b67ca610 | |||
| bf9f084d72 | |||
| 08bdc4e422 | |||
| eb0e64b2f3 | |||
| fd0fae4847 | |||
| cccd6c441c | |||
| 88d54d49b8 | |||
| 3d614bbc87 | |||
| 6e945f72f4 | |||
| 251bc882cf | |||
| f56a345ae9 | |||
| 76cc545d2a | |||
| eed4815953 | |||
| fa5ec0bae7 | |||
| 7572dc63db |
48
.github/CODEOWNERS
vendored
@ -9,13 +9,49 @@ lib/kokkos/* @stanmoore1
|
||||
lib/molfile/* @akohlmey
|
||||
lib/qmmm/* @akohlmey
|
||||
lib/vtk/* @rbberger
|
||||
lib/kim/* @ellio167
|
||||
|
||||
# packages
|
||||
src/KOKKOS @stanmoore1
|
||||
src/USER-CGSDK @akohlmey
|
||||
src/USER-COLVARS @giacomofiorin
|
||||
src/USER-OMP @akohlmey
|
||||
src/USER-QMMM @akohlmey
|
||||
# whole packages
|
||||
src/COMPRESS/* @akohlmey
|
||||
src/GPU/* @ndtrung81
|
||||
src/KOKKOS/* @stanmoore1
|
||||
src/KIM/* @ellio167
|
||||
src/LATTE/* @cnegre
|
||||
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
|
||||
src/USER-MOFFF/* @hheenen
|
||||
src/USER-MOLFILE/* @akohlmey
|
||||
src/USER-NETCDF/* @pastewka
|
||||
src/USER-PHONON/* @lingtikong
|
||||
src/USER-OMP/* @akohlmey
|
||||
src/USER-QMMM/* @akohlmey
|
||||
src/USER-REAXC/* @hasanmetin
|
||||
src/USER-TALLY/* @akohlmey
|
||||
src/USER-UEF/* @danicholson
|
||||
src/USER-VTK/* @rbberger
|
||||
|
||||
# individual files in packages
|
||||
src/GPU/pair_vashishta_gpu.* @andeplane
|
||||
src/KOKKOS/pair_vashishta_kokkos.* @andeplane
|
||||
src/MANYBODY/pair_vashishta_table.* @andeplane
|
||||
src/USER-MISC/fix_bond_react.* @jrgissing
|
||||
src/USER-MISC/*_grem.* @dstelter92
|
||||
|
||||
# tools
|
||||
tools/msi2lmp/* @akohlmey
|
||||
|
||||
# cmake
|
||||
cmake/* @junghans @rbberger
|
||||
|
||||
# python
|
||||
python/* @rbberger
|
||||
|
||||
# docs
|
||||
doc/utils/*/* @rbberger
|
||||
doc/Makefile @rbberger
|
||||
doc/README @rbberger
|
||||
|
||||
2
README
@ -25,7 +25,7 @@ The LAMMPS distribution includes the following files and directories:
|
||||
README this file
|
||||
LICENSE the GNU General Public License (GPL)
|
||||
bench benchmark problems
|
||||
couple code coupling examples using LAMMPS as a library
|
||||
cmake CMake build system
|
||||
doc documentation
|
||||
examples simple test problems
|
||||
lib libraries LAMMPS can be linked with
|
||||
|
||||
@ -2,15 +2,16 @@
|
||||
# CMake build system
|
||||
# This file is part of LAMMPS
|
||||
# Created by Christoph Junghans and Richard Berger
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
cmake_minimum_required(VERSION 2.8.12)
|
||||
|
||||
project(lammps)
|
||||
project(lammps CXX)
|
||||
set(SOVERSION 0)
|
||||
set(LAMMPS_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../src)
|
||||
set(LAMMPS_LIB_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../lib)
|
||||
set(LAMMPS_LIB_BINARY_DIR ${CMAKE_BINARY_DIR}/lib)
|
||||
get_filename_component(LAMMPS_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../src ABSOLUTE)
|
||||
get_filename_component(LAMMPS_LIB_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../lib ABSOLUTE)
|
||||
get_filename_component(LAMMPS_LIB_BINARY_DIR ${CMAKE_BINARY_DIR}/lib ABSOLUTE)
|
||||
|
||||
#To not conflict with old Makefile build system, we build everything here
|
||||
|
||||
# To avoid conflicts with the conventional Makefile build system, we build everything here
|
||||
file(GLOB LIB_SOURCES ${LAMMPS_SOURCE_DIR}/*.cpp)
|
||||
file(GLOB LMP_SOURCES ${LAMMPS_SOURCE_DIR}/main.cpp)
|
||||
list(REMOVE_ITEM LIB_SOURCES ${LMP_SOURCES})
|
||||
@ -23,13 +24,23 @@ if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CXX_FLAGS)
|
||||
set(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel." FORCE)
|
||||
endif(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CXX_FLAGS)
|
||||
|
||||
# remove any style headers in the src dir
|
||||
file(GLOB SRC_STYLE_FILES ${LAMMPS_SOURCE_DIR}/style_*.h)
|
||||
if(SRC_STYLE_FILES)
|
||||
file(REMOVE ${SRC_STYLE_FILES})
|
||||
endif()
|
||||
|
||||
enable_language(CXX)
|
||||
# check for files auto-generated by make-based buildsystem
|
||||
# this is fast, so check for it all the time
|
||||
message(STATUS "Running check for auto-generated files from make-based build system")
|
||||
file(GLOB SRC_AUTOGEN_FILES ${LAMMPS_SOURCE_DIR}/style_*.h)
|
||||
list(APPEND SRC_AUTOGEN_FILES ${LAMMPS_SOURCE_DIR}/lmpinstalledpkgs.h)
|
||||
foreach(_SRC ${SRC_AUTOGEN_FILES})
|
||||
get_filename_component(FILENAME "${_SRC}" NAME)
|
||||
if(EXISTS ${LAMMPS_SOURCE_DIR}/${FILENAME})
|
||||
message(FATAL_ERROR "\n########################################################################\n"
|
||||
"Found header file(s) generated by the make-based build system\n"
|
||||
"\n"
|
||||
"Please run\n"
|
||||
"make -C ${LAMMPS_SOURCE_DIR} purge\n"
|
||||
"to remove\n"
|
||||
"########################################################################")
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
######################################################################
|
||||
# compiler tests
|
||||
@ -41,28 +52,80 @@ if (${CMAKE_CXX_COMPILER_ID} STREQUAL "Intel")
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -restrict")
|
||||
endif()
|
||||
|
||||
# GNU compiler features
|
||||
if (${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU")
|
||||
option(ENABLE_COVERAGE "Enable code coverage" OFF)
|
||||
mark_as_advanced(ENABLE_COVERAGE)
|
||||
if(ENABLE_COVERAGE)
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --coverage")
|
||||
endif()
|
||||
option(ENABLE_SANITIZE_ADDRESS "Enable address sanitizer" OFF)
|
||||
mark_as_advanced(ENABLE_SANITIZE_ADDRESS)
|
||||
if(ENABLE_SANITIZE_ADDRESS)
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address")
|
||||
endif()
|
||||
option(ENABLE_SANITIZE_UNDEFINED "Enable undefined behavior sanitizer" OFF)
|
||||
mark_as_advanced(ENABLE_SANITIZE_UNDEFINED)
|
||||
if(ENABLE_SANITIZE_UNDEFINED)
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=undefined")
|
||||
endif()
|
||||
option(ENABLE_SANITIZE_THREAD "Enable thread sanitizer" OFF)
|
||||
mark_as_advanced(ENABLE_SANITIZE_THREAD)
|
||||
if(ENABLE_SANITIZE_THREAD)
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=thread")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
########################################################################
|
||||
# User input options #
|
||||
########################################################################
|
||||
option(BUILD_SHARED_LIBS "Build shared libs" OFF)
|
||||
if(BUILD_SHARED_LIBS) # for all pkg libs, mpi_stubs and linalg
|
||||
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
||||
option(BUILD_EXE "Build lmp binary" ON)
|
||||
if(BUILD_EXE)
|
||||
set(LAMMPS_MACHINE "" CACHE STRING "Suffix to append to lmp binary (WON'T enable any features automatically")
|
||||
mark_as_advanced(LAMMPS_MACHINE)
|
||||
if(LAMMPS_MACHINE)
|
||||
set(LAMMPS_MACHINE "_${LAMMPS_MACHINE}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
option(BUILD_LIB "Build LAMMPS library" OFF)
|
||||
if(BUILD_LIB)
|
||||
option(BUILD_SHARED_LIBS "Build shared library" OFF)
|
||||
if(BUILD_SHARED_LIBS) # for all pkg libs, mpi_stubs and linalg
|
||||
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
||||
endif()
|
||||
set(LIB_SUFFIX "" CACHE STRING "Suffix to append to liblammps and pkg-config file")
|
||||
mark_as_advanced(LIB_SUFFIX)
|
||||
if(LIB_SUFFIX)
|
||||
set(LIB_SUFFIX "_${LIB_SUFFIX}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT BUILD_EXE AND NOT BUILD_LIB)
|
||||
message(FATAL_ERROR "You need to at least enable one of two following options: BUILD_LIB or BUILD_EXE")
|
||||
endif()
|
||||
|
||||
option(DEVELOPER_MODE "Enable developer mode" OFF)
|
||||
mark_as_advanced(DEVELOPER_MODE)
|
||||
option(CMAKE_VERBOSE_MAKEFILE "Generate verbose Makefiles" OFF)
|
||||
include(GNUInstallDirs)
|
||||
|
||||
set(LAMMPS_LINK_LIBS)
|
||||
set(LAMMPS_DEPS)
|
||||
set(LAMMPS_API_DEFINES)
|
||||
option(ENABLE_MPI "Build MPI version" OFF)
|
||||
if(ENABLE_MPI)
|
||||
|
||||
find_package(MPI QUIET)
|
||||
option(BUILD_MPI "Build MPI version" ${MPI_FOUND})
|
||||
if(BUILD_MPI)
|
||||
find_package(MPI REQUIRED)
|
||||
include_directories(${MPI_C_INCLUDE_PATH})
|
||||
include_directories(${MPI_CXX_INCLUDE_PATH})
|
||||
list(APPEND LAMMPS_LINK_LIBS ${MPI_CXX_LIBRARIES})
|
||||
option(LAMMPS_LONGLONG_TO_LONG "Workaround if your system or MPI version does not recognize 'long long' data types" OFF)
|
||||
if(LAMMPS_LONGLONG_TO_LONG)
|
||||
add_definitions(-DLAMMPS_LONGLONG_TO_LONG)
|
||||
endif()
|
||||
else()
|
||||
enable_language(C)
|
||||
file(GLOB MPI_SOURCES ${LAMMPS_SOURCE_DIR}/STUBS/mpi.c)
|
||||
add_library(mpi_stubs STATIC ${MPI_SOURCES})
|
||||
include_directories(${LAMMPS_SOURCE_DIR}/STUBS)
|
||||
@ -83,12 +146,6 @@ if(LAMMPS_EXCEPTIONS)
|
||||
set(LAMMPS_API_DEFINES "${LAMMPS_API_DEFINES} -DLAMMPS_EXCEPTIONS")
|
||||
endif()
|
||||
|
||||
set(LAMMPS_MACHINE "" CACHE STRING "Suffix to append to lmp binary and liblammps (WON'T enable any features automatically")
|
||||
mark_as_advanced(LAMMPS_MACHINE)
|
||||
if(LAMMPS_MACHINE)
|
||||
set(LAMMPS_MACHINE "_${LAMMPS_MACHINE}")
|
||||
endif()
|
||||
|
||||
option(CMAKE_VERBOSE_MAKEFILE "Verbose makefile" OFF)
|
||||
|
||||
option(ENABLE_TESTING "Enable testing" OFF)
|
||||
@ -96,26 +153,23 @@ if(ENABLE_TESTING)
|
||||
enable_testing()
|
||||
endif(ENABLE_TESTING)
|
||||
|
||||
option(ENABLE_ALL "Build all default packages" OFF)
|
||||
set(DEFAULT_PACKAGES ASPHERE BODY CLASS2 COLLOID COMPRESS CORESHELL DIPOLE GRANULAR
|
||||
KSPACE MANYBODY MC MEAM MISC MOLECULE PERI QEQ
|
||||
REAX REPLICA RIGID SHOCK SNAP SRD)
|
||||
set(OTHER_PACKAGES KIM PYTHON MSCG MPIIO VORONOI POEMS LATTE
|
||||
USER-ATC USER-AWPMD USER-CGDNA USER-MESO
|
||||
USER-CGSDK USER-COLVARS USER-DIFFRACTION USER-DPD USER-DRUDE USER-EFF
|
||||
USER-FEP USER-H5MD USER-LB USER-MANIFOLD USER-MEAMC USER-MGPT USER-MISC
|
||||
KSPACE MANYBODY MC MEAM MISC MOLECULE PERI QEQ REAX REPLICA RIGID SHOCK SPIN SNAP
|
||||
SRD KIM PYTHON MSCG MPIIO VORONOI POEMS LATTE USER-ATC USER-AWPMD USER-BOCS
|
||||
USER-CGDNA USER-MESO USER-CGSDK USER-COLVARS USER-DIFFRACTION USER-DPD USER-DRUDE
|
||||
USER-EFF USER-FEP USER-H5MD USER-LB USER-MANIFOLD USER-MEAMC USER-MGPT USER-MISC
|
||||
USER-MOFFF USER-MOLFILE USER-NETCDF USER-PHONON USER-QTB USER-REAXC USER-SMD
|
||||
USER-SMTBQ USER-SPH USER-TALLY USER-UEF USER-VTK USER-QUIP USER-QMMM)
|
||||
set(ACCEL_PACKAGES USER-OMP KOKKOS OPT USER-INTEL GPU)
|
||||
foreach(PKG ${DEFAULT_PACKAGES})
|
||||
option(ENABLE_${PKG} "Build ${PKG} Package" ${ENABLE_ALL})
|
||||
option(PKG_${PKG} "Build ${PKG} Package" OFF)
|
||||
endforeach()
|
||||
foreach(PKG ${ACCEL_PACKAGES} ${OTHER_PACKAGES})
|
||||
option(ENABLE_${PKG} "Build ${PKG} Package" OFF)
|
||||
option(PKG_${PKG} "Build ${PKG} Package" OFF)
|
||||
endforeach()
|
||||
|
||||
macro(pkg_depends PKG1 PKG2)
|
||||
if(ENABLE_${PKG1} AND NOT ENABLE_${PKG2})
|
||||
if(PKG_${PKG1} AND NOT (PKG_${PKG2} OR BUILD_${PKG2}))
|
||||
message(FATAL_ERROR "${PKG1} package needs LAMMPS to be build with ${PKG2}")
|
||||
endif()
|
||||
endmacro()
|
||||
@ -123,43 +177,51 @@ endmacro()
|
||||
pkg_depends(MPIIO MPI)
|
||||
pkg_depends(QEQ MANYBODY)
|
||||
pkg_depends(USER-ATC MANYBODY)
|
||||
pkg_depends(USER-H5MD MPI)
|
||||
pkg_depends(USER-LB MPI)
|
||||
pkg_depends(USER-MISC MANYBODY)
|
||||
pkg_depends(USER-PHONON KSPACE)
|
||||
|
||||
if(ENABLE_BODY AND ENABLE_POEMS)
|
||||
message(FATAL_ERROR "BODY and POEMS cannot be enabled at the same time")
|
||||
endif()
|
||||
pkg_depends(CORESHELL KSPACE)
|
||||
|
||||
######################################################
|
||||
# packages with special compiler needs or external libs
|
||||
######################################################
|
||||
if(ENABLE_REAX OR ENABLE_MEAM OR ENABLE_USER-QUIP OR ENABLE_USER-QMMM OR ENABLE_LATTE)
|
||||
if(PKG_REAX OR PKG_MEAM OR PKG_USER-QUIP OR PKG_USER-QMMM OR PKG_LATTE)
|
||||
enable_language(Fortran)
|
||||
include(CheckFortranCompilerFlag)
|
||||
check_Fortran_compiler_flag("-fno-second-underscore" FC_HAS_NO_SECOND_UNDERSCORE)
|
||||
endif()
|
||||
|
||||
if(ENABLE_KOKKOS OR ENABLE_MSCG)
|
||||
# starting with CMake 3.1 this is all you have to do to enforce C++11
|
||||
set(CMAKE_CXX_STANDARD 11) # C++11...
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON) #...is required...
|
||||
set(CMAKE_CXX_EXTENSIONS OFF) #...without compiler extensions like gnu++11
|
||||
if(PKG_MEAM OR PKG_USER-H5MD OR PKG_USER-QMMM)
|
||||
enable_language(C)
|
||||
endif()
|
||||
|
||||
if(ENABLE_USER-OMP OR ENABLE_KOKKOS OR ENABLE_USER-INTEL)
|
||||
find_package(OpenMP QUIET)
|
||||
option(BUILD_OMP "Build with OpenMP support" ${OpenMP_FOUND})
|
||||
if(BUILD_OMP OR PKG_USER-OMP OR PKG_KOKKOS OR PKG_USER-INTEL)
|
||||
find_package(OpenMP REQUIRED)
|
||||
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
|
||||
endif()
|
||||
|
||||
if(ENABLE_KSPACE)
|
||||
set(FFT "KISSFFT" CACHE STRING "FFT library for KSPACE package")
|
||||
set_property(CACHE FFT PROPERTY STRINGS KISSFFT FFTW3 MKL FFTW2)
|
||||
if(PKG_KSPACE)
|
||||
option(FFT_SINGLE "Use single precision FFT instead of double" OFF)
|
||||
set(FFTW "FFTW3")
|
||||
if(FFT_SINGLE)
|
||||
set(FFTW "FFTW3F")
|
||||
add_definitions(-DFFT_SINGLE)
|
||||
endif()
|
||||
find_package(${FFTW} QUIET)
|
||||
if(${FFTW}_FOUND)
|
||||
set(FFT "${FFTW}" CACHE STRING "FFT library for KSPACE package")
|
||||
else()
|
||||
set(FFT "KISSFFT" CACHE STRING "FFT library for KSPACE package")
|
||||
endif()
|
||||
set_property(CACHE FFT PROPERTY STRINGS KISSFFT ${FFTW} MKL)
|
||||
if(NOT FFT STREQUAL "KISSFFT")
|
||||
find_package(${FFT} REQUIRED)
|
||||
add_definitions(-DFFT_${FFT})
|
||||
if(NOT FFT STREQUAL "FFTW3F")
|
||||
add_definitions(-DFFT_FFTW)
|
||||
else()
|
||||
add_definitions(-DFFT_${FFT})
|
||||
endif()
|
||||
include_directories(${${FFT}_INCLUDE_DIRS})
|
||||
list(APPEND LAMMPS_LINK_LIBS ${${FFT}_LIBRARIES})
|
||||
endif()
|
||||
@ -170,28 +232,23 @@ if(ENABLE_KSPACE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(ENABLE_MSCG OR ENABLE_USER-ATC OR ENABLE_USER-AWPMD OR ENABLE_USER-QUIP OR ENABLE_LATTE)
|
||||
if(PKG_MSCG OR PKG_USER-ATC OR PKG_USER-AWPMD OR PKG_USER-QUIP OR PKG_LATTE)
|
||||
find_package(LAPACK)
|
||||
if(NOT LAPACK_FOUND)
|
||||
enable_language(Fortran)
|
||||
file(GLOB LAPACK_SOURCES ${LAMMPS_LIB_SOURCE_DIR}/linalg/*.f)
|
||||
file(GLOB LAPACK_SOURCES ${LAMMPS_LIB_SOURCE_DIR}/linalg/*.[fF])
|
||||
add_library(linalg STATIC ${LAPACK_SOURCES})
|
||||
include(CheckFortranCompilerFlag)
|
||||
check_Fortran_compiler_flag("-fno-second-underscore" FC_HAS_NO_SECOND_UNDERSCORE)
|
||||
if(FC_HAS_NO_SECOND_UNDERSCORE)
|
||||
target_compile_options(linalg PRIVATE -fno-second-underscore)
|
||||
endif()
|
||||
set(LAPACK_LIBRARIES linalg)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(ENABLE_PYTHON)
|
||||
if(PKG_PYTHON)
|
||||
find_package(PythonInterp REQUIRED)
|
||||
find_package(PythonLibs REQUIRED)
|
||||
add_definitions(-DLMP_PYTHON)
|
||||
include_directories(${PYTHON_INCLUDE_DIR})
|
||||
list(APPEND LAMMPS_LINK_LIBS ${PYTHON_LIBRARY})
|
||||
if(BUILD_SHARED_LIBS)
|
||||
if(BUILD_LIB AND BUILD_SHARED_LIBS)
|
||||
if(NOT PYTHON_INSTDIR)
|
||||
execute_process(COMMAND ${PYTHON_EXECUTABLE}
|
||||
-c "import distutils.sysconfig as cg; print(cg.get_python_lib(1,0,prefix='${CMAKE_INSTALL_PREFIX}'))"
|
||||
@ -201,16 +258,25 @@ if(ENABLE_PYTHON)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
find_package(JPEG)
|
||||
if(JPEG_FOUND)
|
||||
find_package(JPEG QUIET)
|
||||
option(WITH_JPEG "Enable JPEG support" ${JPEG_FOUND})
|
||||
if(WITH_JPEG)
|
||||
find_package(JPEG REQUIRED)
|
||||
add_definitions(-DLAMMPS_JPEG)
|
||||
include_directories(${JPEG_INCLUDE_DIR})
|
||||
list(APPEND LAMMPS_LINK_LIBS ${JPEG_LIBRARIES})
|
||||
endif()
|
||||
|
||||
find_package(PNG)
|
||||
find_package(ZLIB)
|
||||
find_package(PNG QUIET)
|
||||
find_package(ZLIB QUIET)
|
||||
if(PNG_FOUND AND ZLIB_FOUND)
|
||||
option(WITH_PNG "Enable PNG support" ON)
|
||||
else()
|
||||
option(WITH_PNG "Enable PNG support" OFF)
|
||||
endif()
|
||||
if(WITH_PNG)
|
||||
find_package(PNG REQUIRED)
|
||||
find_package(ZLIB REQUIRED)
|
||||
include_directories(${PNG_INCLUDE_DIRS} ${ZLIB_INCLUDE_DIRS})
|
||||
list(APPEND LAMMPS_LINK_LIBS ${PNG_LIBRARIES} ${ZLIB_LIBRARIES})
|
||||
add_definitions(-DLAMMPS_PNG)
|
||||
@ -218,113 +284,194 @@ endif()
|
||||
|
||||
find_program(GZIP_EXECUTABLE gzip)
|
||||
find_package_handle_standard_args(GZIP REQUIRED_VARS GZIP_EXECUTABLE)
|
||||
if(GZIP_FOUND)
|
||||
option(WITH_GZIP "Enable GZIP support" ${GZIP_FOUND})
|
||||
if(WITH_GZIP)
|
||||
if(NOT GZIP_FOUND)
|
||||
message(FATAL_ERROR "gzip executable not found")
|
||||
endif()
|
||||
add_definitions(-DLAMMPS_GZIP)
|
||||
endif()
|
||||
|
||||
find_program(FFMPEG_EXECUTABLE ffmpeg)
|
||||
find_package_handle_standard_args(FFMPEG REQUIRED_VARS FFMPEG_EXECUTABLE)
|
||||
if(FFMPEG_FOUND)
|
||||
option(WITH_FFMPEG "Enable FFMPEG support" ${FFMPEG_FOUND})
|
||||
if(WITH_FFMPEG)
|
||||
if(NOT FFMPEG_FOUND)
|
||||
message(FATAL_ERROR "ffmpeg executable not found")
|
||||
endif()
|
||||
add_definitions(-DLAMMPS_FFMPEG)
|
||||
endif()
|
||||
|
||||
if(ENABLE_VORONOI)
|
||||
find_package(VORO REQUIRED) #some distros
|
||||
if(PKG_VORONOI)
|
||||
option(DOWNLOAD_VORO "Download voro++ (instead of using the system's one)" OFF)
|
||||
if(DOWNLOAD_VORO)
|
||||
include(ExternalProject)
|
||||
ExternalProject_Add(voro_build
|
||||
URL http://math.lbl.gov/voro++/download/dir/voro++-0.4.6.tar.gz
|
||||
URL_MD5 2338b824c3b7b25590e18e8df5d68af9
|
||||
CONFIGURE_COMMAND "" BUILD_IN_SOURCE 1 INSTALL_COMMAND ""
|
||||
)
|
||||
ExternalProject_get_property(voro_build SOURCE_DIR)
|
||||
set(VORO_LIBRARIES ${SOURCE_DIR}/src/libvoro++.a)
|
||||
set(VORO_INCLUDE_DIRS ${SOURCE_DIR}/src)
|
||||
list(APPEND LAMMPS_DEPS voro_build)
|
||||
else()
|
||||
find_package(VORO)
|
||||
if(NOT VORO_FOUND)
|
||||
message(FATAL_ERROR "VORO not found, help CMake to find it by setting VORO_LIBRARY and VORO_INCLUDE_DIR, or set DOWNLOAD_VORO=ON to download it")
|
||||
endif()
|
||||
endif()
|
||||
include_directories(${VORO_INCLUDE_DIRS})
|
||||
list(APPEND LAMMPS_LINK_LIBS ${VORO_LIBRARIES})
|
||||
endif()
|
||||
|
||||
if(ENABLE_LATTE)
|
||||
find_package(LATTE QUIET)
|
||||
if(NOT LATTE_FOUND)
|
||||
if(PKG_LATTE)
|
||||
option(DOWNLOAD_LATTE "Download latte (instead of using the system's one)" OFF)
|
||||
if(DOWNLOAD_LATTE)
|
||||
message(STATUS "LATTE not found - we will build our own")
|
||||
include(ExternalProject)
|
||||
ExternalProject_Add(latte_build
|
||||
URL https://github.com/lanl/LATTE/archive/v1.0.1.tar.gz
|
||||
URL_MD5 5137e28cb1a64444bd571c98c98a6eee
|
||||
URL https://github.com/lanl/LATTE/archive/v1.2.1.tar.gz
|
||||
URL_MD5 bed76e7e76c545c36dd848a8f1fd35eb
|
||||
SOURCE_SUBDIR cmake
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR> -DCMAKE_POSITION_INDEPENDENT_CODE=${CMAKE_POSITION_INDEPENDENT_CODE}
|
||||
)
|
||||
ExternalProject_get_property(latte_build INSTALL_DIR)
|
||||
set(LATTE_LIBRARIES ${INSTALL_DIR}/${CMAKE_INSTALL_LIBDIR}/liblatte.a)
|
||||
list(APPEND LAMMPS_DEPS latte_build)
|
||||
else()
|
||||
find_package(LATTE)
|
||||
if(NOT LATTE_FOUND)
|
||||
message(FATAL_ERROR "LATTE not found, help CMake to find it by setting LATTE_LIBRARY, or set DOWNLOAD_LATTE=ON to download it")
|
||||
endif()
|
||||
endif()
|
||||
list(APPEND LAMMPS_LINK_LIBS ${LATTE_LIBRARIES} ${LAPACK_LIBRARIES} ${CMAKE_Fortran_IMPLICIT_LINK_LIBRARIES})
|
||||
list(APPEND LAMMPS_LINK_LIBS ${LATTE_LIBRARIES} ${LAPACK_LIBRARIES})
|
||||
endif()
|
||||
|
||||
if(ENABLE_USER-MOLFILE)
|
||||
if(PKG_USER-MOLFILE)
|
||||
add_library(molfile INTERFACE)
|
||||
target_include_directories(molfile INTERFACE ${LAMMPS_LIB_SOURCE_DIR}/molfile)
|
||||
target_link_libraries(molfile INTERFACE ${CMAKE_DL_LIBS})
|
||||
list(APPEND LAMMPS_LINK_LIBS molfile)
|
||||
endif()
|
||||
|
||||
if(ENABLE_USER-NETCDF)
|
||||
if(PKG_USER-NETCDF)
|
||||
find_package(NetCDF REQUIRED)
|
||||
include_directories(NETCDF_INCLUDE_DIR)
|
||||
list(APPEND LAMMPS_LINK_LIBS ${NETCDF_LIBRARY})
|
||||
add_definitions(-DLMP_HAS_NETCDF -DNC_64BIT_DATA=0x0020)
|
||||
endif()
|
||||
|
||||
if(ENABLE_USER-SMD)
|
||||
find_package(Eigen3 REQUIRED)
|
||||
if(PKG_USER-SMD)
|
||||
option(DOWNLOAD_Eigen3 "Download Eigen3 (instead of using the system's one)" OFF)
|
||||
if(DOWNLOAD_Eigen3)
|
||||
include(ExternalProject)
|
||||
ExternalProject_Add(Eigen3_build
|
||||
URL http://bitbucket.org/eigen/eigen/get/3.3.4.tar.gz
|
||||
URL_MD5 1a47e78efe365a97de0c022d127607c3
|
||||
CONFIGURE_COMMAND "" BUILD_COMMAND "" INSTALL_COMMAND ""
|
||||
)
|
||||
ExternalProject_get_property(Eigen3_build SOURCE_DIR)
|
||||
set(EIGEN3_INCLUDE_DIR ${SOURCE_DIR})
|
||||
list(APPEND LAMMPS_DEPS Eigen3_build)
|
||||
else()
|
||||
find_package(Eigen3)
|
||||
if(NOT Eigen3_FOUND)
|
||||
message(FATAL_ERROR "Eigen3 not found, help CMake to find it by setting EIGEN3_INCLUDE_DIR, or set DOWNLOAD_Eigen3=ON to download it")
|
||||
endif()
|
||||
endif()
|
||||
include_directories(${EIGEN3_INCLUDE_DIR})
|
||||
endif()
|
||||
|
||||
if(ENABLE_USER-QUIP)
|
||||
if(PKG_USER-QUIP)
|
||||
find_package(QUIP REQUIRED)
|
||||
list(APPEND LAMMPS_LINK_LIBS ${QUIP_LIBRARIES} ${LAPACK_LIBRARIES} ${CMAKE_Fortran_IMPLICIT_LINK_LIBRARIES})
|
||||
list(APPEND LAMMPS_LINK_LIBS ${QUIP_LIBRARIES} ${LAPACK_LIBRARIES})
|
||||
endif()
|
||||
|
||||
if(ENABLE_USER-QMMM)
|
||||
if(PKG_USER-QMMM)
|
||||
message(WARNING "Building QMMM with CMake is still experimental")
|
||||
find_package(QE REQUIRED)
|
||||
include_directories(${QE_INCLUDE_DIRS})
|
||||
list(APPEND LAMMPS_LINK_LIBS ${QE_LIBRARIES} ${CMAKE_Fortran_IMPLICIT_LINK_LIBRARIES})
|
||||
list(APPEND LAMMPS_LINK_LIBS ${QE_LIBRARIES})
|
||||
endif()
|
||||
|
||||
if(ENABLE_USER-VTK)
|
||||
if(PKG_USER-VTK)
|
||||
find_package(VTK REQUIRED NO_MODULE)
|
||||
include(${VTK_USE_FILE})
|
||||
add_definitions(-DLAMMPS_VTK)
|
||||
list(APPEND LAMMPS_LINK_LIBS ${VTK_LIBRARIES})
|
||||
endif()
|
||||
|
||||
if(ENABLE_KIM)
|
||||
find_package(KIM REQUIRED)
|
||||
if(PKG_KIM)
|
||||
option(DOWNLOAD_KIM "Download kim-api (instead of using the system's one)" OFF)
|
||||
if(DOWNLOAD_KIM)
|
||||
include(ExternalProject)
|
||||
ExternalProject_Add(kim_build
|
||||
URL https://github.com/openkim/kim-api/archive/v1.9.5.tar.gz
|
||||
URL_MD5 9f66efc128da33039e30659f36fc6d00
|
||||
BUILD_IN_SOURCE 1
|
||||
CONFIGURE_COMMAND <SOURCE_DIR>/configure --prefix=<INSTALL_DIR>
|
||||
)
|
||||
ExternalProject_get_property(kim_build INSTALL_DIR)
|
||||
set(KIM_INCLUDE_DIRS ${INSTALL_DIR}/include/kim-api-v1)
|
||||
set(KIM_LIBRARIES ${INSTALL_DIR}/lib/libkim-api-v1.so)
|
||||
list(APPEND LAMMPS_DEPS kim_build)
|
||||
else()
|
||||
find_package(KIM)
|
||||
if(NOT KIM_FOUND)
|
||||
message(FATAL_ERROR "KIM not found, help CMake to find it by setting KIM_LIBRARY and KIM_INCLUDE_DIR, or set DOWNLOAD_KIM=ON to download it")
|
||||
endif()
|
||||
endif()
|
||||
list(APPEND LAMMPS_LINK_LIBS ${KIM_LIBRARIES})
|
||||
include_directories(${KIM_INCLUDE_DIRS})
|
||||
endif()
|
||||
|
||||
if(ENABLE_MSCG)
|
||||
if(PKG_MSCG)
|
||||
find_package(GSL REQUIRED)
|
||||
set(LAMMPS_LIB_MSCG_BIN_DIR ${LAMMPS_LIB_BINARY_DIR}/mscg)
|
||||
set(MSCG_TARBALL ${LAMMPS_LIB_MSCG_BIN_DIR}/MS-CG-master.zip)
|
||||
set(LAMMPS_LIB_MSCG_BIN_DIR ${LAMMPS_LIB_MSCG_BIN_DIR}/MSCG-release-master/src)
|
||||
if(NOT EXISTS ${LAMMPS_LIB_MSCG_BIN_DIR})
|
||||
if(NOT EXISTS ${MSCG_TARBALL})
|
||||
message(STATUS "Downloading ${MSCG_TARBALL}")
|
||||
file(DOWNLOAD
|
||||
https://github.com/uchicago-voth/MSCG-release/archive/master.zip
|
||||
${MSCG_TARBALL} SHOW_PROGRESS) #EXPECTED_MD5 cannot be due due to master
|
||||
option(DOWNLOAD_MSCG "Download latte (instead of using the system's one)" OFF)
|
||||
if(DOWNLOAD_MSCG)
|
||||
include(ExternalProject)
|
||||
if(NOT LAPACK_FOUND)
|
||||
set(EXTRA_MSCG_OPTS "-DLAPACK_LIBRARIES=${CMAKE_CURRENT_BINARY_DIR}/liblinalg.a")
|
||||
endif()
|
||||
ExternalProject_Add(mscg_build
|
||||
URL https://github.com/uchicago-voth/MSCG-release/archive/1.7.3.1.tar.gz
|
||||
URL_MD5 8c45e269ee13f60b303edd7823866a91
|
||||
SOURCE_SUBDIR src/CMake
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR> -DCMAKE_POSITION_INDEPENDENT_CODE=${CMAKE_POSITION_INDEPENDENT_CODE} ${EXTRA_MSCG_OPTS}
|
||||
BUILD_COMMAND make mscg INSTALL_COMMAND ""
|
||||
)
|
||||
ExternalProject_get_property(mscg_build BINARY_DIR)
|
||||
set(MSCG_LIBRARIES ${BINARY_DIR}/libmscg.a)
|
||||
ExternalProject_get_property(mscg_build SOURCE_DIR)
|
||||
set(MSCG_INCLUDE_DIRS ${SOURCE_DIR}/src)
|
||||
list(APPEND LAMMPS_DEPS mscg_build)
|
||||
if(NOT LAPACK_FOUND)
|
||||
file(MAKE_DIRECTORY ${MSCG_INCLUDE_DIRS})
|
||||
add_dependencies(mscg_build linalg)
|
||||
endif()
|
||||
else()
|
||||
find_package(MSCG)
|
||||
if(NOT MSCG_FOUND)
|
||||
message(FATAL_ERROR "MSCG not found, help CMake to find it by setting MSCG_LIBRARY and MSCG_INCLUDE_DIRS, or set DOWNLOAD_MSCG=ON to download it")
|
||||
endif()
|
||||
message(STATUS "Unpacking ${MSCG_TARBALL}")
|
||||
execute_process(COMMAND ${CMAKE_COMMAND} -E tar xvf ${MSCG_TARBALL}
|
||||
WORKING_DIRECTORY ${LAMMPS_LIB_BINARY_DIR}/mscg)
|
||||
endif()
|
||||
file(GLOB MSCG_SOURCES ${LAMMPS_LIB_MSCG_BIN_DIR}/*.cpp)
|
||||
add_library(mscg STATIC ${MSCG_SOURCES})
|
||||
list(APPEND LAMMPS_LINK_LIBS mscg)
|
||||
target_compile_options(mscg PRIVATE -DDIMENSION=3 -D_exclude_gromacs=1)
|
||||
target_include_directories(mscg PUBLIC ${LAMMPS_LIB_MSCG_BIN_DIR})
|
||||
target_link_libraries(mscg ${GSL_LIBRARIES} ${LAPACK_LIBRARIES})
|
||||
list(APPEND LAMMPS_LINK_LIBS ${MSCG_LIBRARIES} ${GSL_LIBRARIES} ${LAPACK_LIBRARIES})
|
||||
include_directories(${MSCG_INCLUDE_DIRS})
|
||||
endif()
|
||||
|
||||
if(PKG_COMPRESS)
|
||||
find_package(ZLIB REQUIRED)
|
||||
include_directories(${ZLIB_INCLUDE_DIRS})
|
||||
list(APPEND LAMMPS_LINK_LIBS ${ZLIB_LIBRARIES})
|
||||
endif()
|
||||
|
||||
########################################################################
|
||||
# Basic system tests (standard libraries, headers, functions, types) #
|
||||
########################################################################
|
||||
include(CheckIncludeFile)
|
||||
include(CheckIncludeFileCXX)
|
||||
foreach(HEADER math.h)
|
||||
check_include_file(${HEADER} FOUND_${HEADER})
|
||||
check_include_file_cxx(${HEADER} FOUND_${HEADER})
|
||||
if(NOT FOUND_${HEADER})
|
||||
message(FATAL_ERROR "Could not find needed header - ${HEADER}")
|
||||
endif(NOT FOUND_${HEADER})
|
||||
@ -333,6 +480,9 @@ endforeach(HEADER)
|
||||
set(MATH_LIBRARIES "m" CACHE STRING "math library")
|
||||
mark_as_advanced( MATH_LIBRARIES )
|
||||
include(CheckLibraryExists)
|
||||
if (CMAKE_VERSION VERSION_LESS "3.4")
|
||||
enable_language(C) # check_library_exists isn't supported without a c compiler before v3.4
|
||||
endif()
|
||||
foreach(FUNC sin cos)
|
||||
check_library_exists(${MATH_LIBRARIES} ${FUNC} "" FOUND_${FUNC}_${MATH_LIBRARIES})
|
||||
if(NOT FOUND_${FUNC}_${MATH_LIBRARIES})
|
||||
@ -350,25 +500,16 @@ RegisterStyles(${LAMMPS_SOURCE_DIR})
|
||||
##############################################
|
||||
# add sources of enabled packages
|
||||
############################################
|
||||
foreach(PKG ${DEFAULT_PACKAGES} ${OTHER_PACKAGES})
|
||||
foreach(PKG ${DEFAULT_PACKAGES})
|
||||
set(${PKG}_SOURCES_DIR ${LAMMPS_SOURCE_DIR}/${PKG})
|
||||
|
||||
# ignore PKG files which were manually installed in src folder
|
||||
# headers are ignored during RegisterStyles
|
||||
file(GLOB ${PKG}_SOURCES ${${PKG}_SOURCES_DIR}/*.cpp)
|
||||
file(GLOB ${PKG}_HEADERS ${${PKG}_SOURCES_DIR}/*.h)
|
||||
|
||||
foreach(PKG_FILE in ${${PKG}_SOURCES})
|
||||
get_filename_component(FNAME ${PKG_FILE} NAME)
|
||||
list(REMOVE_ITEM LIB_SOURCES ${LAMMPS_SOURCE_DIR}/${FNAME})
|
||||
endforeach()
|
||||
# check for package files in src directory due to old make system
|
||||
DetectBuildSystemConflict(${LAMMPS_SOURCE_DIR} ${${PKG}_SOURCES} ${${PKG}_HEADERS})
|
||||
|
||||
foreach(PKG_FILE in ${${PKG}_HEADERS})
|
||||
get_filename_component(FNAME ${PKG_FILE} NAME)
|
||||
DetectAndRemovePackageHeader(${LAMMPS_SOURCE_DIR}/${FNAME})
|
||||
endforeach()
|
||||
|
||||
if(ENABLE_${PKG})
|
||||
if(PKG_${PKG})
|
||||
# detects styles in package and adds them to global list
|
||||
RegisterStyles(${${PKG}_SOURCES_DIR})
|
||||
|
||||
@ -377,12 +518,23 @@ foreach(PKG ${DEFAULT_PACKAGES} ${OTHER_PACKAGES})
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
# dedicated check for entire contents of accelerator packages
|
||||
foreach(PKG ${ACCEL_PACKAGES})
|
||||
set(${PKG}_SOURCES_DIR ${LAMMPS_SOURCE_DIR}/${PKG})
|
||||
|
||||
file(GLOB ${PKG}_SOURCES ${${PKG}_SOURCES_DIR}/*.cpp)
|
||||
file(GLOB ${PKG}_HEADERS ${${PKG}_SOURCES_DIR}/*.h)
|
||||
|
||||
# check for package files in src directory due to old make system
|
||||
DetectBuildSystemConflict(${LAMMPS_SOURCE_DIR} ${${PKG}_SOURCES} ${${PKG}_HEADERS})
|
||||
endforeach()
|
||||
|
||||
##############################################
|
||||
# add lib sources of (simple) enabled packages
|
||||
############################################
|
||||
foreach(SIMPLE_LIB REAX MEAM POEMS USER-ATC USER-AWPMD USER-COLVARS USER-H5MD
|
||||
USER-QMMM)
|
||||
if(ENABLE_${SIMPLE_LIB})
|
||||
if(PKG_${SIMPLE_LIB})
|
||||
string(REGEX REPLACE "^USER-" "" PKG_LIB "${SIMPLE_LIB}")
|
||||
string(TOLOWER "${PKG_LIB}" PKG_LIB)
|
||||
file(GLOB_RECURSE ${PKG_LIB}_SOURCES ${LAMMPS_LIB_SOURCE_DIR}/${PKG_LIB}/*.F
|
||||
@ -403,40 +555,26 @@ foreach(SIMPLE_LIB REAX MEAM POEMS USER-ATC USER-AWPMD USER-COLVARS USER-H5MD
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
if(ENABLE_USER-AWPMD)
|
||||
if(PKG_USER-AWPMD)
|
||||
target_link_libraries(awpmd ${LAPACK_LIBRARIES})
|
||||
endif()
|
||||
|
||||
if(ENABLE_USER-ATC)
|
||||
if(PKG_USER-ATC)
|
||||
target_link_libraries(atc ${LAPACK_LIBRARIES})
|
||||
endif()
|
||||
|
||||
if(ENABLE_USER-H5MD)
|
||||
if(PKG_USER-H5MD)
|
||||
find_package(HDF5 REQUIRED)
|
||||
target_link_libraries(h5md ${HDF5_LIBRARIES})
|
||||
target_include_directories(h5md PRIVATE ${HDF5_INCLUDE_DIRS})
|
||||
endif()
|
||||
|
||||
if(ENABLE_MEAM AND FC_HAS_NO_SECOND_UNDERSCORE)
|
||||
foreach(FSRC ${meam_SOURCES})
|
||||
string(REGEX REPLACE "^.*\\." "" FEXT "${FSRC}")
|
||||
list(FIND CMAKE_Fortran_SOURCE_FILE_EXTENSIONS "${FEXT}" FINDEX)
|
||||
if(FINDEX GREATER -1)
|
||||
set_property(SOURCE ${FSRC} APPEND PROPERTY COMPILE_FLAGS "-fno-second-underscore")
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
if(ENABLE_REAX AND FC_HAS_NO_SECOND_UNDERSCORE)
|
||||
target_compile_options(reax PRIVATE -fno-second-underscore)
|
||||
endif()
|
||||
|
||||
|
||||
######################################################################
|
||||
# packages which selectively include variants based on enabled styles
|
||||
# e.g. accelerator packages
|
||||
######################################################################
|
||||
if(ENABLE_USER-OMP)
|
||||
if(PKG_USER-OMP)
|
||||
set(USER-OMP_SOURCES_DIR ${LAMMPS_SOURCE_DIR}/USER-OMP)
|
||||
set(USER-OMP_SOURCES ${USER-OMP_SOURCES_DIR}/thr_data.cpp
|
||||
${USER-OMP_SOURCES_DIR}/thr_omp.cpp
|
||||
@ -453,7 +591,7 @@ if(ENABLE_USER-OMP)
|
||||
include_directories(${USER-OMP_SOURCES_DIR})
|
||||
endif()
|
||||
|
||||
if(ENABLE_KOKKOS)
|
||||
if(PKG_KOKKOS)
|
||||
set(LAMMPS_LIB_KOKKOS_SRC_DIR ${LAMMPS_LIB_SOURCE_DIR}/kokkos)
|
||||
set(LAMMPS_LIB_KOKKOS_BIN_DIR ${LAMMPS_LIB_BINARY_DIR}/kokkos)
|
||||
add_definitions(-DLMP_KOKKOS)
|
||||
@ -489,7 +627,7 @@ if(ENABLE_KOKKOS)
|
||||
RegisterNBinStyle(${KOKKOS_PKG_SOURCES_DIR}/nbin_kokkos.h)
|
||||
RegisterNPairStyle(${KOKKOS_PKG_SOURCES_DIR}/npair_kokkos.h)
|
||||
|
||||
if(ENABLE_USER-DPD)
|
||||
if(PKG_USER-DPD)
|
||||
get_property(KOKKOS_PKG_SOURCES GLOBAL PROPERTY KOKKOS_PKG_SOURCES)
|
||||
list(APPEND KOKKOS_PKG_SOURCES ${KOKKOS_PKG_SOURCES_DIR}/npair_ssa_kokkos.cpp)
|
||||
RegisterNPairStyle(${KOKKOS_PKG_SOURCES_DIR}/npair_ssa_kokkos.h)
|
||||
@ -502,7 +640,7 @@ if(ENABLE_KOKKOS)
|
||||
include_directories(${KOKKOS_PKG_SOURCES_DIR})
|
||||
endif()
|
||||
|
||||
if(ENABLE_OPT)
|
||||
if(PKG_OPT)
|
||||
set(OPT_SOURCES_DIR ${LAMMPS_SOURCE_DIR}/OPT)
|
||||
set(OPT_SOURCES)
|
||||
set_property(GLOBAL PROPERTY "OPT_SOURCES" "${OPT_SOURCES}")
|
||||
@ -516,7 +654,34 @@ if(ENABLE_OPT)
|
||||
include_directories(${OPT_SOURCES_DIR})
|
||||
endif()
|
||||
|
||||
if(ENABLE_USER-INTEL)
|
||||
if(PKG_USER-INTEL)
|
||||
if(NOT DEVELOPER_MODE)
|
||||
if(NOT CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
|
||||
message(FATAL_ERROR "USER-INTEL is only useful together with intel compiler")
|
||||
endif()
|
||||
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 16)
|
||||
message(FATAL_ERROR "USER-INTEL is needed at least 2016 intel compiler, found ${CMAKE_CXX_COMPILER_VERSION}")
|
||||
endif()
|
||||
endif()
|
||||
option(INJECT_KNL_FLAG "Inject flags for KNL build" OFF)
|
||||
if(INJECT_KNL_FLAG)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -xMIC-AVX512")
|
||||
endif()
|
||||
option(INJECT_INTEL_FLAG "Inject OMG fast flags for USER-INTEL" ON)
|
||||
if(INJECT_INTEL_FLAG AND CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
|
||||
if(CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 17.3 OR CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 17.4)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -xCOMMON-AVX512")
|
||||
else()
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -xHost")
|
||||
endif()
|
||||
include(CheckCXXCompilerFlag)
|
||||
foreach(_FLAG -qopenmp -qno-offload -fno-alias -ansi-alias -restrict -DLMP_INTEL_USELRT -DLMP_USE_MKL_RNG -O2 "-fp-model fast=2" -no-prec-div -qoverride-limits -qopt-zmm-usage=high)
|
||||
check_cxx_compiler_flag("${__FLAG}" COMPILER_SUPPORTS${_FLAG})
|
||||
if(COMPILER_SUPPORTS${_FLAG})
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${_FLAG}")
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
set(USER-INTEL_SOURCES_DIR ${LAMMPS_SOURCE_DIR}/USER-INTEL)
|
||||
set(USER-INTEL_SOURCES ${USER-INTEL_SOURCES_DIR}/intel_preprocess.h
|
||||
${USER-INTEL_SOURCES_DIR}/intel_buffers.h
|
||||
@ -540,7 +705,10 @@ if(ENABLE_USER-INTEL)
|
||||
include_directories(${USER-INTEL_SOURCES_DIR})
|
||||
endif()
|
||||
|
||||
if(ENABLE_GPU)
|
||||
if(PKG_GPU)
|
||||
if (CMAKE_VERSION VERSION_LESS "3.1")
|
||||
message(FATAL_ERROR "For the GPU package you need at least cmake-3.1")
|
||||
endif()
|
||||
set(GPU_SOURCES_DIR ${LAMMPS_SOURCE_DIR}/GPU)
|
||||
set(GPU_SOURCES ${GPU_SOURCES_DIR}/gpu_extra.h
|
||||
${GPU_SOURCES_DIR}/fix_gpu.h
|
||||
@ -563,8 +731,7 @@ if(ENABLE_GPU)
|
||||
endif()
|
||||
option(CUDPP_OPT "Enable CUDPP_OPT" ON)
|
||||
|
||||
set(GPU_ARCH "sm_30" CACHE STRING "LAMMPS GPU CUDA SM architecture")
|
||||
set_property(CACHE GPU_ARCH PROPERTY STRINGS sm_10 sm_20 sm_30 sm_60)
|
||||
set(GPU_ARCH "sm_30" CACHE STRING "LAMMPS GPU CUDA SM architecture (e.g. sm_60)")
|
||||
|
||||
file(GLOB GPU_LIB_CU ${LAMMPS_LIB_SOURCE_DIR}/gpu/*.cu ${CMAKE_CURRENT_SOURCE_DIR}/gpu/*.cu)
|
||||
list(REMOVE_ITEM GPU_LIB_CU ${LAMMPS_LIB_SOURCE_DIR}/gpu/lal_pppm.cu)
|
||||
@ -637,7 +804,7 @@ if(ENABLE_GPU)
|
||||
add_library(gpu STATIC ${GPU_LIB_SOURCES})
|
||||
target_link_libraries(gpu ${OpenCL_LIBRARIES})
|
||||
target_include_directories(gpu PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/gpu ${OpenCL_INCLUDE_DIRS})
|
||||
target_compile_definitions(gpu PRIVATE -D_${GPU_PREC} -DMPI_GERYON -DUCL_NO_EXIT)
|
||||
target_compile_definitions(gpu PRIVATE -D_${GPU_PREC} -D${OCL_TUNE}_OCL -DMPI_GERYON -DUCL_NO_EXIT)
|
||||
target_compile_definitions(gpu PRIVATE -DUSE_OPENCL)
|
||||
|
||||
list(APPEND LAMMPS_LINK_LIBS gpu)
|
||||
@ -673,60 +840,157 @@ GenerateStyleHeaders(${LAMMPS_STYLE_HEADERS_DIR})
|
||||
include_directories(${LAMMPS_SOURCE_DIR})
|
||||
include_directories(${LAMMPS_STYLE_HEADERS_DIR})
|
||||
|
||||
######################################
|
||||
# Generate lmpinstalledpkgs.h
|
||||
######################################
|
||||
set(temp "#ifndef LMP_INSTALLED_PKGS_H\n#define LMP_INSTALLED_PKGS_H\n")
|
||||
set(temp "${temp}const char * LAMMPS_NS::LAMMPS::installed_packages[] = {\n")
|
||||
foreach(PKG ${DEFAULT_PACKAGES} ${ACCEL_PACKAGES} ${OTHER_PACKAGES})
|
||||
if(PKG_${PKG})
|
||||
set(temp "${temp} \"${PKG}\",\n")
|
||||
endif()
|
||||
endforeach()
|
||||
set(temp "${temp} NULL\n};\n#endif\n\n")
|
||||
message(STATUS "Generating lmpinstalledpkgs.h...")
|
||||
file(WRITE "${LAMMPS_STYLE_HEADERS_DIR}/lmpinstalledpkgs.h.tmp" "${temp}" )
|
||||
execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different "${LAMMPS_STYLE_HEADERS_DIR}/lmpinstalledpkgs.h.tmp" "${LAMMPS_STYLE_HEADERS_DIR}/lmpinstalledpkgs.h")
|
||||
|
||||
###########################################
|
||||
# Actually add executable and lib to build
|
||||
############################################
|
||||
add_library(lammps ${LIB_SOURCES})
|
||||
target_link_libraries(lammps ${LAMMPS_LINK_LIBS})
|
||||
if(LAMMPS_DEPS)
|
||||
add_dependencies(lammps ${LAMMPS_DEPS})
|
||||
get_property(LANGUAGES GLOBAL PROPERTY ENABLED_LANGUAGES)
|
||||
list (FIND LANGUAGES "Fortran" _index)
|
||||
if (${_index} GREATER -1)
|
||||
list(APPEND LAMMPS_LINK_LIBS ${CMAKE_Fortran_IMPLICIT_LINK_LIBRARIES})
|
||||
endif()
|
||||
set_target_properties(lammps PROPERTIES OUTPUT_NAME lammps${LAMMPS_MACHINE})
|
||||
if(BUILD_SHARED_LIBS)
|
||||
set_target_properties(lammps PROPERTIES SOVERSION ${SOVERSION})
|
||||
install(TARGETS lammps LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
install(FILES ${LAMMPS_SOURCE_DIR}/library.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/lammps)
|
||||
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)
|
||||
list(REMOVE_DUPLICATES LAMMPS_LINK_LIBS)
|
||||
if(BUILD_LIB)
|
||||
add_library(lammps ${LIB_SOURCES})
|
||||
target_link_libraries(lammps ${LAMMPS_LINK_LIBS})
|
||||
if(LAMMPS_DEPS)
|
||||
add_dependencies(lammps ${LAMMPS_DEPS})
|
||||
endif()
|
||||
set_target_properties(lammps PROPERTIES OUTPUT_NAME lammps${LIB_SUFFIX})
|
||||
if(BUILD_SHARED_LIBS)
|
||||
set_target_properties(lammps PROPERTIES SOVERSION ${SOVERSION})
|
||||
install(TARGETS lammps LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
install(FILES ${LAMMPS_SOURCE_DIR}/library.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/lammps)
|
||||
configure_file(pkgconfig/liblammps.pc.in ${CMAKE_CURRENT_BINARY_DIR}/liblammps${LIB_SUFFIX}.pc @ONLY)
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/liblammps${LIB_SUFFIX}.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
|
||||
endif()
|
||||
else()
|
||||
list(APPEND LMP_SOURCES ${LIB_SOURCES})
|
||||
endif()
|
||||
|
||||
add_executable(lmp ${LMP_SOURCES})
|
||||
target_link_libraries(lmp lammps)
|
||||
set_target_properties(lmp PROPERTIES OUTPUT_NAME lmp${LAMMPS_MACHINE})
|
||||
install(TARGETS lmp DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||
if(ENABLE_TESTING)
|
||||
add_test(ShowHelp lmp${LAMMPS_MACHINE} -help)
|
||||
if(BUILD_EXE)
|
||||
add_executable(lmp ${LMP_SOURCES})
|
||||
if(BUILD_LIB)
|
||||
target_link_libraries(lmp lammps)
|
||||
else()
|
||||
target_link_libraries(lmp ${LAMMPS_LINK_LIBS})
|
||||
if(LAMMPS_DEPS)
|
||||
add_dependencies(lmp ${LAMMPS_DEPS})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set_target_properties(lmp PROPERTIES OUTPUT_NAME lmp${LAMMPS_MACHINE})
|
||||
install(TARGETS lmp DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||
if(ENABLE_TESTING)
|
||||
add_test(ShowHelp lmp${LAMMPS_MACHINE} -help)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
##################################
|
||||
###############################################################################
|
||||
# Testing
|
||||
#
|
||||
# Requires latest gcovr (for GCC 8.1 support):#
|
||||
# pip install git+https://github.com/gcovr/gcovr.git
|
||||
###############################################################################
|
||||
if(ENABLE_COVERAGE)
|
||||
find_program(GCOVR_BINARY gcovr)
|
||||
find_package_handle_standard_args(GCOVR DEFAULT_MSG GCOVR_BINARY)
|
||||
|
||||
if(GCOVR_FOUND)
|
||||
get_filename_component(ABSOLUTE_LAMMPS_SOURCE_DIR ${LAMMPS_SOURCE_DIR} ABSOLUTE)
|
||||
|
||||
add_custom_target(
|
||||
gen_coverage_xml
|
||||
COMMAND ${GCOVR_BINARY} -s -x -r ${ABSOLUTE_LAMMPS_SOURCE_DIR} --object-directory=${CMAKE_BINARY_DIR} -o coverage.xml
|
||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
||||
COMMENT "Generating XML Coverage Report..."
|
||||
)
|
||||
|
||||
add_custom_target(
|
||||
gen_coverage_html
|
||||
COMMAND ${GCOVR_BINARY} -s --html --html-details -r ${ABSOLUTE_LAMMPS_SOURCE_DIR} --object-directory=${CMAKE_BINARY_DIR} -o coverage.html
|
||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
||||
COMMENT "Generating HTML Coverage Report..."
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
###############################################################################
|
||||
# Print package summary
|
||||
##################################
|
||||
foreach(PKG ${DEFAULT_PACKAGES} ${OTHER_PACKAGES} ${ACCEL_PACKAGES})
|
||||
if(ENABLE_${PKG})
|
||||
###############################################################################
|
||||
foreach(PKG ${DEFAULT_PACKAGES} ${ACCEL_PACKAGES})
|
||||
if(PKG_${PKG})
|
||||
message(STATUS "Building package: ${PKG}")
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
string(TOUPPER "${CMAKE_BUILD_TYPE}" BTYPE)
|
||||
get_directory_property(CPPFLAGS DIRECTORY ${CMAKE_SOURCE_DIR} COMPILE_DEFINITIONS)
|
||||
include(FeatureSummary)
|
||||
feature_summary(DESCRIPTION "The following packages have been found:" WHAT PACKAGES_FOUND)
|
||||
message(STATUS "<<< Build configuration >>>
|
||||
Build type ${CMAKE_BUILD_TYPE}
|
||||
Install path ${CMAKE_INSTALL_PREFIX}
|
||||
Compilers and Flags:
|
||||
C++ Compiler ${CMAKE_CXX_COMPILER}
|
||||
Type ${CMAKE_CXX_COMPILER_ID}
|
||||
C++ Flags ${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_${BTYPE}}")
|
||||
Version ${CMAKE_CXX_COMPILER_VERSION}
|
||||
C++ Flags ${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_${BTYPE}}
|
||||
Defines ${CPPFLAGS}")
|
||||
get_property(LANGUAGES GLOBAL PROPERTY ENABLED_LANGUAGES)
|
||||
if(LANGUAGES MATCHES ".*Fortran.*")
|
||||
list (FIND LANGUAGES "Fortran" _index)
|
||||
if (${_index} GREATER -1)
|
||||
message(STATUS "Fortran Compiler ${CMAKE_Fortran_COMPILER}
|
||||
Type ${CMAKE_Fortran_COMPILER_ID}
|
||||
Version ${CMAKE_Fortran_COMPILER_VERSION}
|
||||
Fortran Flags ${CMAKE_Fortran_FLAGS} ${CMAKE_Fortran_FLAGS_${BTYPE}}")
|
||||
endif()
|
||||
message(STATUS "Linker flags:
|
||||
list (FIND LANGUAGES "C" _index)
|
||||
if (${_index} GREATER -1)
|
||||
message(STATUS "C Compiler ${CMAKE_C_COMPILER}
|
||||
Type ${CMAKE_C_COMPILER_ID}
|
||||
Version ${CMAKE_C_COMPILER_VERSION}
|
||||
C Flags ${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_${BTYPE}}")
|
||||
endif()
|
||||
if(CMAKE_EXE_LINKER_FLAGS)
|
||||
message(STATUS "Linker flags:
|
||||
Executable ${CMAKE_EXE_LINKER_FLAGS}")
|
||||
endif()
|
||||
if(BUILD_SHARED_LIBS)
|
||||
message(STATUS "Shared libries ${CMAKE_SHARED_LINKER_FLAGS}")
|
||||
message(STATUS "Shared libraries ${CMAKE_SHARED_LINKER_FLAGS}")
|
||||
else()
|
||||
message(STATUS "Static libries ${CMAKE_STATIC_LINKER_FLAGS}")
|
||||
message(STATUS "Static libraries ${CMAKE_STATIC_LINKER_FLAGS}")
|
||||
endif()
|
||||
message(STATUS "Link libraries: ${LAMMPS_LINK_LIBS}")
|
||||
|
||||
if(BUILD_MPI)
|
||||
message(STATUS "Using mpi with headers in ${MPI_CXX_INCLUDE_PATH} and ${MPI_CXX_LIBRARIES}")
|
||||
endif()
|
||||
if(PKG_GPU)
|
||||
message(STATUS "GPU Api: ${GPU_API}")
|
||||
if(GPU_API STREQUAL "CUDA")
|
||||
message(STATUS "GPU Arch: ${GPU_ARCH}")
|
||||
elseif(GPU_API STREQUAL "OpenCL")
|
||||
message(STATUS "OCL Tune: ${OCL_TUNE}")
|
||||
endif()
|
||||
message(STATUS "GPU Precision: ${GPU_PREC}")
|
||||
endif()
|
||||
if(PKG_KOKKOS)
|
||||
message(STATUS "Kokkos Arch: ${KOKKOS_ARCH}")
|
||||
endif()
|
||||
if(PKG_KSPACE)
|
||||
message(STATUS "Using ${FFT} as FFT")
|
||||
endif()
|
||||
|
||||
@ -1,22 +0,0 @@
|
||||
# - Find fftw2
|
||||
# Find the native FFTW2 headers and libraries.
|
||||
#
|
||||
# FFTW2_INCLUDE_DIRS - where to find fftw2.h, etc.
|
||||
# FFTW2_LIBRARIES - List of libraries when using fftw2.
|
||||
# FFTW2_FOUND - True if fftw2 found.
|
||||
#
|
||||
|
||||
find_path(FFTW2_INCLUDE_DIR fftw.h)
|
||||
|
||||
find_library(FFTW2_LIBRARY NAMES fftw)
|
||||
|
||||
set(FFTW2_LIBRARIES ${FFTW2_LIBRARY})
|
||||
set(FFTW2_INCLUDE_DIRS ${FFTW2_INCLUDE_DIR})
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
# handle the QUIETLY and REQUIRED arguments and set FFTW2_FOUND to TRUE
|
||||
# if all listed variables are TRUE
|
||||
|
||||
find_package_handle_standard_args(FFTW2 DEFAULT_MSG FFTW2_LIBRARY FFTW2_INCLUDE_DIR)
|
||||
|
||||
mark_as_advanced(FFTW2_INCLUDE_DIR FFTW2_LIBRARY )
|
||||
25
cmake/Modules/FindFFTW3F.cmake
Normal file
@ -0,0 +1,25 @@
|
||||
# - Find fftw3f
|
||||
# Find the native FFTW3F headers and libraries.
|
||||
#
|
||||
# FFTW3F_INCLUDE_DIRS - where to find fftw3f.h, etc.
|
||||
# FFTW3F_LIBRARIES - List of libraries when using fftw3f.
|
||||
# FFTW3F_FOUND - True if fftw3f found.
|
||||
#
|
||||
|
||||
find_package(PkgConfig)
|
||||
|
||||
pkg_check_modules(PC_FFTW3F fftw3f)
|
||||
find_path(FFTW3F_INCLUDE_DIR fftw3.h HINTS ${PC_FFTW3F_INCLUDE_DIRS})
|
||||
|
||||
find_library(FFTW3F_LIBRARY NAMES fftw3f HINTS ${PC_FFTW3F_LIBRARY_DIRS})
|
||||
|
||||
set(FFTW3F_LIBRARIES ${FFTW3F_LIBRARY})
|
||||
set(FFTW3F_INCLUDE_DIRS ${FFTW3F_INCLUDE_DIR})
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
# handle the QUIETLY and REQUIRED arguments and set FFTW3F_FOUND to TRUE
|
||||
# if all listed variables are TRUE
|
||||
|
||||
find_package_handle_standard_args(FFTW3F DEFAULT_MSG FFTW3F_LIBRARY FFTW3F_INCLUDE_DIR)
|
||||
|
||||
mark_as_advanced(FFTW3F_INCLUDE_DIR FFTW3F_LIBRARY )
|
||||
22
cmake/Modules/FindMSCG.cmake
Normal file
@ -0,0 +1,22 @@
|
||||
# - Find mscg
|
||||
# Find the native MSCG headers and libraries.
|
||||
#
|
||||
# MSCG_INCLUDE_DIRS - where to find mscg.h, etc.
|
||||
# MSCG_LIBRARIES - List of libraries when using mscg.
|
||||
# MSCG_FOUND - True if mscg found.
|
||||
#
|
||||
|
||||
find_path(MSCG_INCLUDE_DIR mscg.h PATH_SUFFIXES mscg)
|
||||
|
||||
find_library(MSCG_LIBRARY NAMES mscg)
|
||||
|
||||
set(MSCG_LIBRARIES ${MSCG_LIBRARY})
|
||||
set(MSCG_INCLUDE_DIRS ${MSCG_INCLUDE_DIR})
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
# handle the QUIETLY and REQUIRED arguments and set MSCG_FOUND to TRUE
|
||||
# if all listed variables are TRUE
|
||||
|
||||
find_package_handle_standard_args(MSCG DEFAULT_MSG MSCG_LIBRARY MSCG_INCLUDE_DIR)
|
||||
|
||||
mark_as_advanced(MSCG_INCLUDE_DIR MSCG_LIBRARY )
|
||||
@ -45,14 +45,10 @@ function(FindStyleHeadersExt path style_class extension headers sources)
|
||||
endfunction(FindStyleHeadersExt)
|
||||
|
||||
function(CreateStyleHeader path filename)
|
||||
math(EXPR N "${ARGC}-2")
|
||||
|
||||
set(temp "")
|
||||
if(N GREATER 0)
|
||||
math(EXPR ARG_END "${ARGC}-1")
|
||||
|
||||
foreach(IDX RANGE 2 ${ARG_END})
|
||||
list(GET ARGV ${IDX} FNAME)
|
||||
if(ARGC GREATER 2)
|
||||
list(REMOVE_AT ARGV 0 1)
|
||||
foreach(FNAME ${ARGV})
|
||||
get_filename_component(FNAME ${FNAME} NAME)
|
||||
set(temp "${temp}#include \"${FNAME}\"\n")
|
||||
endforeach()
|
||||
@ -107,35 +103,6 @@ function(RegisterStyles search_path)
|
||||
FindStyleHeaders(${search_path} REGION_CLASS region_ REGION ) # region ) # domain
|
||||
endfunction(RegisterStyles)
|
||||
|
||||
function(RemovePackageHeader headers pkg_header)
|
||||
get_property(hlist GLOBAL PROPERTY ${headers})
|
||||
list(REMOVE_ITEM hlist ${pkg_header})
|
||||
set_property(GLOBAL PROPERTY ${headers} "${hlist}")
|
||||
endfunction(RemovePackageHeader)
|
||||
|
||||
function(DetectAndRemovePackageHeader fname)
|
||||
RemovePackageHeader(ANGLE ${fname})
|
||||
RemovePackageHeader(ATOM_VEC ${fname})
|
||||
RemovePackageHeader(BODY ${fname})
|
||||
RemovePackageHeader(BOND ${fname})
|
||||
RemovePackageHeader(COMMAND ${fname})
|
||||
RemovePackageHeader(COMPUTE ${fname})
|
||||
RemovePackageHeader(DIHEDRAL ${fname})
|
||||
RemovePackageHeader(DUMP ${fname})
|
||||
RemovePackageHeader(FIX ${fname})
|
||||
RemovePackageHeader(IMPROPER ${fname})
|
||||
RemovePackageHeader(INTEGRATE ${fname})
|
||||
RemovePackageHeader(KSPACE ${fname})
|
||||
RemovePackageHeader(MINIMIZE ${fname})
|
||||
RemovePackageHeader(NBIN ${fname})
|
||||
RemovePackageHeader(NPAIR ${fname})
|
||||
RemovePackageHeader(NSTENCIL ${fname})
|
||||
RemovePackageHeader(NTOPO ${fname})
|
||||
RemovePackageHeader(PAIR ${fname})
|
||||
RemovePackageHeader(READER ${fname})
|
||||
RemovePackageHeader(REGION ${fname})
|
||||
endfunction(DetectAndRemovePackageHeader)
|
||||
|
||||
function(RegisterStylesExt search_path extension sources)
|
||||
FindStyleHeadersExt(${search_path} ANGLE_CLASS ${extension} ANGLE ${sources})
|
||||
FindStyleHeadersExt(${search_path} ATOM_CLASS ${extension} ATOM_VEC ${sources})
|
||||
@ -181,3 +148,21 @@ function(GenerateStyleHeaders output_path)
|
||||
GenerateStyleHeader(${output_path} READER reader ) # read_dump
|
||||
GenerateStyleHeader(${output_path} REGION region ) # domain
|
||||
endfunction(GenerateStyleHeaders)
|
||||
|
||||
function(DetectBuildSystemConflict lammps_src_dir)
|
||||
if(ARGC GREATER 1)
|
||||
list(REMOVE_AT ARGV 0)
|
||||
foreach(SRC_FILE ${ARGV})
|
||||
get_filename_component(FILENAME ${SRC_FILE} NAME)
|
||||
if(EXISTS ${lammps_src_dir}/${FILENAME})
|
||||
message(FATAL_ERROR "\n########################################################################\n"
|
||||
"Found package(s) installed by the make-based build system\n"
|
||||
"\n"
|
||||
"Please run\n"
|
||||
"make -C ${lammps_src_dir} no-all purge\n"
|
||||
"to uninstall\n"
|
||||
"########################################################################")
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
endfunction(DetectBuildSystemConflict)
|
||||
|
||||
1660
cmake/README.md
@ -13,6 +13,6 @@ Description: Large-scale Atomic/Molecular Massively Parallel Simulator Library
|
||||
URL: http://lammps.sandia.gov
|
||||
Version:
|
||||
Requires:
|
||||
Libs: -L${libdir} -llammps@LAMMPS_MACHINE@
|
||||
Libs: -L${libdir} -llammps@LIB_SUFFIX@@
|
||||
Libs.private: -lm
|
||||
Cflags: -I${includedir} @LAMMPS_API_DEFINES@
|
||||
|
||||
22
cmake/presets/all_off.cmake
Normal file
@ -0,0 +1,22 @@
|
||||
set(STANDARD_PACKAGES ASPHERE BODY CLASS2 COLLOID COMPRESS CORESHELL DIPOLE GPU
|
||||
GRANULAR KIM KOKKOS KSPACE LATTE MANYBODY MC MEAM MISC
|
||||
MOLECULE MPIIO MSCG OPT PERI POEMS
|
||||
PYTHON QEQ REAX REPLICA RIGID SHOCK SNAP SRD VORONOI)
|
||||
|
||||
set(USER_PACKAGES USER-ATC USER-AWPMD USER-BOCS USER-CGDNA USER-CGSDK USER-COLVARS
|
||||
USER-DIFFRACTION USER-DPD USER-DRUDE USER-EFF USER-FEP USER-H5MD
|
||||
USER-INTEL USER-LB USER-MANIFOLD USER-MEAMC USER-MESO
|
||||
USER-MGPT USER-MISC USER-MOFFF USER-MOLFILE
|
||||
USER-NETCDF USER-OMP USER-PHONON USER-QMMM USER-QTB
|
||||
USER-QUIP USER-REAXC USER-SMD USER-SMTBQ USER-SPH USER-TALLY
|
||||
USER-UEF USER-VTK)
|
||||
|
||||
set(PACKAGES_WITH_LIB COMPRESS GPU KIM KOKKOS LATTE MEAM MPIIO MSCG POEMS PYTHON REAX VORONOI
|
||||
USER-ATC USER-AWPMD USER-COLVARS USER-H5MD USER-LB USER-MOLFILE
|
||||
USER-NETCDF USER-QMMM USER-QUIP USER-SMD USER-VTK)
|
||||
|
||||
set(ALL_PACKAGES ${STANDARD_PACKAGES} ${USER_PACKAGES})
|
||||
|
||||
foreach(PKG ${ALL_PACKAGES})
|
||||
set(PKG_${PKG} OFF CACHE BOOL "" FORCE)
|
||||
endforeach()
|
||||
22
cmake/presets/all_on.cmake
Normal file
@ -0,0 +1,22 @@
|
||||
set(STANDARD_PACKAGES ASPHERE BODY CLASS2 COLLOID COMPRESS CORESHELL DIPOLE GPU
|
||||
GRANULAR KIM KOKKOS KSPACE LATTE MANYBODY MC MEAM MISC
|
||||
MOLECULE MPIIO MSCG OPT PERI POEMS
|
||||
PYTHON QEQ REAX REPLICA RIGID SHOCK SNAP SRD VORONOI)
|
||||
|
||||
set(USER_PACKAGES USER-ATC USER-AWPMD USER-BOCS USER-CGDNA USER-CGSDK USER-COLVARS
|
||||
USER-DIFFRACTION USER-DPD USER-DRUDE USER-EFF USER-FEP USER-H5MD
|
||||
USER-INTEL USER-LB USER-MANIFOLD USER-MEAMC USER-MESO
|
||||
USER-MGPT USER-MISC USER-MOFFF USER-MOLFILE
|
||||
USER-NETCDF USER-OMP USER-PHONON USER-QMMM USER-QTB
|
||||
USER-QUIP USER-REAXC USER-SMD USER-SMTBQ USER-SPH USER-TALLY
|
||||
USER-UEF USER-VTK)
|
||||
|
||||
set(PACKAGES_WITH_LIB COMPRESS GPU KIM KOKKOS LATTE MEAM MPIIO MSCG POEMS PYTHON REAX VORONOI
|
||||
USER-ATC USER-AWPMD USER-COLVARS USER-H5MD USER-LB USER-MOLFILE
|
||||
USER-NETCDF USER-QMMM USER-QUIP USER-SMD USER-VTK)
|
||||
|
||||
set(ALL_PACKAGES ${STANDARD_PACKAGES} ${USER_PACKAGES})
|
||||
|
||||
foreach(PKG ${ALL_PACKAGES})
|
||||
set(PKG_${PKG} ON CACHE BOOL "" FORCE)
|
||||
endforeach()
|
||||
69
cmake/presets/manual_selection.cmake
Normal file
@ -0,0 +1,69 @@
|
||||
set(PKG_ASPHERE OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_BODY OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_CLASS2 OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_COLLOID OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_COMPRESS OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_CORESHELL OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_DIPOLE OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_GPU OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_GRANULAR OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_KIM OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_KOKKOS OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_KSPACE OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_LATTE OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_LIB OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_MANYBODY OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_MC OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_MEAM OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_MISC OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_MOLECULE OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_MPIIO OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_MSCG OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_OPT OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_PERI OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_POEMS OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_PYTHOFF OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_QEQ OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_REAX OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_REPLICA OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_RIGID OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_SHOCK OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_SNAP OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_SRD OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_VOROFFOI OFF CACHE BOOL "" FORCE)
|
||||
|
||||
set(PKG_USER OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_USER-ATC OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_USER-AWPMD OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_USER-BOCS OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_USER-CGDNA OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_USER-CGSDK OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_USER-COLVARS OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_USER-DIFFRACTIOFF OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_USER-DPD OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_USER-DRUDE OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_USER-EFF OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_USER-FEP OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_USER-H5MD OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_USER-INTEL OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_USER-LB OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_USER-MANIFOLD OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_USER-MEAMC OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_USER-MESO OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_USER-MGPT OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_USER-MISC OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_USER-MOFFF OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_USER-MOLFILE OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_USER-NETCDF OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_USER-OMP OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_USER-PHOFFOFF OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_USER-QMMM OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_USER-QTB OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_USER-QUIP OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_USER-REAXC OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_USER-SMD OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_USER-SMTBQ OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_USER-SPH OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_USER-TALLY OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_USER-UEF OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_USER-VTK OFF CACHE BOOL "" FORCE)
|
||||
22
cmake/presets/nolib.cmake
Normal file
@ -0,0 +1,22 @@
|
||||
set(STANDARD_PACKAGES ASPHERE BODY CLASS2 COLLOID COMPRESS CORESHELL DIPOLE GPU
|
||||
GRANULAR KIM KOKKOS KSPACE LATTE MANYBODY MC MEAM MISC
|
||||
MOLECULE MPIIO MSCG OPT PERI POEMS
|
||||
PYTHON QEQ REAX REPLICA RIGID SHOCK SNAP SRD VORONOI)
|
||||
|
||||
set(USER_PACKAGES USER-ATC USER-AWPMD USER-BOCS USER-CGDNA USER-CGSDK USER-COLVARS
|
||||
USER-DIFFRACTION USER-DPD USER-DRUDE USER-EFF USER-FEP USER-H5MD
|
||||
USER-INTEL USER-LB USER-MANIFOLD USER-MEAMC USER-MESO
|
||||
USER-MGPT USER-MISC USER-MOFFF USER-MOLFILE
|
||||
USER-NETCDF USER-OMP USER-PHONON USER-QMMM USER-QTB
|
||||
USER-QUIP USER-REAXC USER-SMD USER-SMTBQ USER-SPH USER-TALLY
|
||||
USER-UEF USER-VTK)
|
||||
|
||||
set(PACKAGES_WITH_LIB COMPRESS GPU KIM KOKKOS LATTE MEAM MPIIO MSCG POEMS PYTHON REAX VORONOI
|
||||
USER-ATC USER-AWPMD USER-COLVARS USER-H5MD USER-LB USER-MOLFILE
|
||||
USER-NETCDF USER-QMMM USER-QUIP USER-SMD USER-VTK)
|
||||
|
||||
set(ALL_PACKAGES ${STANDARD_PACKAGES} ${USER_PACKAGES})
|
||||
|
||||
foreach(PKG ${PACKAGES_WITH_LIB})
|
||||
set(PKG_${PKG} OFF CACHE BOOL "" FORCE)
|
||||
endforeach()
|
||||
22
cmake/presets/std.cmake
Normal file
@ -0,0 +1,22 @@
|
||||
set(STANDARD_PACKAGES ASPHERE BODY CLASS2 COLLOID COMPRESS CORESHELL DIPOLE GPU
|
||||
GRANULAR KIM KOKKOS KSPACE LATTE MANYBODY MC MEAM MISC
|
||||
MOLECULE MPIIO MSCG OPT PERI POEMS
|
||||
PYTHON QEQ REAX REPLICA RIGID SHOCK SNAP SRD VORONOI)
|
||||
|
||||
set(USER_PACKAGES USER-ATC USER-AWPMD USER-BOCS USER-CGDNA USER-CGSDK USER-COLVARS
|
||||
USER-DIFFRACTION USER-DPD USER-DRUDE USER-EFF USER-FEP USER-H5MD
|
||||
USER-INTEL USER-LB USER-MANIFOLD USER-MEAMC USER-MESO
|
||||
USER-MGPT USER-MISC USER-MOFFF USER-MOLFILE
|
||||
USER-NETCDF USER-OMP USER-PHONON USER-QMMM USER-QTB
|
||||
USER-QUIP USER-REAXC USER-SMD USER-SMTBQ USER-SPH USER-TALLY
|
||||
USER-UEF USER-VTK)
|
||||
|
||||
set(PACKAGES_WITH_LIB COMPRESS GPU KIM KOKKOS LATTE MEAM MPIIO MSCG POEMS PYTHON REAX VORONOI
|
||||
USER-ATC USER-AWPMD USER-COLVARS USER-H5MD USER-LB USER-MOLFILE
|
||||
USER-NETCDF USER-QMMM USER-QUIP USER-SMD USER-VTK)
|
||||
|
||||
set(ALL_PACKAGES ${STANDARD_PACKAGES} ${USER_PACKAGES})
|
||||
|
||||
foreach(PKG ${STANDARD_PACKAGES})
|
||||
set(PKG_${PKG} ON CACHE BOOL "" FORCE)
|
||||
endforeach()
|
||||
26
cmake/presets/std_nolib.cmake
Normal file
@ -0,0 +1,26 @@
|
||||
set(STANDARD_PACKAGES ASPHERE BODY CLASS2 COLLOID COMPRESS CORESHELL DIPOLE GPU
|
||||
GRANULAR KIM KOKKOS KSPACE LATTE MANYBODY MC MEAM MISC
|
||||
MOLECULE MPIIO MSCG OPT PERI POEMS
|
||||
PYTHON QEQ REAX REPLICA RIGID SHOCK SNAP SRD VORONOI)
|
||||
|
||||
set(USER_PACKAGES USER-ATC USER-AWPMD USER-BOCS USER-CGDNA USER-CGSDK USER-COLVARS
|
||||
USER-DIFFRACTION USER-DPD USER-DRUDE USER-EFF USER-FEP USER-H5MD
|
||||
USER-INTEL USER-LB USER-MANIFOLD USER-MEAMC USER-MESO
|
||||
USER-MGPT USER-MISC USER-MOFFF USER-MOLFILE
|
||||
USER-NETCDF USER-OMP USER-PHONON USER-QMMM USER-QTB
|
||||
USER-QUIP USER-REAXC USER-SMD USER-SMTBQ USER-SPH USER-TALLY
|
||||
USER-UEF USER-VTK)
|
||||
|
||||
set(PACKAGES_WITH_LIB COMPRESS GPU KIM KOKKOS LATTE MEAM MPIIO MSCG POEMS PYTHON REAX VORONOI
|
||||
USER-ATC USER-AWPMD USER-COLVARS USER-H5MD USER-LB USER-MOLFILE
|
||||
USER-NETCDF USER-QMMM USER-QUIP USER-SMD USER-VTK)
|
||||
|
||||
set(ALL_PACKAGES ${STANDARD_PACKAGES} ${USER_PACKAGES})
|
||||
|
||||
foreach(PKG ${STANDARD_PACKAGES})
|
||||
set(PKG_${PKG} ON CACHE BOOL "" FORCE)
|
||||
endforeach()
|
||||
|
||||
foreach(PKG ${PACKAGES_WITH_LIB})
|
||||
set(PKG_${PKG} OFF CACHE BOOL "" FORCE)
|
||||
endforeach()
|
||||
22
cmake/presets/user.cmake
Normal file
@ -0,0 +1,22 @@
|
||||
set(STANDARD_PACKAGES ASPHERE BODY CLASS2 COLLOID COMPRESS CORESHELL DIPOLE GPU
|
||||
GRANULAR KIM KOKKOS KSPACE LATTE MANYBODY MC MEAM MISC
|
||||
MOLECULE MPIIO MSCG OPT PERI POEMS
|
||||
PYTHON QEQ REAX REPLICA RIGID SHOCK SNAP SRD VORONOI)
|
||||
|
||||
set(USER_PACKAGES USER-ATC USER-AWPMD USER-BOCS USER-CGDNA USER-CGSDK USER-COLVARS
|
||||
USER-DIFFRACTION USER-DPD USER-DRUDE USER-EFF USER-FEP USER-H5MD
|
||||
USER-INTEL USER-LB USER-MANIFOLD USER-MEAMC USER-MESO
|
||||
USER-MGPT USER-MISC USER-MOFFF USER-MOLFILE
|
||||
USER-NETCDF USER-OMP USER-PHONON USER-QMMM USER-QTB
|
||||
USER-QUIP USER-REAXC USER-SMD USER-SMTBQ USER-SPH USER-TALLY
|
||||
USER-UEF USER-VTK)
|
||||
|
||||
set(PACKAGES_WITH_LIB COMPRESS GPU KIM KOKKOS LATTE MEAM MPIIO MSCG POEMS PYTHON REAX VORONOI
|
||||
USER-ATC USER-AWPMD USER-COLVARS USER-H5MD USER-LB USER-MOLFILE
|
||||
USER-NETCDF USER-QMMM USER-QUIP USER-SMD USER-VTK)
|
||||
|
||||
set(ALL_PACKAGES ${STANDARD_PACKAGES} ${USER_PACKAGES})
|
||||
|
||||
foreach(PKG ${USER_PACKAGES})
|
||||
set(PKG_${PKG} ON CACHE BOOL "" FORCE)
|
||||
endforeach()
|
||||
@ -9,6 +9,7 @@ TXT2RST = $(VENV)/bin/txt2rst
|
||||
ANCHORCHECK = $(VENV)/bin/doc_anchor_check
|
||||
|
||||
PYTHON = $(shell which python3)
|
||||
VIRTUALENV = virtualenv
|
||||
HAS_PYTHON3 = NO
|
||||
HAS_VIRTUALENV = NO
|
||||
|
||||
@ -16,7 +17,13 @@ ifeq ($(shell which python3 >/dev/null 2>&1; echo $$?), 0)
|
||||
HAS_PYTHON3 = YES
|
||||
endif
|
||||
|
||||
ifeq ($(shell which virtualenv-3 >/dev/null 2>&1; echo $$?), 0)
|
||||
VIRTUALENV = virtualenv-3
|
||||
HAS_VIRTUALENV = YES
|
||||
endif
|
||||
|
||||
ifeq ($(shell which virtualenv >/dev/null 2>&1; echo $$?), 0)
|
||||
VIRTUALENV = virtualenv
|
||||
HAS_VIRTUALENV = YES
|
||||
endif
|
||||
|
||||
@ -158,7 +165,7 @@ $(VENV):
|
||||
@if [ "$(HAS_PYTHON3)" == "NO" ] ; then echo "Python3 was not found! Please check README.md for further instructions" 1>&2; exit 1; fi
|
||||
@if [ "$(HAS_VIRTUALENV)" == "NO" ] ; then echo "virtualenv was not found! Please check README.md for further instructions" 1>&2; exit 1; fi
|
||||
@( \
|
||||
virtualenv -p $(PYTHON) $(VENV); \
|
||||
$(VIRTUALENV) -p $(PYTHON) $(VENV); \
|
||||
. $(VENV)/bin/activate; \
|
||||
pip install Sphinx; \
|
||||
pip install sphinxcontrib-images; \
|
||||
|
||||
@ -449,15 +449,15 @@ Writing fixes is a flexible way of extending LAMMPS. Users can
|
||||
implement many things using fixes:
|
||||
|
||||
\begin{itemize}
|
||||
\item changing particles attributes (positions, velocities, forces, etc.).
|
||||
\item changing particles attributes (positions, velocities, forces, etc.).
|
||||
Example: FixFreeze.
|
||||
\item reading/writing data. Example: FixRestart.
|
||||
\item implementing boundary conditions. Example: FixWall.
|
||||
\item saving information about particles for future use (previous positions,
|
||||
\item saving information about particles for future use (previous positions,
|
||||
for instance). Example: FixStoreState.
|
||||
\end{itemize}
|
||||
|
||||
All fixes are derived from class Fix and must have constructor with the
|
||||
All fixes are derived from class Fix and must have constructor with the
|
||||
signature: FixMine(class LAMMPS *, int, char **).
|
||||
|
||||
Every fix must be registered in LAMMPS by writing the following lines
|
||||
@ -478,7 +478,7 @@ included in the file "style\_fix.h". In case if you use LAMMPS make,
|
||||
this file is generated automatically - all files starting with prefix
|
||||
fix\_ are included, so call your header the same way. Otherwise, don<6F>t
|
||||
forget to add your include into "style\_fix.h".
|
||||
|
||||
|
||||
Let's write a simple fix which will print average velocity at the end
|
||||
of each timestep. First of all, implement a constructor:
|
||||
|
||||
@ -487,11 +487,11 @@ of each timestep. First of all, implement a constructor:
|
||||
FixPrintVel::FixPrintVel(LAMMPS *lmp, int narg, char **arg)
|
||||
: Fix(lmp, narg, arg)
|
||||
{
|
||||
if (narg < 4)
|
||||
if (narg < 4)
|
||||
error->all(FLERR,"Illegal fix print command");
|
||||
|
||||
|
||||
nevery = atoi(arg[3]);
|
||||
if (nevery <= 0)
|
||||
if (nevery <= 0)
|
||||
error->all(FLERR,"Illegal fix print command");
|
||||
}
|
||||
\end{verbatim}
|
||||
@ -545,7 +545,7 @@ void FixPrintVel::end_of_step()
|
||||
{
|
||||
// for add3, scale3
|
||||
using namespace MathExtra;
|
||||
|
||||
|
||||
double** v = atom->v;
|
||||
int nlocal = atom->nlocal;
|
||||
double localAvgVel[4]; // 4th element for particles count
|
||||
@ -559,7 +559,7 @@ void FixPrintVel::end_of_step()
|
||||
MPI_Allreduce(localAvgVel, globalAvgVel, 4, MPI_DOUBLE, MPI_SUM, world);
|
||||
scale3(1.0 / globalAvgVel[3], globalAvgVel);
|
||||
if (comm->me == 0) {
|
||||
printf("\%e, \%e, \%e\n",
|
||||
printf("\%e, \%e, \%e\n",
|
||||
globalAvgVel[0], globalAvgVel[1], globalAvgVel[2]);
|
||||
}
|
||||
}
|
||||
@ -607,14 +607,15 @@ this situation there are several methods which should be implemented:
|
||||
|
||||
\begin{itemize}
|
||||
\item \verb|double memory_usage| - return how much memory fix uses
|
||||
\item \verb|void grow_arrays(int)| - do reallocation of the per particle arrays
|
||||
\item \verb|void grow_arrays(int)| - do reallocation of the per particle arrays
|
||||
in your fix
|
||||
\item \verb|void copy_arrays(int i, int j)| - copy i-th per-particle information
|
||||
to j-th. Used when atoms sorting is performed
|
||||
\item \verb|void copy_arrays(int i, int j, int delflag)| - copy i-th per-particle
|
||||
information to j-th. Used when atoms sorting is performed. if delflag is set
|
||||
and atom j owns a body, move the body information to atom i.
|
||||
\item \verb|void set_arrays(int i)| - sets i-th particle related information to zero
|
||||
\end{itemize}
|
||||
|
||||
Note, that if your class implements these methods, it must call add calls of
|
||||
Note, that if your class implements these methods, it must call add calls of
|
||||
add\_callback and delete\_callback to constructor and destructor:
|
||||
|
||||
\begin{center}
|
||||
@ -654,7 +655,7 @@ void FixSavePos::grow_arrays(int nmax)
|
||||
memory->grow(this->x, nmax, 3, "FixSavePos:x");
|
||||
}
|
||||
|
||||
void FixSavePos::copy_arrays(int i, int j)
|
||||
void FixSavePos::copy_arrays(int i, int j, int delflag)
|
||||
{
|
||||
memcpy(this->x[j], this->x[i], sizeof(double) * 3);
|
||||
}
|
||||
@ -670,7 +671,7 @@ int FixSavePos::pack_exchange(int i, double *buf)
|
||||
buf[m++] = x[i][0];
|
||||
buf[m++] = x[i][1];
|
||||
buf[m++] = x[i][2];
|
||||
|
||||
|
||||
return m;
|
||||
}
|
||||
|
||||
|
||||
BIN
doc/src/Eqs/dihedral_table_cut.jpg
Normal file
|
After Width: | Height: | Size: 30 KiB |
11
doc/src/Eqs/dihedral_table_cut.tex
Normal file
@ -0,0 +1,11 @@
|
||||
\documentclass[12pt]{article}
|
||||
\pagestyle{empty}
|
||||
\begin{document}
|
||||
|
||||
\begin{eqnarray*}
|
||||
f(\theta) & = & K \qquad\qquad\qquad\qquad\qquad\qquad \theta < \theta_1 \\
|
||||
f(\theta) & = & K \left(1-\frac{(\theta - \theta_1)^2}{(\theta_2 - \theta_1)^2}\right) \qquad \theta_1 < \theta < \theta_2
|
||||
\end{eqnarray*}
|
||||
|
||||
\end{document}
|
||||
|
||||
BIN
doc/src/Eqs/fix_integration_spin_stdecomposition.jpg
Normal file
|
After Width: | Height: | Size: 50 KiB |
40
doc/src/Eqs/fix_integration_spin_stdecomposition.tex
Normal file
@ -0,0 +1,40 @@
|
||||
\documentclass[preview]{standalone}
|
||||
\usepackage{varwidth}
|
||||
\usepackage[utf8x]{inputenc}
|
||||
\usepackage{amsmath,amssymb,amsthm,bm,tikz}
|
||||
\usetikzlibrary{automata,arrows,shapes,snakes}
|
||||
\begin{document}
|
||||
\begin{varwidth}{50in}
|
||||
\begin{tikzpicture}
|
||||
|
||||
%Global
|
||||
\node (v1) at (0,6.0) [draw,thick,minimum width=0.2cm,minimum height=0.2cm] { $\bm{v} \leftarrow \bm{v}+L_v.\Delta t/2$ };
|
||||
\node (s1) at (0,4.5) [draw,thick,minimum width=0.2cm,minimum height=0.2cm] { $\bm{s} \leftarrow \bm{s}+L_s.\Delta t/2$ };
|
||||
\node (r) at (0,3.0) [draw,thick,minimum width=0.2cm,minimum height=0.2cm] { $\bm{r} \leftarrow \bm{r}+L_r.\Delta t$ };
|
||||
\node (s2) at (0,1.5) [draw,thick,minimum width=0.2cm,minimum height=0.2cm] { $\bm{s} \leftarrow \bm{s}+L_s.\Delta t/2$ };
|
||||
\node (v2) at (0,0.0) [draw,thick,minimum width=0.2cm,minimum height=0.2cm] { $\bm{v} \leftarrow \bm{v}+L_v.\Delta t/2$ };
|
||||
|
||||
\draw[line width=2pt, ->] (v1) -- (s1);
|
||||
\draw[line width=2pt, ->] (s1) -- (r);
|
||||
\draw[line width=2pt, ->] (r) -- (s2);
|
||||
\draw[line width=2pt, ->] (s2) -- (v2);
|
||||
|
||||
%Spin
|
||||
\node (s01) at (6,6.0) [draw,thick,minimum width=0.2cm,minimum height=0.2cm] {$\bm{s}_0 \leftarrow \bm{s}_0+L_{s_0}.\Delta t/4$ };
|
||||
\node (sN1) at (6,4.5) [draw,thick,minimum width=0.2cm,minimum height=0.2cm] {$\bm{s}_{\rm N-1}\leftarrow\bm{s}_{\rm N-1}+L_{s_{\rm N-1}}.\Delta t/4$};
|
||||
\node (sN) at (6,3.0) [draw,thick,minimum width=0.2cm,minimum height=0.2cm] {$\bm{s}_{\rm N} \leftarrow \bm{s}_{\rm N}+L_{s_{\rm N}}.\Delta t/2$ };
|
||||
\node (sN2) at (6,1.5) [draw,thick,minimum width=0.2cm,minimum height=0.2cm] {$\bm{s}_{\rm N-1}\leftarrow\bm{s}_{\rm N-1}+L_{s_{\rm N-1}}.\Delta t/4$};
|
||||
\node (s02) at (6,0.0) [draw,thick,minimum width=0.2cm,minimum height=0.2cm] {$\bm{s}_0 \leftarrow \bm{s}_0+L_{s_0}.\Delta t/4$ };
|
||||
|
||||
\draw[line width=2pt,dashed, ->] (s01) -- (sN1);
|
||||
\draw[line width=2pt, ->] (sN1) -- (sN);
|
||||
\draw[line width=2pt, ->] (sN) -- (sN2);
|
||||
\draw[line width=2pt,dashed, ->] (sN2) -- (s02);
|
||||
|
||||
%from Global to Spin
|
||||
\draw[line width=2pt, dashed, ->] (s1) -- (s01.west);
|
||||
\draw[line width=2pt, dashed, ->] (s1) -- (s02.west);
|
||||
|
||||
\end{tikzpicture}
|
||||
\end{varwidth}
|
||||
\end{document}
|
||||
BIN
doc/src/Eqs/fix_langevin_spin_sLLG.jpg
Normal file
|
After Width: | Height: | Size: 8.9 KiB |
14
doc/src/Eqs/fix_langevin_spin_sLLG.tex
Normal file
@ -0,0 +1,14 @@
|
||||
\documentclass[preview]{standalone}
|
||||
\usepackage{varwidth}
|
||||
\usepackage[utf8x]{inputenc}
|
||||
\usepackage{amsmath, amssymb, graphics, setspace}
|
||||
|
||||
\begin{document}
|
||||
\begin{varwidth}{50in}
|
||||
\begin{equation}
|
||||
\frac{d \vec{s}_{i}}{dt} = \frac{1}{\left(1+\lambda^2 \right)} \left( \left(
|
||||
\vec{\omega}_{i} +\vec{\eta} \right) \times \vec{s}_{i} + \lambda\, \vec{s}_{i}
|
||||
\times\left( \vec{\omega}_{i} \times\vec{s}_{i} \right) \right), \nonumber
|
||||
\end{equation}
|
||||
\end{varwidth}
|
||||
\end{document}
|
||||
BIN
doc/src/Eqs/force_spin_aniso.jpg
Normal file
|
After Width: | Height: | Size: 5.9 KiB |
11
doc/src/Eqs/force_spin_aniso.tex
Normal file
@ -0,0 +1,11 @@
|
||||
\documentclass[preview]{standalone}
|
||||
\usepackage{varwidth}
|
||||
\usepackage[utf8x]{inputenc}
|
||||
\usepackage{amsmath,amssymb,amsthm,bm}
|
||||
\begin{document}
|
||||
\begin{varwidth}{50in}
|
||||
\begin{equation}
|
||||
\bm{H}_{aniso} = -\sum_{{ i}=1}^{N} K_{an}(\bm{r}_{i})\, \left( \vec{s}_{i} \cdot \vec{n}_{i} \right)^2, \nonumber
|
||||
\end{equation}
|
||||
\end{varwidth}
|
||||
\end{document}
|
||||
BIN
doc/src/Eqs/force_spin_zeeman.jpg
Normal file
|
After Width: | Height: | Size: 6.4 KiB |
11
doc/src/Eqs/force_spin_zeeman.tex
Normal file
@ -0,0 +1,11 @@
|
||||
\documentclass[preview]{standalone}
|
||||
\usepackage{varwidth}
|
||||
\usepackage[utf8x]{inputenc}
|
||||
\usepackage{amsmath,amssymb,amsthm,bm}
|
||||
\begin{document}
|
||||
\begin{varwidth}{50in}
|
||||
\begin{equation}
|
||||
\bm{H}_{zeeman} = -\mu_{B}\mu_0\sum_{i=0}^{N}g_{i} \vec{s}_{i} \cdot \vec{H}_{ext} \nonumber
|
||||
\end{equation}
|
||||
\end{varwidth}
|
||||
\end{document}
|
||||
BIN
doc/src/Eqs/pair_entropy.jpg
Normal file
|
After Width: | Height: | Size: 8.7 KiB |
10
doc/src/Eqs/pair_entropy.tex
Normal file
@ -0,0 +1,10 @@
|
||||
\documentclass[12pt]{article}
|
||||
|
||||
\begin{document}
|
||||
\thispagestyle{empty}
|
||||
|
||||
$$
|
||||
s_S^i=-2\pi\rho k_B \int\limits_0^{r_m} \left [ g(r) \ln g(r) - g(r) + 1 \right ] r^2 dr ,
|
||||
$$
|
||||
|
||||
\end{document}
|
||||
BIN
doc/src/Eqs/pair_entropy2.jpg
Normal file
|
After Width: | Height: | Size: 8.3 KiB |
10
doc/src/Eqs/pair_entropy2.tex
Normal file
@ -0,0 +1,10 @@
|
||||
\documentclass[12pt]{article}
|
||||
|
||||
\begin{document}
|
||||
\thispagestyle{empty}
|
||||
|
||||
$$
|
||||
g_m^i(r) = \frac{1}{4 \pi \rho r^2} \sum\limits_{j} \frac{1}{\sqrt{2 \pi \sigma^2}} e^{-(r-r_{ij})^2/(2\sigma^2)} ,
|
||||
$$
|
||||
|
||||
\end{document}
|
||||
BIN
doc/src/Eqs/pair_entropy3.jpg
Normal file
|
After Width: | Height: | Size: 5.6 KiB |
10
doc/src/Eqs/pair_entropy3.tex
Normal file
@ -0,0 +1,10 @@
|
||||
\documentclass[12pt]{article}
|
||||
|
||||
\begin{document}
|
||||
\thispagestyle{empty}
|
||||
|
||||
$$
|
||||
\bar{s}_S^i = \frac{\sum_j s_S^j + s_S^i}{N + 1} ,
|
||||
$$
|
||||
|
||||
\end{document}
|
||||
BIN
doc/src/Eqs/pair_spin_dmi_interaction.jpg
Normal file
|
After Width: | Height: | Size: 6.2 KiB |
16
doc/src/Eqs/pair_spin_dmi_interaction.tex
Normal file
@ -0,0 +1,16 @@
|
||||
\documentclass[preview]{standalone}
|
||||
\usepackage{varwidth}
|
||||
\usepackage[utf8x]{inputenc}
|
||||
\usepackage{amsmath,amssymb,amsthm,bm}
|
||||
\begin{document}
|
||||
\begin{varwidth}{50in}
|
||||
\begin{equation}
|
||||
\bm{H}_{dm} = -\sum_{{ i,j}=1,i\neq j}^{N}
|
||||
\left( \vec{e}_{ij} \times \vec{D} \right)
|
||||
\cdot\left(\vec{s}_{i}\times \vec{s}_{j}\right),
|
||||
\nonumber
|
||||
\end{equation}
|
||||
\end{varwidth}
|
||||
\end{document}
|
||||
\vec{D}\left(r_{ij}\right)
|
||||
{\rm ~and~} \vec{D}\left(r_{ij}\right) = \vec{e}_{ij} \times \vec{D}
|
||||
BIN
doc/src/Eqs/pair_spin_exchange_forces.jpg
Normal file
|
After Width: | Height: | Size: 13 KiB |
14
doc/src/Eqs/pair_spin_exchange_forces.tex
Normal file
@ -0,0 +1,14 @@
|
||||
\documentclass[preview]{standalone}
|
||||
\usepackage{varwidth}
|
||||
\usepackage[utf8x]{inputenc}
|
||||
\usepackage{amsmath,amssymb,amsthm,bm}
|
||||
\begin{document}
|
||||
\begin{varwidth}{50in}
|
||||
\begin{equation}
|
||||
\vec{F}^{i} = \sum_{j}^{Neighbor} \frac{\partial {J} \left(r_{ij} \right)}{
|
||||
\partial r_{ij}} \left( \vec{s}_{i}\cdot \vec{s}_{j} \right) \vec{r}_{ij}
|
||||
~~{\rm and}~~ \vec{\omega}^{i} = \frac{1}{\hbar} \sum_{j}^{Neighbor} {J}
|
||||
\left(r_{ij} \right)\,\vec{s}_{j} \nonumber
|
||||
\end{equation}
|
||||
\end{varwidth}
|
||||
\end{document}
|
||||
BIN
doc/src/Eqs/pair_spin_exchange_function.jpg
Normal file
|
After Width: | Height: | Size: 10 KiB |
13
doc/src/Eqs/pair_spin_exchange_function.tex
Normal file
@ -0,0 +1,13 @@
|
||||
\documentclass[preview]{standalone}
|
||||
\usepackage{varwidth}
|
||||
\usepackage[utf8x]{inputenc}
|
||||
\usepackage{amsmath, amssymb, graphics, setspace}
|
||||
|
||||
\begin{document}
|
||||
\begin{varwidth}{50in}
|
||||
\begin{equation}
|
||||
{J}\left( r_{ij} \right) = 4 a \left( \frac{r_{ij}}{d} \right)^2 \left( 1 - b \left( \frac{r_{ij}}{d} \right)^2 \right) e^{-\left( \frac{r_{ij}}{d}
|
||||
\right)^2 }\Theta (R_c - r_{ij}) \nonumber
|
||||
\end{equation}
|
||||
\end{varwidth}
|
||||
\end{document}
|
||||
BIN
doc/src/Eqs/pair_spin_exchange_interaction.jpg
Normal file
|
After Width: | Height: | Size: 6.5 KiB |
11
doc/src/Eqs/pair_spin_exchange_interaction.tex
Normal file
@ -0,0 +1,11 @@
|
||||
\documentclass[preview]{standalone}
|
||||
\usepackage{varwidth}
|
||||
\usepackage[utf8x]{inputenc}
|
||||
\usepackage{amsmath,amssymb,amsthm,bm}
|
||||
\begin{document}
|
||||
\begin{varwidth}{50in}
|
||||
\begin{equation}
|
||||
\bm{H}_{exchange} ~=~ -\sum_{i,j,i\neq j}^{N} {J} \left(r_{ij} \right)\, \vec{s}_{i}\cdot \vec{s}_{j} \nonumber
|
||||
\end{equation}
|
||||
\end{varwidth}
|
||||
\end{document}
|
||||
BIN
doc/src/Eqs/pair_spin_me_forces.jpg
Normal file
|
After Width: | Height: | Size: 13 KiB |
13
doc/src/Eqs/pair_spin_me_forces.tex
Normal file
@ -0,0 +1,13 @@
|
||||
\documentclass[preview]{standalone}
|
||||
\usepackage{varwidth}
|
||||
\usepackage[utf8x]{inputenc}
|
||||
\usepackage{amsmath,amssymb,amsthm,bm}
|
||||
\begin{document}
|
||||
\begin{varwidth}{50in}
|
||||
\begin{equation}
|
||||
\vec{F}^{i} = -\sum_{j}^{Neighbor} \left( \vec{s}_{i}\times \vec{s}_{j} \right)
|
||||
\times \vec{E} ~~{\rm and}~~ \vec{\omega}^{i} = -\frac{1}{\hbar}
|
||||
\sum_{j}^{Neighbor} \vec{s}_j \times \left(\vec{E}\times r_{ij} \right),\nonumber
|
||||
\end{equation}
|
||||
\end{varwidth}
|
||||
\end{document}
|
||||
BIN
doc/src/Eqs/pair_spin_me_interaction.jpg
Normal file
|
After Width: | Height: | Size: 10 KiB |
12
doc/src/Eqs/pair_spin_me_interaction.tex
Normal file
@ -0,0 +1,12 @@
|
||||
\documentclass[preview]{standalone}
|
||||
\usepackage{varwidth}
|
||||
\usepackage[utf8x]{inputenc}
|
||||
\usepackage{amsmath,amssymb,amsthm,bm}
|
||||
\begin{document}
|
||||
\begin{varwidth}{50in}
|
||||
\begin{equation}
|
||||
\vec{\omega}_i = -\frac{1}{\hbar} \sum_{j}^{Neighb} \vec{s}_{j}\times\vec{D}(r_{ij}) ~~{\rm and}~~
|
||||
\vec{F}_i = -\sum_{j}^{Neighb} \frac{\partial D(r_{ij})}{\partial r_{ij}} \left(\vec{s}_{i}\times \vec{s}_{j} \right) \cdot \vec{r}_{ij}, \nonumber
|
||||
\end{equation}
|
||||
\end{varwidth}
|
||||
\end{document}
|
||||
BIN
doc/src/Eqs/pair_spin_neel_functions.jpg
Normal file
|
After Width: | Height: | Size: 5.8 KiB |
13
doc/src/Eqs/pair_spin_neel_functions.tex
Normal file
@ -0,0 +1,13 @@
|
||||
\documentclass[preview]{standalone}
|
||||
\usepackage{varwidth}
|
||||
\usepackage[utf8x]{inputenc}
|
||||
\usepackage{amsmath,amssymb,amsthm,bm}
|
||||
\begin{document}
|
||||
\begin{varwidth}{50in}
|
||||
\begin{eqnarray}
|
||||
g_1(r_{ij}) &=& g(r_{ij}) + \frac{12}{35} q(r_{ij}) \nonumber \\
|
||||
q_1(r_{ij}) &=& \frac{9}{5} q(r_{ij}) \nonumber \\
|
||||
q_2(r_{ij}) &=& - \frac{2}{5} q(r_{ij}) \nonumber
|
||||
\end{eqnarray}
|
||||
\end{varwidth}
|
||||
\end{document}
|
||||
BIN
doc/src/Eqs/pair_spin_neel_interaction.jpg
Normal file
|
After Width: | Height: | Size: 11 KiB |
16
doc/src/Eqs/pair_spin_neel_interaction.tex
Normal file
@ -0,0 +1,16 @@
|
||||
\documentclass[preview]{standalone}
|
||||
\usepackage{varwidth}
|
||||
\usepackage[utf8x]{inputenc}
|
||||
\usepackage{amsmath,amssymb,amsthm,bm}
|
||||
\begin{document}
|
||||
\begin{varwidth}{50in}
|
||||
\begin{equation}
|
||||
\mathcal{H}_{N\acute{e}el}=-\sum_{{ i,j=1,i\neq j}}^N g_1(r_{ij})\left(({\bm e}_{ij}\cdot {\bm s}_{i})({\bm e}_{ij}
|
||||
\cdot {\bm s}_{j})-\frac{{\bm s}_{i}\cdot{\bm s}_{j}}{3} \right)
|
||||
+q_1(r_{ij})\left( ({\bm e}_{ij}\cdot {\bm s}_{i})^2 -\frac{{\bm s}_{i}\cdot{\bm s}_{j}}{3}\right)
|
||||
\left( ({\bm e}_{ij}\cdot {\bm s}_{i})^2 -\frac{{\bm s}_{i}\cdot{\bm s}_{j}}{3} \right)
|
||||
+ q_2(r_{ij}) \Big( ({\bm e}_{ij}\cdot {\bm s}_{i}) ({\bm e}_{ij}\cdot {\bm s}_{j})^3 + ({\bm e}_{ij}\cdot
|
||||
{\bm s}_{j}) ({\bm e}_{ij}\cdot {\bm s}_{i})^3\Big) \nonumber
|
||||
\end{equation}
|
||||
\end{varwidth}
|
||||
\end{document}
|
||||
@ -1,7 +1,7 @@
|
||||
<!-- HTML_ONLY -->
|
||||
<HEAD>
|
||||
<TITLE>LAMMPS Users Manual</TITLE>
|
||||
<META NAME="docnumber" CONTENT="30 Mar 2018 version">
|
||||
<META NAME="docnumber" CONTENT="29 Jun 2018 version">
|
||||
<META NAME="author" CONTENT="http://lammps.sandia.gov - Sandia National Laboratories">
|
||||
<META NAME="copyright" CONTENT="Copyright (2003) Sandia Corporation. This software and manual is distributed under the GNU General Public License.">
|
||||
</HEAD>
|
||||
@ -19,7 +19,7 @@
|
||||
:line
|
||||
|
||||
LAMMPS Documentation :c,h1
|
||||
30 Mar 2018 version :c,h2
|
||||
29 Jun 2018 version :c,h2
|
||||
|
||||
Version info: :h3
|
||||
|
||||
|
||||
BIN
doc/src/PDF/USER-CGDNA.pdf
Normal file
@ -129,6 +129,17 @@ region 1 block $((xlo+xhi)/2+sqrt(v_area)) 2 INF INF EDGE EDGE :pre
|
||||
|
||||
so that you do not have to define (or discard) a temporary variable X.
|
||||
|
||||
Additionally, the "immediate" variable expression may be followed by a
|
||||
colon, followed by a C-style format string, e.g. ":%f" or ":%.10g".
|
||||
The format string must be appropriate for a double-precision
|
||||
floating-point value. The format string is used to output the result
|
||||
of the variable expression evaluation. If a format string is not
|
||||
specified a high-precision "%.20g" is used as the default.
|
||||
|
||||
This can be useful for formatting print output to a desired precion:
|
||||
|
||||
print "Final energy per atom: $(pe/atoms:%10.3f) eV/atom" :pre
|
||||
|
||||
Note that neither the curly-bracket or immediate form of variables can
|
||||
contain nested $ characters for other variables to substitute for.
|
||||
Thus you cannot do this:
|
||||
@ -583,6 +594,7 @@ USER-INTEL, k = KOKKOS, o = USER-OMP, t = OPT.
|
||||
"indent"_fix_indent.html,
|
||||
"latte"_fix_latte.html,
|
||||
"langevin (k)"_fix_langevin.html,
|
||||
"langevin/spin"_fix_langevin_spin.hmtl,
|
||||
"lineforce"_fix_lineforce.html,
|
||||
"momentum (k)"_fix_momentum.html,
|
||||
"move"_fix_move.html,
|
||||
@ -606,6 +618,7 @@ USER-INTEL, k = KOKKOS, o = USER-OMP, t = OPT.
|
||||
"nve/line"_fix_nve_line.html,
|
||||
"nve/noforce"_fix_nve_noforce.html,
|
||||
"nve/sphere (o)"_fix_nve_sphere.html,
|
||||
"nve/spin"_fix_nve_spin.html,
|
||||
"nve/tri"_fix_nve_tri.html,
|
||||
"nvt (iko)"_fix_nh.html,
|
||||
"nvt/asphere (o)"_fix_nvt_asphere.html,
|
||||
@ -618,6 +631,7 @@ USER-INTEL, k = KOKKOS, o = USER-OMP, t = OPT.
|
||||
"planeforce"_fix_planeforce.html,
|
||||
"poems"_fix_poems.html,
|
||||
"pour"_fix_pour.html,
|
||||
"precession/spin"_fix_precession_spin.html,
|
||||
"press/berendsen"_fix_press_berendsen.html,
|
||||
"print"_fix_print.html,
|
||||
"property/atom (k)"_fix_property_atom.html,
|
||||
@ -684,6 +698,7 @@ package"_Section_start.html#start_3.
|
||||
"addtorque"_fix_addtorque.html,
|
||||
"atc"_fix_atc.html,
|
||||
"ave/correlate/long"_fix_ave_correlate_long.html,
|
||||
"bond/react"_fix_bond_react.html,
|
||||
"colvars"_fix_colvars.html,
|
||||
"dpd/energy (k)"_fix_dpd_energy.html,
|
||||
"drude"_fix_drude.html,
|
||||
@ -823,6 +838,7 @@ KOKKOS, o = USER-OMP, t = OPT.
|
||||
"sna/atom"_compute_sna_atom.html,
|
||||
"snad/atom"_compute_sna_atom.html,
|
||||
"snav/atom"_compute_sna_atom.html,
|
||||
"spin"_compute_spin.html,
|
||||
"stress/atom"_compute_stress_atom.html,
|
||||
"temp (k)"_compute_temp.html,
|
||||
"temp/asphere"_compute_temp_asphere.html,
|
||||
@ -851,6 +867,7 @@ package"_Section_start.html#start_3.
|
||||
"dpd"_compute_dpd.html,
|
||||
"dpd/atom"_compute_dpd_atom.html,
|
||||
"edpd/temp/atom"_compute_edpd_temp_atom.html,
|
||||
"entropy/atom"_compute_entropy_atom.html,
|
||||
"fep"_compute_fep.html,
|
||||
"force/tally"_compute_tally.html,
|
||||
"heat/flux/tally"_compute_tally.html,
|
||||
@ -1016,6 +1033,10 @@ KOKKOS, o = USER-OMP, t = OPT.
|
||||
"snap (k)"_pair_snap.html,
|
||||
"soft (go)"_pair_soft.html,
|
||||
"sw (giko)"_pair_sw.html,
|
||||
"spin/dmi"_pair_spin_dmi.html,
|
||||
"spin/exchange"_pair_spin_exchange.html,
|
||||
"spin/magelec"_pair_spin_magelec.html,
|
||||
"spin/neel"_pair_spin_neel.html,
|
||||
"table (gko)"_pair_table.html,
|
||||
"tersoff (giko)"_pair_tersoff.html,
|
||||
"tersoff/mod (gko)"_pair_tersoff_mod.html,
|
||||
@ -1211,7 +1232,8 @@ package"_Section_start.html#start_3.
|
||||
"nharmonic (o)"_dihedral_nharmonic.html,
|
||||
"quadratic (o)"_dihedral_quadratic.html,
|
||||
"spherical (o)"_dihedral_spherical.html,
|
||||
"table (o)"_dihedral_table.html :tb(c=4,ea=c)
|
||||
"table (o)"_dihedral_table.html,
|
||||
"table/cut"_dihedral_table_cut.html :tb(c=4,ea=c)
|
||||
|
||||
:line
|
||||
|
||||
|
||||
@ -803,6 +803,13 @@ lo value must be less than the hi value for all 3 dimensions. :dd
|
||||
The box command cannot be used after a read_data, read_restart, or
|
||||
create_box command. :dd
|
||||
|
||||
{BUG: restartinfo=1 but no restart support in pair style} :dt
|
||||
|
||||
The pair style has a bug, where it does not support reading
|
||||
and writing information to a restart file, but does not set
|
||||
the member variable restartinfo to 0 as required in that case. :dd
|
||||
|
||||
|
||||
{CPU neighbor lists must be used for ellipsoid/sphere mix.} :dt
|
||||
|
||||
When using Gay-Berne or RE-squared pair styles with both ellipsoidal and
|
||||
@ -1565,15 +1572,6 @@ This operation is not allowed. :dd
|
||||
|
||||
This operation is not allowed. :dd
|
||||
|
||||
{Cannot use -cuda on and -kokkos on together} :dt
|
||||
|
||||
This is not allowed since both packages can use GPUs. :dd
|
||||
|
||||
{Cannot use -cuda on without USER-CUDA installed} :dt
|
||||
|
||||
The USER-CUDA package must be installed via "make yes-user-cuda"
|
||||
before LAMMPS is built. :dd
|
||||
|
||||
{Cannot use -kokkos on without KOKKOS installed} :dt
|
||||
|
||||
Self-explanatory. :dd
|
||||
@ -1597,11 +1595,6 @@ solver/pair style. :dd
|
||||
|
||||
This is a current restriction of this command. :dd
|
||||
|
||||
{Cannot use GPU package with USER-CUDA package enabled} :dt
|
||||
|
||||
You cannot use both the GPU and USER-CUDA packages
|
||||
together. Use one or the other. :dd
|
||||
|
||||
{Cannot use Kokkos pair style with rRESPA inner/middle} :dt
|
||||
|
||||
Self-explanatory. :dd
|
||||
@ -8252,12 +8245,6 @@ Self-explanatory. :dd
|
||||
The package command cannot be used afer a read_data, read_restart, or
|
||||
create_box command. :dd
|
||||
|
||||
{Package cuda command without USER-CUDA package enabled} :dt
|
||||
|
||||
The USER-CUDA package must be installed via "make yes-user-cuda"
|
||||
before LAMMPS is built, and the "-c on" must be used to enable the
|
||||
package. :dd
|
||||
|
||||
{Package gpu command without GPU package installed} :dt
|
||||
|
||||
The GPU package must be installed via "make yes-gpu" before LAMMPS is
|
||||
@ -10230,22 +10217,6 @@ it in different ways. :dd
|
||||
|
||||
Self-explanatory. :dd
|
||||
|
||||
{USER-CUDA mode requires CUDA variant of min style} :dt
|
||||
|
||||
CUDA mode is enabled, so the min style must include a cuda suffix. :dd
|
||||
|
||||
{USER-CUDA mode requires CUDA variant of run style} :dt
|
||||
|
||||
CUDA mode is enabled, so the run style must include a cuda suffix. :dd
|
||||
|
||||
{USER-CUDA package does not yet support comm_style tiled} :dt
|
||||
|
||||
Self-explanatory. :dd
|
||||
|
||||
{USER-CUDA package requires a cuda enabled atom_style} :dt
|
||||
|
||||
Self-explanatory. :dd
|
||||
|
||||
{Unable to initialize accelerator for use} :dt
|
||||
|
||||
There was a problem initializing an accelerator for the gpu package :dd
|
||||
@ -10494,10 +10465,6 @@ Must use remap v option with fix deform with this pair style. :dd
|
||||
|
||||
If fix deform is used, the remap v option is required. :dd
|
||||
|
||||
{Using suffix cuda without USER-CUDA package enabled} :dt
|
||||
|
||||
Self-explanatory. :dd
|
||||
|
||||
{Using suffix gpu without GPU package installed} :dt
|
||||
|
||||
Self-explanatory. :dd
|
||||
|
||||
@ -36,7 +36,8 @@ This section describes how to perform common tasks using LAMMPS.
|
||||
6.24 "Setting parameters for the kspace_style pppm/disp command"_#howto_24
|
||||
6.25 "Polarizable models"_#howto_25
|
||||
6.26 "Adiabatic core/shell model"_#howto_26
|
||||
6.27 "Drude induced dipoles"_#howto_27 :all(b)
|
||||
6.27 "Drude induced dipoles"_#howto_27
|
||||
6.28 "Magnetic spins"_#howto_28 :all(b)
|
||||
|
||||
The example input scripts included in the LAMMPS distribution and
|
||||
highlighted in "Section 7"_Section_example.html also show how to
|
||||
@ -2906,6 +2907,54 @@ with a Coulomb pair style. It may be useful to use {coul/long/cs} or
|
||||
similar from the CORESHELL package if the core and Drude particle come
|
||||
too close, which can cause numerical issues.
|
||||
|
||||
:line
|
||||
|
||||
6.28 Magnetic spins :link(howto_28),h4
|
||||
|
||||
Classical magnetic spin simualtions can be performed via the SPIN
|
||||
package. The algrorithmic and implementation details are described in
|
||||
"Tranchida"_#Tranchida7.
|
||||
|
||||
The model representents the simulation of atomic magnetic spins
|
||||
coupled to lattice vibrations. The dynamics of those magnetic spins
|
||||
can be used to simulate a broad range a phenomena related to
|
||||
magneto-elasticity, or or to study the influence of defects on the
|
||||
magnetic properties of materials.
|
||||
|
||||
The magnetic spins are interacting with each others and with the
|
||||
lattice via pair interactions. Typically, the magnetic exchange
|
||||
interaction can be defined using the
|
||||
"pair/spin/exchange"_pair_spin_exchange.html command. This exchange
|
||||
applies a magnetic torque to a given spin, considering the orientation
|
||||
of its neighboring spins and their relative distances.
|
||||
It also applies a force on the atoms as a function of the spin
|
||||
orientations and their associated inter-atomic distances.
|
||||
|
||||
The command "fix precession/spin"_fix_precession_spin.html allows to
|
||||
apply a constant magnetic torque on all the spins in the system. This
|
||||
torque can be an external magnetic field (Zeeman interaction), or an
|
||||
uniaxial magnetic anisotropy.
|
||||
|
||||
A Langevin thermostat can be applied to those magnetic spins using
|
||||
"fix langevin/spin"_fix_langevin_spin.html. Typically, this thermostat
|
||||
can be coupled to another Langevin thermostat applied to the atoms
|
||||
using "fix langevin"_fix_langevin.html in order to simulate
|
||||
thermostated spin-lattice system.
|
||||
|
||||
The magnetic Gilbert damping can also be applied using "fix
|
||||
langevin/spin"_fix_langevin_spin.html. It allows to either dissipate
|
||||
the thermal energy of the Langevin thermostat, or to perform a
|
||||
relaxation of the magnetic configuration toward an equilibrium state.
|
||||
|
||||
All the computed magnetic properties can be outputed by two main
|
||||
commands. The first one is "compute spin"_compute_spin.html, that
|
||||
enables to evaluate magnetic averaged quantities, such as the total
|
||||
magnetization of the system along x, y, or z, the spin temperature, or
|
||||
the magnetic energy. The second command is "compute
|
||||
property/atom"_compute_property_atom.html. It enables to output all the
|
||||
per atom magnetic quantities. Typically, the orientation of a given
|
||||
magnetic spin, or the magnetic force acting on this spin.
|
||||
|
||||
:line
|
||||
:line
|
||||
|
||||
@ -2957,3 +3006,7 @@ Phys, 79, 926 (1983).
|
||||
|
||||
:link(howto-Lamoureux)
|
||||
[(Lamoureux and Roux)] G. Lamoureux, B. Roux, J. Chem. Phys 119, 3025 (2003)
|
||||
|
||||
:link(Tranchida7)
|
||||
[(Tranchida)] Tranchida, Plimpton, Thibaudeau and Thompson,
|
||||
arXiv preprint arXiv:1801.10233, (2018).
|
||||
|
||||
@ -526,14 +526,14 @@ and efforts.
|
||||
Axel Kohlmeyer (Temple U), akohlmey at gmail.com, SVN and Git repositories, indefatigable mail list responder, USER-CGSDK, USER-OMP, USER-COLVARS, USER-MOLFILE, USER-QMMM, USER-TALLY, and COMPRESS packages
|
||||
Roy Pollock (LLNL), Ewald and PPPM solvers
|
||||
Mike Brown (ORNL), brownw at ornl.gov, GPU and USER-INTEL package
|
||||
Greg Wagner (Sandia), gjwagne at sandia.gov, MEAM package for MEAM potential
|
||||
Greg Wagner (Sandia), gjwagne at sandia.gov, MEAM package for MEAM potential (superseded by USER-MEAMC)
|
||||
Mike Parks (Sandia), mlparks at sandia.gov, PERI package for Peridynamics
|
||||
Rudra Mukherjee (JPL), Rudranarayan.M.Mukherjee at jpl.nasa.gov, POEMS package for articulated rigid body motion
|
||||
Reese Jones (Sandia) and collaborators, rjones at sandia.gov, USER-ATC package for atom/continuum coupling
|
||||
Ilya Valuev (JIHT), valuev at physik.hu-berlin.de, USER-AWPMD package for wave-packet MD
|
||||
Christian Trott (U Tech Ilmenau), christian.trott at tu-ilmenau.de, USER-CUDA and KOKKOS packages
|
||||
Christian Trott (U Tech Ilmenau), christian.trott at tu-ilmenau.de, USER-CUDA (obsoleted by KOKKOS) and KOKKOS packages
|
||||
Andres Jaramillo-Botero (Caltech), ajaramil at wag.caltech.edu, USER-EFF package for electron force field
|
||||
Christoph Kloss (JKU), Christoph.Kloss at jku.at, USER-LIGGGHTS package for granular models and granular/fluid coupling
|
||||
Christoph Kloss (JKU), Christoph.Kloss at jku.at, LIGGGHTS fork for granular models and granular/fluid coupling
|
||||
Metin Aktulga (LBL), hmaktulga at lbl.gov, USER-REAXC package for C version of ReaxFF
|
||||
Georg Gunzenmuller (EMI), georg.ganzenmueller at emi.fhg.de, USER-SMD and USER-SPH packages
|
||||
Colin Denniston (U Western Ontario), cdennist at uwo.ca, USER-LB package :ul
|
||||
|
||||
@ -114,6 +114,7 @@ Package, Description, Doc page, Example, Library
|
||||
"RIGID"_#RIGID, rigid bodies and constraints, "fix rigid"_fix_rigid.html, rigid, -
|
||||
"SHOCK"_#SHOCK, shock loading methods, "fix msst"_fix_msst.html, -, -
|
||||
"SNAP"_#SNAP, quantum-fitted potential, "pair_style snap"_pair_snap.html, snap, -
|
||||
"SPIN"_#SPIN, magnetic atomic spin dynamics, "Section 6.6.28"_Section_howto.html#howto_28, SPIN, -
|
||||
"SRD"_#SRD, stochastic rotation dynamics, "fix srd"_fix_srd.html, srd, -
|
||||
"VORONOI"_#VORONOI, Voronoi tesselation, "compute voronoi/atom"_compute_voronoi_atom.html, -, ext :tb(ea=c,ca1=l)
|
||||
|
||||
@ -122,6 +123,7 @@ Package, Description, Doc page, Example, Library
|
||||
Package, Description, Doc page, Example, Library
|
||||
"USER-ATC"_#USER-ATC, atom-to-continuum coupling, "fix atc"_fix_atc.html, USER/atc, int
|
||||
"USER-AWPMD"_#USER-AWPMD, wave-packet MD, "pair_style awpmd/cut"_pair_awpmd.html, USER/awpmd, int
|
||||
"USER-BOCS"_#USER-BOCS, BOCS bottom up coarse graining, "fix bocs"_fix_bocs.html, USER/bocs, -
|
||||
"USER-CGDNA"_#USER-CGDNA, coarse-grained DNA force fields, src/USER-CGDNA/README, USER/cgdna, -
|
||||
"USER-CGSDK"_#USER-CGSDK, SDK coarse-graining model, "pair_style lj/sdk"_pair_sdk.html, USER/cgsdk, -
|
||||
"USER-COLVARS"_#USER-COLVARS, collective variables library, "fix colvars"_fix_colvars.html, USER/colvars, int
|
||||
@ -1414,6 +1416,38 @@ examples/snap :ul
|
||||
|
||||
:line
|
||||
|
||||
SPIN package :link(SPIN),h4
|
||||
|
||||
[Contents:]
|
||||
|
||||
Model atomic magnetic spins classically, coupled to atoms moving in
|
||||
the usual manner via MD. Various pair, fix, and compute styles.
|
||||
|
||||
[Author:] Julian Tranchida (Sandia).
|
||||
|
||||
[Install or un-install:]
|
||||
|
||||
make yes-spin
|
||||
make machine :pre
|
||||
|
||||
make no-spin
|
||||
make machine :pre
|
||||
|
||||
[Supporting info:]
|
||||
|
||||
src/SPIN: filenames -> commands
|
||||
"Section 6.28"_Section_howto.html#howto_28
|
||||
"pair_style spin/dmi"_pair_spin_dmi.html
|
||||
"pair_style spin/exchange"_pair_spin_exchange.html
|
||||
"pair_style spin/magelec"_pair_spin_magelec.html
|
||||
"pair_style spin/neel"_pair_spin_neel.html
|
||||
"fix nve/spin"_fix_nve_spin.html
|
||||
"fix precession/spin"_fix_precession_spin.html
|
||||
"compute spin"_compute_spin.html
|
||||
examples/SPIN :ul
|
||||
|
||||
:line
|
||||
|
||||
SRD package :link(SRD),h4
|
||||
|
||||
[Contents:]
|
||||
@ -1625,6 +1659,43 @@ examples/USER/awpmd :ul
|
||||
|
||||
:line
|
||||
|
||||
USER-BOCS package :link(USER-BOCS),h4
|
||||
|
||||
[Contents:]
|
||||
|
||||
This package provides "fix bocs"_fix_bocs.html, a modified version
|
||||
of "fix npt"_fix_nh.html which includes the pressure correction to
|
||||
the barostat as outlined in:
|
||||
|
||||
N. J. H. Dunn and W. G. Noid, "Bottom-up coarse-grained models that
|
||||
accurately describe the structure, pressure, and compressibility of
|
||||
molecular liquids," J. Chem. Phys. 143, 243148 (2015).
|
||||
|
||||
[Authors:] Nicholas J. H. Dunn and Michael R. DeLyser (The Pennsylvania State University)
|
||||
|
||||
[Install or un-install:]
|
||||
|
||||
make yes-user-bocs
|
||||
make machine :pre
|
||||
|
||||
make no-user-bocs
|
||||
make machine :pre
|
||||
|
||||
[Supporting info:]
|
||||
|
||||
The USER-BOCS user package for LAMMPS is part of the BOCS software package:
|
||||
"https://github.com/noid-group/BOCS"_https://github.com/noid-group/BOCS
|
||||
|
||||
See the following reference for information about the entire package:
|
||||
|
||||
Dunn, NJH; Lebold, KM; DeLyser, MR; Rudzinski, JF; Noid, WG.
|
||||
"BOCS: Bottom-Up Open-Source Coarse-Graining Software."
|
||||
J. Phys. Chem. B. 122, 13, 3363-3377 (2018).
|
||||
|
||||
Example inputs are in the examples/USER/bocs folder.
|
||||
|
||||
:line
|
||||
|
||||
USER-CGDNA package :link(USER-CGDNA),h4
|
||||
|
||||
[Contents:]
|
||||
|
||||
@ -15,7 +15,7 @@ atom_style style args :pre
|
||||
style = {angle} or {atomic} or {body} or {bond} or {charge} or {dipole} or \
|
||||
{dpd} or {edpd} or {mdpd} or {tdpd} or {electron} or {ellipsoid} or \
|
||||
{full} or {line} or {meso} or {molecular} or {peri} or {smd} or \
|
||||
{sphere} or {tri} or {template} or {hybrid} :ulb,l
|
||||
{sphere} or {spin} or {tri} or {template} or {hybrid} :ulb,l
|
||||
args = none for any style except the following
|
||||
{body} args = bstyle bstyle-args
|
||||
bstyle = style of body particles
|
||||
@ -38,6 +38,7 @@ atom_style full
|
||||
atom_style body nparticle 2 10
|
||||
atom_style hybrid charge bond
|
||||
atom_style hybrid charge body nparticle 2 5
|
||||
atom_style spin
|
||||
atom_style template myMols
|
||||
atom_style tdpd 2 :pre
|
||||
|
||||
@ -89,6 +90,7 @@ quantities.
|
||||
{peri} | mass, volume | mesocopic Peridynamic models |
|
||||
{smd} | volume, kernel diameter, contact radius, mass | solid and fluid SPH particles |
|
||||
{sphere} | diameter, mass, angular velocity | granular models |
|
||||
{spin} | magnetic moment | system with magnetic particles |
|
||||
{template} | template index, template atom | small molecules with fixed topology |
|
||||
{tri} | corner points, angular momentum | rigid bodies |
|
||||
{wavepacket} | charge, spin, eradius, etag, cs_re, cs_im | AWPMD :tb(c=3,s=|)
|
||||
@ -175,6 +177,9 @@ used for calculating the field variables (e.g. stress and deformation)
|
||||
and a contact radius for calculating repulsive forces which prevent
|
||||
individual physical bodies from penetrating each other.
|
||||
|
||||
For the {spin} style, a magnetic spin is associated to each atom.
|
||||
Those spins have a norm (their magnetic moment) and a direction.
|
||||
|
||||
The {wavepacket} style is similar to {electron}, but the electrons may
|
||||
consist of several Gaussian wave packets, summed up with coefficients
|
||||
cs= (cs_re,cs_im). Each of the wave packets is treated as a separate
|
||||
@ -312,6 +317,8 @@ The {meso} style is part of the USER-SPH package for smoothed particle
|
||||
hydrodynamics (SPH). See "this PDF
|
||||
guide"_USER/sph/SPH_LAMMPS_userguide.pdf to using SPH in LAMMPS.
|
||||
|
||||
The {spin} style is part of the SPIN package.
|
||||
|
||||
The {wavepacket} style is part of the USER-AWPMD package for the
|
||||
"antisymmetrized wave packet MD method"_pair_awpmd.html.
|
||||
|
||||
|
||||
@ -51,9 +51,11 @@ The coefficients in the above example have to be kept fixed and cannot be change
|
||||
Example input and data files for DNA duplexes can be found in examples/USER/cgdna/examples/oxDNA/ and /oxDNA2/.
|
||||
A simple python setup tool which creates single straight or helical DNA strands,
|
||||
DNA duplexes or arrays of DNA duplexes can be found in examples/USER/cgdna/util/.
|
||||
A technical report with more information on the model, the structure of the input file,
|
||||
the setup tool and the performance of the LAMMPS-implementation of oxDNA
|
||||
can be found "here"_PDF/USER-CGDNA-overview.pdf.
|
||||
|
||||
Please cite "(Henrich)"_#Henrich2 and the relevant oxDNA articles in any publication that uses this implementation.
|
||||
The article contains more information on the model, the structure of the input file, the setup tool
|
||||
and the performance of the LAMMPS-implementation of oxDNA.
|
||||
The preprint version of the article can be found "here"_PDF/USER-CGDNA.pdf.
|
||||
|
||||
:line
|
||||
|
||||
@ -72,6 +74,9 @@ LAMMPS"_Section_start.html#start_3 section for more info on packages.
|
||||
|
||||
:line
|
||||
|
||||
:link(Henrich2)
|
||||
[(Henrich)] O. Henrich, Y. A. Gutierrez-Fosado, T. Curk, T. E. Ouldridge, Eur. Phys. J. E 41, 57 (2018).
|
||||
|
||||
:link(oxdna_fene)
|
||||
[(Ouldridge)] T.E. Ouldridge, A.A. Louis, J.P.K. Doye, J. Chem. Phys. 134, 085101 (2011).
|
||||
|
||||
|
||||
@ -10,19 +10,29 @@ compute ackland/atom command :h3
|
||||
|
||||
[Syntax:]
|
||||
|
||||
compute ID group-ID ackland/atom :pre
|
||||
compute ID group-ID ackland/atom keyword/value :pre
|
||||
|
||||
ID, group-ID are documented in "compute"_compute.html command
|
||||
ackland/atom = style name of this compute command :ul
|
||||
ID, group-ID are documented in "compute"_compute.html command :ulb,l
|
||||
ackland/atom = style name of this compute command :l
|
||||
|
||||
zero or more keyword/value pairs may be appended :l
|
||||
keyword = {legacy} :l
|
||||
{legacy} yes/no = use ({yes}) or do not use ({no}) legacy ackland algorithm implementation :pre
|
||||
:ule
|
||||
|
||||
[Examples:]
|
||||
|
||||
compute 1 all ackland/atom :pre
|
||||
compute 1 all ackland/atom
|
||||
compute 1 all ackland/atom legacy yes :pre
|
||||
|
||||
[Description:]
|
||||
|
||||
Defines a computation that calculates the local lattice structure
|
||||
according to the formulation given in "(Ackland)"_#Ackland.
|
||||
Historically, LAMMPS had two, slightly different implementations of
|
||||
the algorithm from the paper. With the {legacy} keyword, it is
|
||||
possible to switch between the pre-2015 ({legacy yes}) and post-2015
|
||||
implemention ({legacy no}). The post-2015 variant is the default.
|
||||
|
||||
In contrast to the "centro-symmetry
|
||||
parameter"_compute_centro_atom.html this method is stable against
|
||||
@ -66,7 +76,8 @@ integers defined above.
|
||||
|
||||
"compute centro/atom"_compute_centro_atom.html
|
||||
|
||||
[Default:] none
|
||||
[Default:]
|
||||
The keyword {legacy} defaults to {no}.
|
||||
|
||||
:line
|
||||
|
||||
|
||||
@ -15,7 +15,7 @@ compute ID group-ID displace/atom :pre
|
||||
ID, group-ID are documented in "compute"_compute.html command :ulb,l
|
||||
displace/atom = style name of this compute command :l
|
||||
zero or more keyword/arg pairs may be appended :l
|
||||
keyword = {refresh} :
|
||||
keyword = {refresh} :l
|
||||
{replace} arg = name of per-atom variable :pre
|
||||
|
||||
:ule
|
||||
|
||||
130
doc/src/compute_entropy_atom.txt
Normal file
@ -0,0 +1,130 @@
|
||||
"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c
|
||||
|
||||
:link(lws,http://lammps.sandia.gov)
|
||||
:link(ld,Manual.html)
|
||||
:link(lc,Section_commands.html#comm)
|
||||
|
||||
:line
|
||||
|
||||
compute entropy/atom command :h3
|
||||
|
||||
[Syntax:]
|
||||
|
||||
compute ID group-ID entropy/atom sigma cutoff keyword value ... :pre
|
||||
|
||||
ID, group-ID are documented in "compute"_compute.html command :l
|
||||
entropy/atom = style name of this compute command :l
|
||||
sigma = width of gaussians used in the g(r) smoothening :l
|
||||
cutoff = cutoff for the g(r) calculation :l
|
||||
one or more keyword/value pairs may be appended :l
|
||||
keyword = {avg} or {local}
|
||||
{avg} values = {yes} or {no} cutoff2
|
||||
{yes} = average the pair entropy over neighbors
|
||||
{no} = do not average the pair entropy over neighbors
|
||||
cutoff2 = cutoff for the averaging over neighbors
|
||||
{local} values = {yes} or {no} = use the local density around each atom to normalize the g(r) :pre
|
||||
:ule
|
||||
|
||||
[Examples:]
|
||||
|
||||
compute 1 all entropy/atom 0.25 5.
|
||||
compute 1 all entropy/atom 0.25 5. avg yes 5.
|
||||
compute 1 all entropy/atom 0.125 7.3 avg yes 5.1 local yes :pre
|
||||
|
||||
[Description:]
|
||||
|
||||
Define a computation that calculates the pair entropy fingerprint for
|
||||
each atom in the group. The fingerprint is useful to distinguish between
|
||||
ordered and disordered environments, for instance liquid and solid-like
|
||||
environments, or glassy and crystalline-like environments. Some
|
||||
applications could be the identification of grain boundaries, a
|
||||
melt-solid interface, or a solid cluster emerging from the melt.
|
||||
The advantage of this parameter over others is that no a priori
|
||||
information about the solid structure is required.
|
||||
|
||||
This parameter for atom i is computed using the following formula from
|
||||
"(Piaggi)"_#Piaggi and "(Nettleton)"_#Nettleton ,
|
||||
|
||||
:c,image(Eqs/pair_entropy.jpg)
|
||||
|
||||
where r is a distance, g(r) is the radial distribution function of atom
|
||||
i and rho is the density of the system. The g(r) computed for each
|
||||
atom i can be noisy and therefore it is smoothened using:
|
||||
|
||||
:c,image(Eqs/pair_entropy2.jpg)
|
||||
|
||||
where the sum in j goes through the neighbors of atom i, and sigma is a
|
||||
parameter to control the smoothening.
|
||||
|
||||
The input parameters are {sigma} the smoothening parameter, and the
|
||||
{cutoff} for the calculation of g(r).
|
||||
|
||||
If the keyword {avg} has the setting {yes}, then this compute also
|
||||
averages the parameter over the neighbors of atom i according to:
|
||||
|
||||
:c,image(Eqs/pair_entropy3.jpg)
|
||||
|
||||
where the sum j goes over the neighbors of atom i and N is the number
|
||||
of neighbors. This procedure provides a sharper distinction between
|
||||
order and disorder environments. In this case the input parameter
|
||||
{cutoff2} is the cutoff for the averaging over the neighbors and
|
||||
must also be specified.
|
||||
|
||||
If the {avg yes} option is used, the effective cutoff of the neighbor
|
||||
list should be {cutoff}+{cutoff2} and therefore it might be necessary
|
||||
to increase the skin of the neighbor list with:
|
||||
|
||||
neighbor skin bin :pre
|
||||
|
||||
See "neighbor"_neighbor.html for details.
|
||||
|
||||
If the {local yes} option is used, the g(r) is normalized by the
|
||||
local density around each atom, that is to say the density around each
|
||||
atom is the number of neighbors within the neighbor list cutoff divided
|
||||
by the corresponding volume. This option can be useful when dealing with
|
||||
inhomogeneus systems such as those that have surfaces.
|
||||
|
||||
Here are typical input parameters for fcc aluminum (lattice
|
||||
constant 4.05 Angstroms),
|
||||
|
||||
compute 1 all entropy/atom 0.25 5.7 avg yes 3.7 :pre
|
||||
|
||||
and for bcc sodium (lattice constant 4.23 Angstroms),
|
||||
|
||||
compute 1 all entropy/atom 0.25 7.3 avg yes 5.1 :pre
|
||||
|
||||
|
||||
[Output info:]
|
||||
|
||||
By default, this compute calculates the pair entropy value for each
|
||||
atom as a per-atom vector, which can be accessed by any command that
|
||||
uses per-atom values from a compute as input. See "Section
|
||||
6.15"_Section_howto.html#howto_15 for an overview of LAMMPS output
|
||||
options.
|
||||
|
||||
The pair entropy values have units of the Boltzmann constant. They are
|
||||
always negative, and lower values (lower entropy) correspond to more
|
||||
ordered environments.
|
||||
|
||||
[Restrictions:]
|
||||
|
||||
This compute is part of the USER-MISC package. It is only enabled if
|
||||
LAMMPS was built with that package. See the "Making
|
||||
LAMMPS"_Section_start.html#start_3 section for more info.
|
||||
|
||||
[Related commands:]
|
||||
|
||||
"compute cna/atom"_compute_cna_atom.html
|
||||
"compute centro/atom"_compute_centro_atom.html
|
||||
|
||||
[Default:]
|
||||
|
||||
The default values for the optional keywords are avg = no and local = no.
|
||||
|
||||
:line
|
||||
|
||||
:link(Piaggi)
|
||||
[(Piaggi)] Piaggi and Parrinello, J Chem Phys, 147, 114112 (2017).
|
||||
|
||||
:link(Nettleton)
|
||||
[(Nettleton)] Nettleton and Green, J Chem Phys, 29, 6 (1958).
|
||||
@ -26,14 +26,16 @@ compute myFlux all heat/flux myKE myPE myStress :pre
|
||||
|
||||
Define a computation that calculates the heat flux vector based on
|
||||
contributions from atoms in the specified group. This can be used by
|
||||
itself to measure the heat flux into or out of a reservoir of atoms,
|
||||
or to calculate a thermal conductivity using the Green-Kubo formalism.
|
||||
itself to measure the heat flux through a set of atoms (e.g. a region
|
||||
between two thermostatted reservoirs held at different temperatures),
|
||||
or to calculate a thermal conductivity using the equilibrium
|
||||
Green-Kubo formalism.
|
||||
|
||||
See the "fix thermal/conductivity"_fix_thermal_conductivity.html
|
||||
command for details on how to compute thermal conductivity in an
|
||||
alternate way, via the Muller-Plathe method. See the "fix
|
||||
heat"_fix_heat.html command for a way to control the heat added or
|
||||
subtracted to a group of atoms.
|
||||
For other non-equilibrium ways to compute a thermal conductivity, see
|
||||
"this section"_Section_howto.html#howto_20. These include use of the
|
||||
"fix thermal/conductivity"_fix_thermal_conductivity.html command for
|
||||
the Muller-Plathe method. Or the "fix heat"_fix_heat.html command
|
||||
which can add or subtract heat from groups of atoms.
|
||||
|
||||
The compute takes three arguments which are IDs of other
|
||||
"computes"_compute.html. One calculates per-atom kinetic energy
|
||||
|
||||
@ -19,6 +19,7 @@ input = one or more atom attributes :l
|
||||
x, y, z, xs, ys, zs, xu, yu, zu, ix, iy, iz,
|
||||
vx, vy, vz, fx, fy, fz,
|
||||
q, mux, muy, muz, mu,
|
||||
sp, spx, spy, spz, fmx, fmy, fmz,
|
||||
radius, diameter, omegax, omegay, omegaz,
|
||||
angmomx, angmomy, angmomz,
|
||||
shapex,shapey, shapez,
|
||||
@ -46,6 +47,9 @@ input = one or more atom attributes :l
|
||||
q = atom charge
|
||||
mux,muy,muz = orientation of dipole moment of atom
|
||||
mu = magnitude of dipole moment of atom
|
||||
sp = atomic magnetic spin moment
|
||||
spx, spy, spz = direction of the atomic magnetic spin
|
||||
fmx, fmy, fmz = magnetic force
|
||||
radius,diameter = radius,diameter of spherical particle
|
||||
omegax,omegay,omegaz = angular velocity of spherical particle
|
||||
angmomx,angmomy,angmomz = angular momentum of aspherical particle
|
||||
@ -82,7 +86,8 @@ input = one or more atom attributes :l
|
||||
|
||||
compute 1 all property/atom xs vx fx mux
|
||||
compute 2 all property/atom type
|
||||
compute 1 all property/atom ix iy iz :pre
|
||||
compute 1 all property/atom ix iy iz
|
||||
compute 3 all property/atom sp spx spy spz :pre
|
||||
|
||||
[Description:]
|
||||
|
||||
@ -152,6 +157,10 @@ The vector or array values will be in whatever "units"_units.html the
|
||||
corresponding attribute is in, e.g. velocity units for vx, charge
|
||||
units for q, etc.
|
||||
|
||||
For the spin quantities, sp is in the units of the Bohr magneton, spx,
|
||||
spy, and spz are adimentional quantities, and fmx, fmy and fmz are
|
||||
given in rad.THz.
|
||||
|
||||
[Restrictions:] none
|
||||
|
||||
[Related commands:]
|
||||
|
||||
@ -161,9 +161,9 @@ function.
|
||||
|
||||
The keyword {bzeroflag} determines whether or not {B0}, the bispectrum
|
||||
components of an atom with no neighbors, are subtracted from
|
||||
the calculated bispectrum components. This optional keyword is only
|
||||
available for compute {sna/atom}, as {snad/atom} and {snav/atom}
|
||||
are unaffected by the removal of constant terms.
|
||||
the calculated bispectrum components. This optional keyword
|
||||
normally only affects compute {sna/atom}. However, when
|
||||
{quadraticflag} is on, it also affects {snad/atom} and {snav/atom}.
|
||||
|
||||
The keyword {quadraticflag} determines whether or not the
|
||||
quadratic analogs to the bispectrum quantities are generated.
|
||||
@ -230,13 +230,18 @@ are 30, 90, and 180, respectively. With {quadratic} value=1,
|
||||
the numbers of columns are 930, 2790, and 5580, respectively.
|
||||
|
||||
If the {quadratic} keyword value is set to 1, then additional
|
||||
columns are appended to each per-atom array, corresponding to
|
||||
columns are generated, corresponding to
|
||||
the products of all distinct pairs of bispectrum components. If the
|
||||
number of bispectrum components is {K}, then the number of distinct pairs
|
||||
is {K}({K}+1)/2. These are output in subblocks of {K}({K}+1)/2 columns, using the same
|
||||
ordering of sub-blocks as was used for the bispectrum
|
||||
components. Within each sub-block, the ordering is upper-triangular,
|
||||
(1,1),(1,2)...(1,{K}),(2,1)...({K}-1,{K}-1),({K}-1,{K}),({K},{K})
|
||||
is {K}({K}+1)/2.
|
||||
For compute {sna/atom} these columns are appended to existing {K} columns.
|
||||
The ordering of quadratic terms is upper-triangular,
|
||||
(1,1),(1,2)...(1,{K}),(2,1)...({K}-1,{K}-1),({K}-1,{K}),({K},{K}).
|
||||
For computes {snad/atom} and {snav/atom} each set of {K}({K}+1)/2
|
||||
additional columns is inserted directly after each of sub-block
|
||||
of linear terms i.e. linear and quadratic terms are contiguous.
|
||||
So the nesting order from inside to outside is bispectrum component,
|
||||
linear then quadratic, vector/tensor component, type.
|
||||
|
||||
These values can be accessed by any command that uses per-atom values
|
||||
from a compute as input. See "Section
|
||||
|
||||
78
doc/src/compute_spin.txt
Normal file
@ -0,0 +1,78 @@
|
||||
"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c
|
||||
|
||||
:link(lws,http://lammps.sandia.gov)
|
||||
:link(ld,Manual.html)
|
||||
:link(lc,Section_commands.html#comm)
|
||||
|
||||
:line
|
||||
|
||||
compute spin command :h3
|
||||
|
||||
[Syntax:]
|
||||
|
||||
compute ID group-ID compute/spin :pre
|
||||
|
||||
ID, group-ID are documented in "compute"_compute.html command
|
||||
compute/spin = style name of this compute command :ul
|
||||
|
||||
[Examples:]
|
||||
|
||||
compute out_mag all compute/spin :pre
|
||||
|
||||
[Description:]
|
||||
|
||||
Define a computation that calculates magnetic quantities for a system
|
||||
of atoms having spins.
|
||||
|
||||
This compute calculates 6 magnetic quantities.
|
||||
|
||||
The three first quantities are the x,y and z coordinates of the total magnetization.
|
||||
|
||||
The fourth quantity is the norm of the total magnetization.
|
||||
|
||||
The fifth quantity is the magnetic energy.
|
||||
|
||||
The sixth one is referred to as the spin temperature, according
|
||||
to the work of "(Nurdin)"_#Nurdin1.
|
||||
|
||||
The simplest way to output the results of the compute spin calculation
|
||||
is to define some of the quantities as variables, and to use the thermo and
|
||||
thermo_style commands, for example:
|
||||
|
||||
compute out_mag all compute/spin :pre
|
||||
|
||||
variable mag_z equal c_out_mag\[3\]
|
||||
variable mag_norm equal c_out_mag\[4\]
|
||||
variable temp_mag equal c_out_mag\[6\] :pre
|
||||
|
||||
thermo 10
|
||||
thermo_style custom step v_mag_z v_mag_norm v_temp_mag :pre
|
||||
|
||||
This serie of commands evaluates the total magnetization along z, the norm of
|
||||
the total magnetization, and the magnetic temperature. Three variables are
|
||||
assigned to those quantities. The thermo and thermo_style commands print them
|
||||
every 10 timesteps.
|
||||
|
||||
|
||||
[Output info:]
|
||||
|
||||
The array values are "intensive". The array values will be in
|
||||
metal units ("units"_units.html).
|
||||
|
||||
[Restrictions:]
|
||||
|
||||
The {spin} compute is part of the SPIN package.
|
||||
This compute is only enabled if LAMMPS was built with this package.
|
||||
See the "Making LAMMPS"_Section_start.html#start_3 section for more info.
|
||||
The atom_style has to be "spin" for this compute to be valid.
|
||||
|
||||
[Related commands:] none
|
||||
|
||||
|
||||
[Default:] none
|
||||
|
||||
:line
|
||||
|
||||
:link(Nurdin1)
|
||||
[(Nurdin)] Nurdin and Schotte Phys Rev E, 61(4), 3579 (2000)
|
||||
|
||||
@ -31,6 +31,7 @@ Computes :h1
|
||||
compute_dpd
|
||||
compute_dpd_atom
|
||||
compute_edpd_temp_atom
|
||||
compute_entropy_atom
|
||||
compute_erotate_asphere
|
||||
compute_erotate_rigid
|
||||
compute_erotate_sphere
|
||||
@ -95,6 +96,7 @@ Computes :h1
|
||||
compute_smd_ulsph_stress
|
||||
compute_smd_vol
|
||||
compute_sna_atom
|
||||
compute_spin
|
||||
compute_stress_atom
|
||||
compute_tally
|
||||
compute_tdpd_cc_atom
|
||||
|
||||
@ -37,8 +37,8 @@ keyword = {special} :l
|
||||
|
||||
create_bonds many all all 1 1.0 1.2
|
||||
create_bonds many surf solvent 3 2.0 2.4
|
||||
create_bond single/bond 1 1 2
|
||||
create_bond single/angle 5 52 98 107 special no :pre
|
||||
create_bonds single/bond 1 1 2
|
||||
create_bonds single/angle 5 52 98 107 special no :pre
|
||||
|
||||
[Description:]
|
||||
|
||||
|
||||
205
doc/src/dihedral_table_cut.txt
Normal file
@ -0,0 +1,205 @@
|
||||
"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c
|
||||
|
||||
:link(lws,http://lammps.sandia.gov)
|
||||
:link(ld,Manual.html)
|
||||
:link(lc,Section_commands.html#comm)
|
||||
|
||||
:line
|
||||
|
||||
dihedral_style table/cut command :h3
|
||||
|
||||
[Syntax:]
|
||||
|
||||
dihedral_style table/cut style Ntable :pre
|
||||
|
||||
style = {linear} or {spline} = method of interpolation
|
||||
Ntable = size of the internal lookup table :ul
|
||||
|
||||
[Examples:]
|
||||
|
||||
dihedral_style table/cut spline 400
|
||||
dihedral_style table/cut linear 1000
|
||||
dihedral_coeff 1 aat 1.0 177 180 file.table DIH_TABLE1
|
||||
dihedral_coeff 2 aat 0.5 170 180 file.table DIH_TABLE2 :pre
|
||||
|
||||
[Description:]
|
||||
|
||||
The {table/cut} dihedral style creates interpolation tables of length
|
||||
{Ntable} from dihedral potential and derivative values listed in a
|
||||
file(s) as a function of the dihedral angle "phi". In addition, an
|
||||
analytic cutoff that is quadratic in the bond-angle (theta) is applied
|
||||
in order to regularize the dihedral interaction. The dihedral table
|
||||
files are read by the "dihedral_coeff"_dihedral_coeff.html command.
|
||||
|
||||
The interpolation tables are created by fitting cubic splines to the
|
||||
file values and interpolating energy and derivative values at each of
|
||||
{Ntable} dihedral angles. During a simulation, these tables are used
|
||||
to interpolate energy and force values on individual atoms as
|
||||
needed. The interpolation is done in one of 2 styles: {linear} or
|
||||
{spline}.
|
||||
|
||||
For the {linear} style, the dihedral angle (phi) is used to find 2
|
||||
surrounding table values from which an energy or its derivative is
|
||||
computed by linear interpolation.
|
||||
|
||||
For the {spline} style, cubic spline coefficients are computed and
|
||||
stored at each of the {Ntable} evenly-spaced values in the
|
||||
interpolated table. For a given dihedral angle (phi), the appropriate
|
||||
coefficients are chosen from this list, and a cubic polynomial is used
|
||||
to compute the energy and the derivative at this angle.
|
||||
|
||||
The following coefficients must be defined for each dihedral type via
|
||||
the "dihedral_coeff"_dihedral_coeff.html command as in the example
|
||||
above.
|
||||
|
||||
style (aat)
|
||||
cutoff prefactor
|
||||
cutoff angle1
|
||||
cutoff angle2
|
||||
filename
|
||||
keyword :ul
|
||||
|
||||
The cutoff dihedral style uses a tabulated dihedral interaction with a
|
||||
cutoff function:
|
||||
|
||||
:c,image(Eqs/dihedral_table_cut.jpg)
|
||||
|
||||
The cutoff specifies an prefactor to the cutoff function. While this value
|
||||
would ordinarily equal 1 there may be situations where the value should change.
|
||||
|
||||
The cutoff angle1 specifies the angle (in degrees) below which the dihedral
|
||||
interaction is unmodified, i.e. the cutoff function is 1.
|
||||
|
||||
The cutoff function is applied between angle1 and angle2, which is the angle at
|
||||
which the cutoff function drops to zero. The value of zero effectively "turns
|
||||
off" the dihedral interaction.
|
||||
|
||||
The filename specifies a file containing tabulated energy and
|
||||
derivative values. The keyword specifies a section of the file. The
|
||||
format of this file is described below.
|
||||
|
||||
:line
|
||||
|
||||
The format of a tabulated file is as follows (without the
|
||||
parenthesized comments). It can begin with one or more comment
|
||||
or blank lines.
|
||||
|
||||
# Table of the potential and its negative derivative :pre
|
||||
|
||||
DIH_TABLE1 (keyword is the first text on line)
|
||||
N 30 DEGREES (N, NOF, DEGREES, RADIANS, CHECKU/F)
|
||||
(blank line)
|
||||
1 -168.0 -1.40351172223 0.0423346818422
|
||||
2 -156.0 -1.70447981034 0.00811786522531
|
||||
3 -144.0 -1.62956100432 -0.0184129719987
|
||||
...
|
||||
30 180.0 -0.707106781187 0.0719306095245 :pre
|
||||
|
||||
# Example 2: table of the potential. Forces omitted :pre
|
||||
|
||||
DIH_TABLE2
|
||||
N 30 NOF CHECKU testU.dat CHECKF testF.dat :pre
|
||||
|
||||
1 -168.0 -1.40351172223
|
||||
2 -156.0 -1.70447981034
|
||||
3 -144.0 -1.62956100432
|
||||
...
|
||||
30 180.0 -0.707106781187 :pre
|
||||
|
||||
A section begins with a non-blank line whose 1st character is not a
|
||||
"#"; blank lines or lines starting with "#" can be used as comments
|
||||
between sections. The first line begins with a keyword which
|
||||
identifies the section. The line can contain additional text, but the
|
||||
initial text must match the argument specified in the
|
||||
"dihedral_coeff"_dihedral_coeff.html command. The next line lists (in
|
||||
any order) one or more parameters for the table. Each parameter is a
|
||||
keyword followed by one or more numeric values.
|
||||
|
||||
Following a blank line, the next N lines list the tabulated values. On
|
||||
each line, the 1st value is the index from 1 to N, the 2nd value is
|
||||
the angle value, the 3rd value is the energy (in energy units), and
|
||||
the 4th is -dE/d(phi) also in energy units). The 3rd term is the
|
||||
energy of the 4-atom configuration for the specified angle. The 4th
|
||||
term (when present) is the negative derivative of the energy with
|
||||
respect to the angle (in degrees, or radians depending on whether the
|
||||
user selected DEGREES or RADIANS). Thus the units of the last term
|
||||
are still energy, not force. The dihedral angle values must increase
|
||||
from one line to the next.
|
||||
|
||||
Dihedral table splines are cyclic. There is no discontinuity at 180
|
||||
degrees (or at any other angle). Although in the examples above, the
|
||||
angles range from -180 to 180 degrees, in general, the first angle in
|
||||
the list can have any value (positive, zero, or negative). However
|
||||
the {range} of angles represented in the table must be {strictly} less
|
||||
than 360 degrees (2pi radians) to avoid angle overlap. (You may not
|
||||
supply entries in the table for both 180 and -180, for example.) If
|
||||
the user's table covers only a narrow range of dihedral angles,
|
||||
strange numerical behavior can occur in the large remaining gap.
|
||||
|
||||
[Parameters:]
|
||||
|
||||
The parameter "N" is required and its value is the number of table
|
||||
entries that follow. Note that this may be different than the N
|
||||
specified in the "dihedral_style table"_dihedral_style.html command.
|
||||
Let {Ntable} is the number of table entries requested dihedral_style
|
||||
command, and let {Nfile} be the parameter following "N" in the
|
||||
tabulated file ("30" in the sparse example above). What LAMMPS does
|
||||
is a preliminary interpolation by creating splines using the {Nfile}
|
||||
tabulated values as nodal points. It uses these to interpolate as
|
||||
needed to generate energy and derivative values at {Ntable} different
|
||||
points (which are evenly spaced over a 360 degree range, even if the
|
||||
angles in the file are not). The resulting tables of length {Ntable}
|
||||
are then used as described above, when computing energy and force for
|
||||
individual dihedral angles and their atoms. This means that if you
|
||||
want the interpolation tables of length {Ntable} to match exactly what
|
||||
is in the tabulated file (with effectively nopreliminary
|
||||
interpolation), you should set {Ntable} = {Nfile}. To insure the
|
||||
nodal points in the user's file are aligned with the interpolated
|
||||
table entries, the angles in the table should be integer multiples of
|
||||
360/{Ntable} degrees, or 2*PI/{Ntable} radians (depending on your
|
||||
choice of angle units).
|
||||
|
||||
The optional "NOF" keyword allows the user to omit the forces
|
||||
(negative energy derivatives) from the table file (normally located in
|
||||
the 4th column). In their place, forces will be calculated
|
||||
automatically by differentiating the potential energy function
|
||||
indicated by the 3rd column of the table (using either linear or
|
||||
spline interpolation).
|
||||
|
||||
The optional "DEGREES" keyword allows the user to specify angles in
|
||||
degrees instead of radians (default).
|
||||
|
||||
The optional "RADIANS" keyword allows the user to specify angles in
|
||||
radians instead of degrees. (Note: This changes the way the forces
|
||||
are scaled in the 4th column of the data file.)
|
||||
|
||||
The optional "CHECKU" keyword is followed by a filename. This allows
|
||||
the user to save all of the the {Ntable} different entries in the
|
||||
interpolated energy table to a file to make sure that the interpolated
|
||||
function agrees with the user's expectations. (Note: You can
|
||||
temporarily increase the {Ntable} parameter to a high value for this
|
||||
purpose. "{Ntable}" is explained above.)
|
||||
|
||||
The optional "CHECKF" keyword is analogous to the "CHECKU" keyword.
|
||||
It is followed by a filename, and it allows the user to check the
|
||||
interpolated force table. This option is available even if the user
|
||||
selected the "NOF" option.
|
||||
|
||||
Note that one file can contain many sections, each with a tabulated
|
||||
potential. LAMMPS reads the file section by section until it finds one
|
||||
that matches the specified keyword.
|
||||
|
||||
[Restrictions:]
|
||||
|
||||
This dihedral style can only be used if LAMMPS was built with the
|
||||
USER-MISC package. See the "Making LAMMPS"_Section_start.html#start_3
|
||||
section for more info on packages.
|
||||
|
||||
[Related commands:]
|
||||
|
||||
"dihedral_coeff"_dihedral_coeff.html, "dihedral_style table"_dihedral_table.html
|
||||
|
||||
[Default:] none
|
||||
|
||||
:link(dihedralcut-Salerno)
|
||||
[(Salerno)] Salerno, Bernstein, J Chem Theory Comput, --, ---- (2018).
|
||||
@ -19,6 +19,7 @@ Dihedral Styles :h1
|
||||
dihedral_quadratic
|
||||
dihedral_spherical
|
||||
dihedral_table
|
||||
dihedral_table_cut
|
||||
dihedral_zero
|
||||
dihedral_charmm
|
||||
dihedral_class2
|
||||
|
||||
@ -15,7 +15,7 @@ dump_modify dump-ID keyword values ... :pre
|
||||
dump-ID = ID of dump to modify :ulb,l
|
||||
one or more keyword/value pairs may be appended :l
|
||||
these keywords apply to various dump styles :l
|
||||
keyword = {append} or {at} or {buffer} or {delay} or {element} or {every} or {fileper} or {first} or {flush} or {format} or {image} or {label} or {nfile} or {pad} or {precision} or {region} or {scale} or {sort} or {thresh} or {unwrap} :l
|
||||
keyword = {append} or {at} or {buffer} or {delay} or {element} or {every} or {fileper} or {first} or {flush} or {format} or {image} or {label} or {maxfiles} or {nfile} or {pad} or {precision} or {region} or {scale} or {sort} or {thresh} or {unwrap} :l
|
||||
{append} arg = {yes} or {no}
|
||||
{at} arg = N
|
||||
N = index of frame written upon first dump
|
||||
@ -37,6 +37,8 @@ keyword = {append} or {at} or {buffer} or {delay} or {element} or {every} or {fi
|
||||
{image} arg = {yes} or {no}
|
||||
{label} arg = string
|
||||
string = character string (e.g. BONDS) to use in header of dump local file
|
||||
{maxfiles} arg = Fmax
|
||||
Fmax = keep only the most recent {Fmax} snapshots (one snapshot per file)
|
||||
{nfile} arg = Nf
|
||||
Nf = write this many files, one from each of Nf processors
|
||||
{pad} arg = Nchar = # of characters to convert timestep to
|
||||
@ -364,6 +366,20 @@ e.g. BONDS or ANGLES.
|
||||
|
||||
:line
|
||||
|
||||
The {maxfiles} keyword can only be used when a '*' wildcard is
|
||||
included in the dump file name, i.e. when writing a new file(s) for
|
||||
each snapshot. The specified {Fmax} is how many snapshots will be
|
||||
kept. Once this number is reached, the file(s) containing the oldest
|
||||
snapshot is deleted before a new dump file is written. If the
|
||||
specified {Fmax} <= 0, then all files are retained.
|
||||
|
||||
This can be useful for debugging, especially if you don't know on what
|
||||
timestep something bad will happen, e.g. when LAMMPS will exit with an
|
||||
error. You can dump every timestep, and limit the number of dump
|
||||
files produced, even if you run for 1000s of steps.
|
||||
|
||||
:line
|
||||
|
||||
The {nfile} or {fileper} keywords can be used in conjunction with the
|
||||
"%" wildcard character in the specified dump file name, for all dump
|
||||
styles except the {dcd}, {image}, {movie}, {xtc}, and {xyz} styles
|
||||
@ -470,7 +486,7 @@ to respond to the call from the dump command, and update the
|
||||
appropriate reference positions. This is done be defining an
|
||||
"atom-style variable"_variable.html, {check} in this example, which
|
||||
calculates a Boolean value (0 or 1) for each atom, based on the same
|
||||
criterion used by dump_modify thresh.
|
||||
criterion used by dump_modify thresh.
|
||||
|
||||
See the "compute displace/atom"_compute_displace_atom.html command for
|
||||
more details, including an example of how to produce output that
|
||||
@ -584,13 +600,13 @@ included.)
|
||||
|
||||
region foo sphere 10 20 10 15
|
||||
variable inregion atom rmask(foo)
|
||||
dump_modify ... thresh v_inregion |^ LAST
|
||||
dump_modify ... thresh v_inregion |^ LAST :pre
|
||||
|
||||
This will dump atoms which crossed the boundary of the spherical
|
||||
region since the last dump.
|
||||
|
||||
variable charge atom "(q > 0.5) || (q < -0.5)"
|
||||
dump_modify ... thresh v_charge |^ LAST
|
||||
dump_modify ... thresh v_charge |^ LAST :pre
|
||||
|
||||
This will dump atoms whose charge has changed from an absolute value
|
||||
less than 1/2 to greater than 1/2 (or vice versa) since the last dump.
|
||||
@ -901,6 +917,7 @@ flush = yes
|
||||
format = %d and %g for each integer or floating point value
|
||||
image = no
|
||||
label = ENTRIES
|
||||
maxifiles = -1
|
||||
nfile = 1
|
||||
pad = 0
|
||||
pbc = no
|
||||
|
||||
@ -205,6 +205,14 @@ a bond coefficient over time, very similar to how the {pair} keyword
|
||||
operates. The only difference is that now a bond coefficient for a
|
||||
given bond type is adapted.
|
||||
|
||||
A wild-card asterisk can be used in place of or in conjunction with
|
||||
the bond type argument to set the coefficients for multiple bond types.
|
||||
This takes the form "*" or "*n" or "n*" or "m*n". If N = the number of
|
||||
atom types, then an asterisk with no numeric values means all types
|
||||
from 1 to N. A leading asterisk means all types from 1 to n (inclusive).
|
||||
A trailing asterisk means all types from n to N (inclusive). A middle
|
||||
asterisk means all types from m to n (inclusive).
|
||||
|
||||
Currently {bond} does not support bond_style hybrid nor bond_style
|
||||
hybrid/overlay as bond styles. The only bonds that currently are
|
||||
working with fix_adapt are
|
||||
|
||||
112
doc/src/fix_bocs.txt
Normal file
@ -0,0 +1,112 @@
|
||||
<"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c
|
||||
|
||||
:link(lws,http://lammps.sandia.gov)
|
||||
:link(ld,Manual.html)
|
||||
:link(lc,Section_commands.html#comm)
|
||||
|
||||
:line
|
||||
|
||||
fix bocs command :h3
|
||||
|
||||
[Syntax:]
|
||||
|
||||
fix ID group-ID bocs keyword values ... :pre
|
||||
|
||||
keyword = {temp} or {cgiso} or {analytic} or {linear_spline} or {cubic_spline}
|
||||
{temp} values = Tstart Tstop Tdamp
|
||||
{cgiso} values = Pstart Pstop Pdamp
|
||||
{basis set}
|
||||
{analytic} values = V_avg N_particles N_coeff Coeff_1 Coeff_2 ... Coeff_N
|
||||
{linear_spline} values = input_filename
|
||||
{cubic_spline} values = input_filename :pre
|
||||
:ule
|
||||
|
||||
[Examples:]
|
||||
|
||||
fix 1 all bocs temp 300.0 300.0 100.0 cgiso 0.986 0.986 1000.0 analytic 66476.015 968 2 245030.10 8962.20 :pre
|
||||
|
||||
fix 1 all bocs temp 300.0 300.0 100.0 cgiso 0.986 0.986 1000.0 cubic_spline input_Fv.dat :pre
|
||||
|
||||
thermo_modify press 1_press :pre
|
||||
|
||||
|
||||
[Description:]
|
||||
|
||||
These commands incorporate a pressure correction as described by
|
||||
Dunn and Noid in "(Dunn1)"_#bocs-Dunn1 to the standard MTTK
|
||||
barostat by Martyna et. al. in "(Martyna)"_#bocs-Martyna .
|
||||
The first half of the command mimics a standard fix npt command:
|
||||
|
||||
fix 1 all bocs temp Tstart Tstop Tcoupl cgiso Pstart Pstop Pdamp :pre
|
||||
|
||||
The two differences are replacing {npt} with {bocs}, and replacing
|
||||
{iso}/{aniso}/{etc} with {cgiso}.
|
||||
The rest of the command details what form you would like to use for
|
||||
the pressure correction equation. The choices are: {analytic}, {linear_spline},
|
||||
or {cubic_spline}.
|
||||
|
||||
With either spline method, the only argument that needs to follow it
|
||||
is the name of a file that contains the desired pressure correction
|
||||
as a function of volume. The file should be formatted so each line has:
|
||||
|
||||
Volume_i, PressureCorrection_i :pre
|
||||
|
||||
Note both the COMMA and the SPACE separating the volume's
|
||||
value and its corresponding pressure correction. The volumes in the file
|
||||
should be uniformly spaced. Both the volumes and the pressure corrections
|
||||
should be provided in the proper units, e.g. if you are using {units real},
|
||||
the volumes should all be in cubic angstroms, and the pressure corrections
|
||||
should all be in atomspheres. Furthermore, the table should start/end at a
|
||||
volume considerably smaller/larger than you expect your system to sample
|
||||
during the simulation. If the system ever reaches a volume outside of the
|
||||
range provided, the simulation will stop.
|
||||
|
||||
With the {analytic} option, the arguments are as follows:
|
||||
|
||||
... analytic V_avg N_particles N_coeff Coeff_1 Coeff_2 ... Coeff_N :pre
|
||||
|
||||
Note that {V_avg} and {Coeff_i} should all be in the proper units, e.g. if you
|
||||
are using {units real}, {V_avg} should be in cubic angstroms, and the
|
||||
coefficients should all be in atmospheres * cubic angstroms.
|
||||
|
||||
[Restrictions:]
|
||||
|
||||
As this is computing a (modified) pressure, group-ID should be {all}.
|
||||
|
||||
The pressure correction has only been tested for use with an isotropic
|
||||
pressure coupling in 3 dimensions.
|
||||
|
||||
By default, LAMMPS will still report the normal value for the pressure
|
||||
if the pressure is printed via a {thermo} command, or if the pressures
|
||||
are written to a file every so often. In order to have LAMMPS report the
|
||||
modified pressure, you must include the {thermo_modify} command given in
|
||||
the examples. For the last argument in the command, you should put
|
||||
XXXX_press, where XXXX is the ID given to the fix bocs command (in the
|
||||
example, the ID of the fix bocs command is 1 ).
|
||||
|
||||
This fix is part of the USER-BOCS package. It is only enabled if
|
||||
LAMMPS was built with that package. See the "Making
|
||||
LAMMPS"_Section_start.html#start_3 section for more info.
|
||||
|
||||
[Related:]
|
||||
|
||||
For more details about the pressure correction and the entire BOCS software
|
||||
package, visit the "BOCS package on github"_bocsgithub and read the release
|
||||
paper by Dunn et. al. "(Dunn2)"_#bocs-Dunn2 .
|
||||
|
||||
|
||||
:link(bocsgithub,https://github.com/noid-group/BOCS)
|
||||
|
||||
:line
|
||||
|
||||
:link(bocs-Dunn1)
|
||||
[(Dunn1)] Dunn and Noid, J Chem Phys, 143, 243148 (2015).
|
||||
|
||||
:link(bocs-Martyna)
|
||||
[(Martyna)] Martyna, Tobias, and Klein, J Chem Phys, 101, 4177 (1994).
|
||||
|
||||
:link(bocs-Dunn2)
|
||||
[(Dunn2)] Dunn, Lebold, DeLyser, Rudzinski, and Noid, J. Phys. Chem. B, 122, 3363 (2018).
|
||||
|
||||
|
||||
|
||||
332
doc/src/fix_bond_react.txt
Normal file
@ -0,0 +1,332 @@
|
||||
"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c
|
||||
|
||||
:link(lws,http://lammps.sandia.gov)
|
||||
:link(ld,Manual.html)
|
||||
:link(lc,Section_commands.html#comm)
|
||||
|
||||
:line
|
||||
|
||||
fix bond/react command :h3
|
||||
|
||||
[Syntax:]
|
||||
|
||||
fix ID group-ID bond/react common_keyword values ...
|
||||
react react-ID react-group-ID Nevery Rmin Rmax template-ID(pre-reacted) template-ID(post-reacted) map_file individual_keyword values ...
|
||||
react react-ID react-group-ID Nevery Rmin Rmax template-ID(pre-reacted) template-ID(post-reacted) map_file individual_keyword values ...
|
||||
react react-ID react-group-ID Nevery Rmin Rmax template-ID(pre-reacted) template-ID(post-reacted) map_file individual_keyword values ...
|
||||
... :pre
|
||||
|
||||
ID, group-ID are documented in "fix"_fix.html command. Group-ID is ignored. :ulb,l
|
||||
bond/react = style name of this fix command :l
|
||||
zero or more common keyword/value pairs may be appended directly after 'bond/react' :l
|
||||
these apply to all reaction specifications (below) :l
|
||||
common_keyword = {stabilization} :l
|
||||
{stabilization} values = {no} or {yes} {group-ID} {xmax}
|
||||
{no} = no reaction site stabilization
|
||||
{yes} = perform reaction site stabilization
|
||||
{group-ID} = user-assigned ID for all non-reacting atoms (group created internally)
|
||||
{xmax} = xmax value that is used by an internally created "nve/limit"_fix_nve_limit.html integrator :pre
|
||||
react = mandatory argument indicating new reaction specification :l
|
||||
react-ID = user-assigned name for the reaction :l
|
||||
react-group-ID = only atoms in this group are available for the reaction :l
|
||||
Nevery = attempt reaction every this many steps :l
|
||||
Rmin = bonding pair atoms must be separated by more than Rmin to initiate reaction (distance units) :l
|
||||
Rmax = bonding pair atoms must be separated by less than Rmax to initiate reaction (distance units) :l
|
||||
template-ID(pre-reacted) = ID of a molecule template containing pre-reaction topology :l
|
||||
template-ID(post-reacted) = ID of a molecule template containing post-reaction topology :l
|
||||
map_file = name of file specifying corresponding atomIDs in the pre- and post-reacted templates :l
|
||||
zero or more individual keyword/value pairs may be appended to each react argument :l
|
||||
individual_keyword = {prob} or {stabilize_steps} :l
|
||||
{prob} values = fraction seed
|
||||
fraction = initiate reaction with this probability if otherwise eligible
|
||||
seed = random number seed (positive integer)
|
||||
{stabilize_steps} value = timesteps
|
||||
timesteps = number of timesteps to apply internally created nve/limit.html :pre
|
||||
:ule
|
||||
|
||||
[Examples:]
|
||||
|
||||
molecule mol1 pre_reacted_topology.txt
|
||||
molecule mol2 post_reacted_topology.txt
|
||||
fix 5 all bond/react stabilization no react myrxn1 all 1 0 3.25 mol1 mol2 map_file.txt :pre
|
||||
|
||||
molecule mol1 pre_reacted_rxn1.txt
|
||||
molecule mol2 post_reacted_rxn1.txt
|
||||
molecule mol3 pre_reacted_rxn2.txt
|
||||
molecule mol4 post_reacted_rxn2.txt
|
||||
fix 5 all bond/react stabilization yes nvt_grp .03 &
|
||||
react myrxn1 all 1 0 3.25 mol1 mol2 map_file_rxn1.txt prob 0.50 12345 &
|
||||
react myrxn2 all 1 0 2.75 mol3 mol4 map_file_rxn2.txt prob 0.25 12345
|
||||
fix 6 nvt_grp nvt temp 300 300 100 # set thermostat after bond/react :pre
|
||||
|
||||
[Description:]
|
||||
|
||||
Initiate complex covalent bonding (topology) changes. These topology
|
||||
changes will be referred to as 'reactions' throughout this
|
||||
documentation. Topology changes are defined in pre- and post-reaction
|
||||
molecule templates and can include creation and deletion of bonds,
|
||||
angles, dihedrals, impropers, bond-types, angle-types, dihedral-types,
|
||||
atom-types, or atomic charges.
|
||||
|
||||
Fix bond/react does not use quantum mechanical (eg. fix qmmm) or
|
||||
pairwise bond-order potential (eg. Tersoff or AIREBO) methods to
|
||||
determine bonding changes a priori. Rather, it uses a distance-based
|
||||
probabilistic criteria to effect predetermined topology changes in
|
||||
simulations using standard force fields.
|
||||
|
||||
This fix was created to facilitate the dynamic creation of polymeric,
|
||||
amorphous or highly-crosslinked systems. A suggested workflow for
|
||||
using this fix is: 1) identify a reaction to be simulated 2) build a
|
||||
molecule template of the reaction site before the reaction has
|
||||
occurred 3) build a molecule template of the reaction site after the
|
||||
reaction has occurred 4) create a map that relates the
|
||||
template-atom-IDs of each atom between pre- and post-reaction molecule
|
||||
templates 5) fill a simulation box with molecules and run a simulation
|
||||
with fix bond/react.
|
||||
|
||||
Only one 'fix bond/react' command can be used at a time. Multiple
|
||||
reactions can be simultaneously applied by specifying multiple {react}
|
||||
arguments to a single 'fix bond/react' command. This syntax is
|
||||
necessary because the 'common keywords' are applied to all reactions.
|
||||
|
||||
The {stabilization} keyword enables reaction site stabilization.
|
||||
Reaction site stabilization is performed by including reacting atoms
|
||||
in an internally created fix "nve/limit"_fix_nve_limit.html time
|
||||
integrator for a set number of timesteps given by the
|
||||
{stabilize_steps} keyword. While reacting atoms are being time
|
||||
integrated by the internal nve/limit, they are prevented from being
|
||||
involved in any new reactions. The {xmax} value keyword should
|
||||
typically be set to the maximum distance that non-reacting atoms move
|
||||
during the simulation.
|
||||
|
||||
The group-ID set using the {stabilization} keyword should be a
|
||||
previously unused group-ID. It cannot be specified as 'all'. The fix
|
||||
bond/react command creates a "dynamic group"_group.html of this name
|
||||
that includes all non-reacting atoms. This dynamic group-ID should
|
||||
then be used by a subsequent system-wide time integrator such as nvt,
|
||||
npt, or nve, as shown in the second example above. It is currently
|
||||
necessary to place the time integration command after the fix
|
||||
bond/react command due to the internal dynamic grouping performed by
|
||||
fix bond/react.
|
||||
|
||||
NOTE: The internally created group currently applies to all atoms in
|
||||
the system, i.e. you should generally not have a separate thermostat
|
||||
which acts on the 'all' group.
|
||||
|
||||
The following comments pertain to each {react} argument:
|
||||
|
||||
A check for possible new reaction sites is performed every {Nevery}
|
||||
timesteps.
|
||||
|
||||
Two conditions must be met for a reaction to occur. First a bonding
|
||||
atom pair must be identified. Second, the topology surrounding the
|
||||
bonding atom pair must match the topology of the pre-reaction
|
||||
template. If both these conditions are met, the reaction site is
|
||||
modified to match the post-reaction template.
|
||||
|
||||
A bonding atom pair will be identified if several conditions are met.
|
||||
First, a pair of atoms within the specified react-group-ID of type
|
||||
typei and typej must 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 not
|
||||
1-2, 1-3, or 1-4 neighbors, the closest bonding atom partner is set as
|
||||
its bonding partner; otherwise, the farthest potential partner is
|
||||
chosen. Then, if both an atomi and atomj have each other as their
|
||||
nearest 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
|
||||
surrounding topology. As described below, the bonding atom pairs of
|
||||
the pre-reacted template are specified by atom ID in the map file. The
|
||||
pre-reacted molecule template should contain as few atoms as possible
|
||||
while still completely describing the topology of all atoms affected
|
||||
by the reaction. For example, if the force field contains dihedrals,
|
||||
the pre-reacted template should contain any atom within three bonds of
|
||||
reacting atoms.
|
||||
|
||||
Some atoms in the pre-reacted template that are not reacting may have
|
||||
missing topology with respect to the simulation. For example, the
|
||||
pre-reacted template may contain an atom that would connect to the
|
||||
rest of a long polymer chain. These are referred to as edge atoms, and
|
||||
are also specified in the map file.
|
||||
|
||||
Note that some care must be taken when a building a molecule template
|
||||
for a given simulation. All atom types in the pre-reacted template
|
||||
must be the same as those of a potential reaction site in the
|
||||
simulation. A detailed discussion of matching molecule template atom
|
||||
types with the simulation is provided on the "molecule"_molecule.html
|
||||
command page.
|
||||
|
||||
The post-reacted molecule template contains a sample of the reaction
|
||||
site and its surrounding topology after the reaction has occurred. It
|
||||
must contain the same number of atoms as the pre-reacted template. A
|
||||
one-to-one correspondence between the atom IDs in the pre- and
|
||||
post-reacted templates is specified in the map file as described
|
||||
below. Note that during a reaction, an atom, bond, etc. type may
|
||||
change to one that was previously not present in the simulation. These
|
||||
new types must also be defined during the setup of a given simulation.
|
||||
A discussion of correctly handling this is also provided on the
|
||||
"molecule"_molecule.html command page.
|
||||
|
||||
The map file is a text document with the following format:
|
||||
|
||||
A map file has a header and a body. The header of map file the
|
||||
contains one mandatory keyword and one optional keyword. The mandatory
|
||||
keyword is 'equivalences' and the optional keyword is 'edgeIDs':
|
||||
|
||||
N {equivalences} = # of atoms N in the reaction molecule templates
|
||||
N {edgeIDs} = # of edge atoms N in the pre-reacted molecule template :pre
|
||||
|
||||
The body of the map file contains two mandatory sections and one
|
||||
optional section. The first mandatory section begins with the keyword
|
||||
'BondingIDs' and lists the atom IDs of the bonding atom pair in the
|
||||
pre-reacted molecule template. The second mandatory section begins
|
||||
with the keyword 'Equivalences' and lists a one-to-one correspondence
|
||||
between atom IDs of the pre- and post-reacted templates. The first
|
||||
column is an atom ID of the pre-reacted molecule template, and the
|
||||
second column is the corresponding atom ID of the post-reacted
|
||||
molecule template. The optional section begins with the keyword
|
||||
'EdgeIDs' and lists the atom IDs of edge atoms in the pre-reacted
|
||||
molecule template.
|
||||
|
||||
A sample map file is given below:
|
||||
|
||||
:line
|
||||
|
||||
# this is a map file :pre
|
||||
|
||||
2 edgeIDs
|
||||
7 equivalences :pre
|
||||
|
||||
BondingIDs :pre
|
||||
|
||||
3
|
||||
5 :pre
|
||||
|
||||
EdgeIDs :pre
|
||||
|
||||
1
|
||||
7 :pre
|
||||
|
||||
Equivalences :pre
|
||||
|
||||
1 1
|
||||
2 2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
6 6
|
||||
7 7 :pre
|
||||
|
||||
:line
|
||||
|
||||
Once a reaction site has been successfully identified, data structures
|
||||
within LAMMPS that store bond topology are updated to reflect the
|
||||
post-reacted molecule template. All force fields with fixed bonds,
|
||||
angles, dihedrals or impropers are supported.
|
||||
|
||||
A few capabilities to note: 1) You may specify as many {react}
|
||||
arguments as desired. For example, you could break down a complicated
|
||||
reaction mechanism into several reaction steps, each defined by its
|
||||
own {react} argument. 2) While typically a bond is formed or removed
|
||||
between the bonding atom pairs specified in the pre-reacted molecule
|
||||
template, this is not required. 3) By reversing the order of the pre-
|
||||
and post- reacted molecule templates in another {react} argument, you
|
||||
can allow for the possibility of one or more reverse reactions.
|
||||
|
||||
The optional keywords deal with the probability of a given reaction
|
||||
occurring as well as the stable equilibration of each reaction site as
|
||||
it occurs.
|
||||
|
||||
The {prob} keyword can affect whether 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
|
||||
eligible reaction only occurs if the random number is less than the
|
||||
fraction.
|
||||
|
||||
The {stabilize_steps} keyword allows for the specification of how many
|
||||
timesteps a reaction site is stabilized before being returned to the
|
||||
overall system thermostat.
|
||||
|
||||
In order to produce the most physical behavior, this 'reaction site
|
||||
equilibration time' should be tuned to be as small as possible while
|
||||
retaining stability for a given system or reaction step. After a
|
||||
limited number of case studies, this number has been set to a default
|
||||
of 60 timesteps. Ideally, it should be individually tuned for each fix
|
||||
reaction step. Note that in some situations, decreasing rather than
|
||||
increasing this parameter will result in an increase in stability.
|
||||
|
||||
A few other considerations:
|
||||
|
||||
It may be beneficial to ensure reacting atoms are at a certain
|
||||
temperature before being released to the overall thermostat. For this,
|
||||
you can use the internally-created dynamic group named
|
||||
"bond_react_MASTER_group." For example, adding the following command
|
||||
would thermostat the group of all atoms currently involved in a
|
||||
reaction:
|
||||
|
||||
fix 1 bond_react_MASTER_group temp/rescale 1 300 300 10 1 :pre
|
||||
|
||||
NOTE: This command must be added after the fix bond/react command, and
|
||||
will apply to all reactions.
|
||||
|
||||
Computationally, each timestep this fix operates, it loops over
|
||||
neighbor lists (for bond-forming reactions) and computes distances
|
||||
between pairs of atoms in the list. It also communicates between
|
||||
neighboring processors to coordinate which bonds are created and/or
|
||||
removed. All of these operations increase the cost of a timestep. Thus
|
||||
you should be cautious about invoking this fix too frequently.
|
||||
|
||||
You can dump out snapshots of the current bond topology via the dump
|
||||
local command.
|
||||
|
||||
:line
|
||||
|
||||
[Restart, fix_modify, output, run start/stop, minimize info:]
|
||||
|
||||
No information about this fix is written to "binary restart
|
||||
files"_restart.html, aside from internally-created per-atom
|
||||
properties. None of the "fix_modify"_fix_modify.html 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
|
||||
can be accessed by various "output
|
||||
commands"_Section_howto.html#howto_15. The vector values calculated by
|
||||
this fix are "intensive".
|
||||
|
||||
These is 1 quantity for each react argument:
|
||||
|
||||
(1) cumulative # of reactions occurred :ul
|
||||
|
||||
No parameter of this fix can be used with the {start/stop} keywords of
|
||||
the "run"_run.html command. This fix is not invoked during "energy
|
||||
minimization"_minimize.html.
|
||||
|
||||
[Restrictions:]
|
||||
|
||||
This fix is part of the USER-MISC package. It is only enabled if
|
||||
LAMMPS was built with that package. See the "Making
|
||||
LAMMPS"_Section_start.html#start_3 section for more info.
|
||||
|
||||
[Related commands:]
|
||||
|
||||
"fix bond/create"_fix_bond_create.html, "fix
|
||||
bond/break"_fix_bond_break.html, "fix bond/swap"_fix_bond_swap.html,
|
||||
"dump local"_dump.html, "special_bonds"_special_bonds.html
|
||||
|
||||
[Default:]
|
||||
|
||||
The option defaults are stabilization = no, stabilize_steps = 60
|
||||
|
||||
:line
|
||||
|
||||
:link(Gissinger)
|
||||
[(Gissinger)] Gissinger, Jensen and Wise, Polymer, 128, 211 (2017).
|
||||
@ -19,7 +19,9 @@ Tmin = minimum dt allowed which can be NULL (time units)
|
||||
Tmax = maximum dt allowed which can be NULL (time units)
|
||||
Xmax = maximum distance for an atom to move in one timestep (distance units)
|
||||
zero or more keyword/value pairs may be appended
|
||||
keyword = {units} :ul
|
||||
keyword = {emax} or {units} :ul
|
||||
{emax} value = Emax
|
||||
Emax = maximum kinetic energy change for an atom in one timestep (energy units)
|
||||
{units} value = {lattice} or {box}
|
||||
lattice = Xmax is defined in lattice units
|
||||
box = Xmax is defined in simulation box units :pre
|
||||
@ -27,12 +29,17 @@ keyword = {units} :ul
|
||||
[Examples:]
|
||||
|
||||
fix 5 all dt/reset 10 1.0e-5 0.01 0.1
|
||||
fix 5 all dt/reset 10 0.01 2.0 0.2 units box :pre
|
||||
fix 5 all dt/reset 10 0.01 2.0 0.2 units box
|
||||
fix 5 all dt/reset 5 NULL 0.001 0.5 emax 30 units box :pre
|
||||
|
||||
[Description:]
|
||||
|
||||
Reset the timestep size every N steps during a run, so that no atom
|
||||
moves further than Xmax, based on current atom velocities and forces.
|
||||
moves further than the specified {Xmax} distance, based on current
|
||||
atom velocities and forces. Optionally an additional criterion is
|
||||
imposed by the {emax} keyword, so that no atom's kinetic energy
|
||||
changes by more than the specified {Emax}.
|
||||
|
||||
This can be useful when starting from a configuration with overlapping
|
||||
atoms, where forces will be large. Or it can be useful when running
|
||||
an impact simulation where one or more high-energy atoms collide with
|
||||
@ -48,7 +55,12 @@ current velocity and force. Since performing this calculation exactly
|
||||
would require the solution to a quartic equation, a cheaper estimate
|
||||
is generated. The estimate is conservative in that the atom's
|
||||
displacement is guaranteed not to exceed {Xmax}, though it may be
|
||||
smaller.
|
||||
smaller.
|
||||
|
||||
In addition if the {emax} keyword is used, the specified {Emax} value
|
||||
is enforced as a limit on how much an atom's kinetic energy can
|
||||
change. If the timestep required is even smaller than for the {Xmax}
|
||||
displacement, then the smaller timestep is used.
|
||||
|
||||
Given this putative timestep for each atom, the minimum timestep value
|
||||
across all atoms is computed. Then the {Tmin} and {Tmax} bounds are
|
||||
@ -87,4 +99,5 @@ minimization"_minimize.html.
|
||||
|
||||
[Default:]
|
||||
|
||||
The option defaults is units = lattice.
|
||||
The option defaults are units = lattice, and no emax kinetic energy
|
||||
limit.
|
||||
|
||||
@ -154,7 +154,7 @@ Note: The temperature thermostating the core-Drude particle pairs
|
||||
should be chosen low enough, so as to mimic as closely as possible the
|
||||
self-consistent minimization. It must however be high enough, so that
|
||||
the dipoles can follow the local electric field exerted by the
|
||||
neighbouring atoms. The optimal value probably depends on the
|
||||
neighboring atoms. The optimal value probably depends on the
|
||||
temperature of the centers of mass and on the mass of the Drude
|
||||
particles.
|
||||
|
||||
|
||||
102
doc/src/fix_langevin_spin.txt
Normal file
@ -0,0 +1,102 @@
|
||||
"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c
|
||||
|
||||
:link(lws,http://lammps.sandia.gov)
|
||||
:link(ld,Manual.html)
|
||||
:link(lc,Section_commands.html#comm)
|
||||
|
||||
:line
|
||||
|
||||
fix langevin/spin command :h3
|
||||
|
||||
[Syntax:]
|
||||
|
||||
fix ID group-ID langevin/spin T Tdamp seed :pre
|
||||
|
||||
ID, group-ID are documented in "fix"_fix.html command :ulb,l
|
||||
langevin/spin = style name of this fix command :l
|
||||
T = desired temperature of the bath (temperature units, K in metal units) :l
|
||||
Tdamp = transverse magnetic damping parameter (adim) :l
|
||||
seed = random number seed to use for white noise (positive integer) :l
|
||||
:ule
|
||||
|
||||
[Examples:]
|
||||
|
||||
fix 2 all langevin/spin 300.0 0.01 21 :pre
|
||||
|
||||
[Description:]
|
||||
|
||||
Apply a Langevin thermostat as described in "(Mayergoyz)"_#Mayergoyz1 to the
|
||||
magnetic spins associated to the atoms.
|
||||
Used with "fix nve/spin"_fix_nve_spin.html, this command performs
|
||||
Brownian dynamics (BD).
|
||||
A random torque and a transverse dissipation are applied to each spin i according to
|
||||
the following stochastic differential equation:
|
||||
|
||||
:c,image(Eqs/fix_langevin_spin_sLLG.jpg)
|
||||
|
||||
with lambda the transverse damping, and eta a random verctor.
|
||||
This equation is referred to as the stochastic Landau-Lifshitz-Gilbert (sLLG)
|
||||
equation.
|
||||
|
||||
The components of eta are drawn from a Gaussian probability law. Their amplitude
|
||||
is defined as a proportion of the temperature of the external thermostat T (in K
|
||||
in metal units).
|
||||
|
||||
More details about this implementation are reported in "(Tranchida)"_#Tranchida2.
|
||||
|
||||
Note: due to the form of the sLLG equation, this fix has to be defined just
|
||||
before the nve/spin fix (and after all other magnetic fixes).
|
||||
As an example:
|
||||
|
||||
fix 1 all precession/spin zeeman 0.01 0.0 0.0 1.0
|
||||
fix 2 all langevin/spin 300.0 0.01 21
|
||||
fix 3 all nve/spin lattice yes :pre
|
||||
|
||||
is correct, but defining a force/spin command after the langevin/spin command
|
||||
would give an error message.
|
||||
|
||||
Note: The random # {seed} must be a positive integer. A Marsaglia random
|
||||
number generator is used. Each processor uses the input seed to
|
||||
generate its own unique seed and its own stream of random numbers.
|
||||
Thus the dynamics of the system will not be identical on two runs on
|
||||
different numbers of processors.
|
||||
|
||||
:line
|
||||
|
||||
[Restart, fix_modify, output, run start/stop, minimize info:]
|
||||
|
||||
No information about this fix is written to "binary restart
|
||||
files"_restart.html. Because the state of the random number generator
|
||||
is not saved in restart files, this means you cannot do "exact"
|
||||
restarts with this fix, where the simulation continues on the same as
|
||||
if no restart had taken place. However, in a statistical sense, a
|
||||
restarted simulation should produce the same behavior.
|
||||
|
||||
This fix is not invoked during "energy minimization"_minimize.html.
|
||||
|
||||
[Restrictions:]
|
||||
|
||||
The {langevin/spin} fix is part of the SPIN package.
|
||||
This style is only enabled if LAMMPS was built with this package.
|
||||
See the "Making LAMMPS"_Section_start.html#start_3 section for more info.
|
||||
|
||||
The numerical integration has to be performed with {fix nve/spin}
|
||||
when {fix langevin/spin} is enabled.
|
||||
|
||||
This fix has to be the last defined magnetic fix before the time
|
||||
integration fix (e.g. {fix nve/spin}).
|
||||
|
||||
[Related commands:]
|
||||
|
||||
"fix nve/spin"_fix_nve_spin.html, "fix precession/spin"_fix_precession_spin.html
|
||||
|
||||
[Default:] none
|
||||
|
||||
:line
|
||||
|
||||
:link(Mayergoyz1)
|
||||
[(Mayergoyz)] I.D. Mayergoyz, G. Bertotti, C. Serpico (2009). Elsevier (2009)
|
||||
|
||||
:link(Tranchida2)
|
||||
[(Tranchida)] Tranchida, Plimpton, Thibaudeau and Thompson,
|
||||
arXiv preprint arXiv:1801.10233, (2018).
|
||||
@ -14,14 +14,16 @@ fix_modify fix-ID keyword value ... :pre
|
||||
|
||||
fix-ID = ID of the fix to modify :ulb,l
|
||||
one or more keyword/value pairs may be appended :l
|
||||
keyword = {temp} or {press} or {energy} or {virial} or {respa} or {dynamic/dof} :l
|
||||
keyword = {temp} or {press} or {energy} or {virial} or {respa} or {dynamic/dof} or {bodyforces} :l
|
||||
{temp} value = compute ID that calculates a temperature
|
||||
{press} value = compute ID that calculates a pressure
|
||||
{energy} value = {yes} or {no}
|
||||
{virial} value = {yes} or {no}
|
||||
{respa} value = {1} to {max respa level} or {0} (for outermost level)
|
||||
{dynamic/dof} value = {yes} or {no}
|
||||
yes/no = do or do not recompute the number of degrees of freedom (DOF) contributing to the temperature :pre
|
||||
yes/no = do or do not recompute the number of degrees of freedom (DOF) contributing to the temperature
|
||||
{bodyforces} value = {early} or {late}
|
||||
early/late = compute rigid-body forces/torques early or late in the timestep :pre
|
||||
:ule
|
||||
|
||||
[Examples:]
|
||||
@ -84,9 +86,8 @@ if you want virial contribution of the fix to be part of the
|
||||
relaxation criteria, although this seems unlikely.
|
||||
|
||||
NOTE: This option is only supported by fixes that explicitly say
|
||||
so. For some of these (e.g. the
|
||||
"fix shake"_fix_shake.html command) the default setting is
|
||||
{virial yes}, for others it is {virial no}.
|
||||
so. For some of these (e.g. the "fix shake"_fix_shake.html command)
|
||||
the default setting is {virial yes}, for others it is {virial no}.
|
||||
|
||||
For fixes that set or modify forces, it may be possible to select at
|
||||
which "r-RESPA"_run_style.html level the fix operates via the {respa}
|
||||
@ -120,6 +121,28 @@ compute to calculate temperature. See the "compute_modify
|
||||
dynamic/dof"_compute_modify.html command for a similar way to insure
|
||||
correct temperature normalization for those thermostats.
|
||||
|
||||
The {bodyforces} keyword determines whether the forces and torques
|
||||
acting on rigid bodies are computed {early} at the post-force stage of
|
||||
each timestep (right after per-atom forces have been computed and
|
||||
communicated among processors), or {late} at the final-integrate stage
|
||||
of each timestep (after any other fixes have finished their post-force
|
||||
tasks). Only the rigid-body integration fixes use this option, which
|
||||
includes "fix rigid"_fix_rigid.html and "fix
|
||||
rigid/small"_fix_rigid.html, and their variants, and also "fix
|
||||
poems"_fix_poems.html.
|
||||
|
||||
The default is {late}. If there are other fixes that add forces to
|
||||
individual atoms, then the rigid-body constraints will include these
|
||||
forces when time-integrating the rigid bodies. If {early} is
|
||||
specified, then new fixes can be written that use or modify the
|
||||
per-body force and torque, before time-integration of the rigid bodies
|
||||
occurs. Note however this has the side effect, that fixes such as
|
||||
"fix addforce"_fix_addforce.html, "fix setforce"_fix_setforce.html,
|
||||
"fix spring"_fix_spring.html, which add forces to individual atoms
|
||||
will have no effect on the motion of the rigid bodies if they are
|
||||
specified in the input script after the fix rigid command. LAMMPS
|
||||
will give a warning if that is the case.
|
||||
|
||||
[Restrictions:] none
|
||||
|
||||
[Related commands:]
|
||||
@ -130,4 +153,5 @@ pressure"_compute_pressure.html, "thermo_style"_thermo_style.html
|
||||
[Default:]
|
||||
|
||||
The option defaults are temp = ID defined by fix, press = ID defined
|
||||
by fix, energy = no, virial = different for each fix style, respa = 0.
|
||||
by fix, energy = no, virial = different for each fix style, respa = 0,
|
||||
bodyforce = late.
|
||||
|
||||
76
doc/src/fix_nve_spin.txt
Normal file
@ -0,0 +1,76 @@
|
||||
"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c
|
||||
|
||||
:link(lws,http://lammps.sandia.gov)
|
||||
:link(ld,Manual.html)
|
||||
:link(lc,Section_commands.html#comm)
|
||||
|
||||
:line
|
||||
|
||||
fix nve/spin command :h3
|
||||
|
||||
[Syntax:]
|
||||
|
||||
fix ID group-ID nve/spin keyword values :pre
|
||||
|
||||
ID, group-ID are documented in "fix"_fix.html command :ulb,l
|
||||
nve/spin = style name of this fix command :l
|
||||
keyword = {lattice} :l
|
||||
{lattice} value = {no} or {yes} :pre
|
||||
:ule
|
||||
|
||||
[Examples:]
|
||||
|
||||
fix 3 all nve/spin lattice yes
|
||||
fix 1 all nve/spin lattice no :pre
|
||||
|
||||
[Description:]
|
||||
|
||||
Perform a symplectic integration for the spin or spin-lattice system.
|
||||
|
||||
The {lattice} keyword defines if the spins are integrated on a lattice
|
||||
of fixed atoms (lattice = no), or if atoms are moving (lattice = yes).
|
||||
|
||||
By default (lattice = yes), a spin-lattice integration is performed.
|
||||
|
||||
The {nve/spin} fix applies a Suzuki-Trotter decomposition to
|
||||
the equations of motion of the spin lattice system, following the scheme:
|
||||
|
||||
:c,image(Eqs/fix_integration_spin_stdecomposition.jpg)
|
||||
|
||||
according to the implementation reported in "(Omelyan)"_#Omelyan1.
|
||||
|
||||
A sectoring method enables this scheme for parallel calculations.
|
||||
The implementation of this sectoring algorithm is reported
|
||||
in "(Tranchida)"_#Tranchida1.
|
||||
|
||||
:line
|
||||
|
||||
[Restrictions:]
|
||||
|
||||
This fix style can only be used if LAMMPS was built with the
|
||||
SPIN package. See the "Making LAMMPS"_Section_start.html#start_3
|
||||
section for more info on packages.
|
||||
|
||||
To use the spin algorithm, it is necessary to define a map with
|
||||
the atom_modify command. Typically, by adding the command:
|
||||
|
||||
atom_modify map array :pre
|
||||
|
||||
before you create the simulation box. Note that the keyword "hash"
|
||||
instead of "array" is also valid.
|
||||
|
||||
[Related commands:]
|
||||
|
||||
"atom_style spin"_atom_style.html, "fix nve"_fix_nve.html
|
||||
|
||||
[Default:] none
|
||||
|
||||
:line
|
||||
|
||||
:link(Omelyan1)
|
||||
[(Omelyan)] Omelyan, Mryglod, and Folk. Phys. Rev. Lett.
|
||||
86(5), 898. (2001).
|
||||
|
||||
:link(Tranchida1)
|
||||
[(Tranchida)] Tranchida, Plimpton, Thibaudeau and Thompson,
|
||||
arXiv preprint arXiv:1801.10233, (2018).
|
||||
@ -106,12 +106,18 @@ off, and there is only a single fix poems defined.
|
||||
[Restart, fix_modify, output, run start/stop, minimize info:]
|
||||
|
||||
No information about this fix is written to "binary restart
|
||||
files"_restart.html. None of the "fix_modify"_fix_modify.html options
|
||||
are relevant to this fix. No global or per-atom quantities are stored
|
||||
by this fix for access by various "output
|
||||
commands"_Section_howto.html#howto_15. No parameter of this fix can
|
||||
be used with the {start/stop} keywords of the "run"_run.html command.
|
||||
This fix is not invoked during "energy minimization"_minimize.html.
|
||||
files"_restart.html.
|
||||
|
||||
The "fix_modify"_fix_modify.html {bodyforces} option is supported by
|
||||
this fix style to set whether per-body forces and torques are computed
|
||||
early or late in a timestep, i.e. at the post-force stage or at the
|
||||
final-integrate stage, respectively.
|
||||
|
||||
No global or per-atom quantities are stored by this fix for access by
|
||||
various "output commands"_Section_howto.html#howto_15. No parameter
|
||||
of this fix can be used with the {start/stop} keywords of the
|
||||
"run"_run.html command. This fix is not invoked during "energy
|
||||
minimization"_minimize.html.
|
||||
|
||||
[Restrictions:]
|
||||
|
||||
|
||||
87
doc/src/fix_precession_spin.txt
Normal file
@ -0,0 +1,87 @@
|
||||
"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c
|
||||
|
||||
:link(lws,http://lammps.sandia.gov)
|
||||
:link(ld,Manual.html)
|
||||
:link(lc,Section_commands.html#comm)
|
||||
|
||||
:line
|
||||
|
||||
fix precession/spin command :h3
|
||||
|
||||
[Syntax:]
|
||||
|
||||
fix ID group precession/spin style args :pre
|
||||
|
||||
ID, group are documented in "fix"_fix.html command :ulb,l
|
||||
precession/spin = style name of this fix command :l
|
||||
style = {zeeman} or {anisotropy} :l
|
||||
{zeeman} args = H x y z
|
||||
H = intensity of the magnetic field (in Tesla)
|
||||
x y z = vector direction of the field
|
||||
{anisotropy} args = K x y z
|
||||
K = intensity of the magnetic anisotropy (in eV)
|
||||
x y z = vector direction of the anisotropy :pre
|
||||
:ule
|
||||
|
||||
[Examples:]
|
||||
|
||||
fix 1 all precession/spin zeeman 0.1 0.0 0.0 1.0
|
||||
fix 1 all precession/spin anisotropy 0.001 0.0 0.0 1.0
|
||||
fix 1 all precession/spin zeeman 0.1 0.0 0.0 1.0 anisotropy 0.001 0.0 0.0 1.0 :pre
|
||||
|
||||
[Description:]
|
||||
|
||||
Impose a force torque to each magnetic spin in the group.
|
||||
|
||||
Style {zeeman} is used for the simulation of the interaction
|
||||
between the magnetic spins in the defined group and an external
|
||||
magnetic field:
|
||||
|
||||
:c,image(Eqs/force_spin_zeeman.jpg)
|
||||
|
||||
with mu0 the vacuum permeability, muB the Bohr magneton (muB = 5.788 eV/T
|
||||
in metal units).
|
||||
|
||||
Style {anisotropy} is used to simulate an easy axis or an easy plane
|
||||
for the magnetic spins in the defined group:
|
||||
|
||||
:c,image(Eqs/force_spin_aniso.jpg)
|
||||
|
||||
with n defining the direction of the anisotropy, and K (in eV) its intensity.
|
||||
If K>0, an easy axis is defined, and if K<0, an easy plane is defined.
|
||||
|
||||
In both cases, the choice of (x y z) imposes the vector direction for the force.
|
||||
Only the direction of the vector is important; it's length is ignored.
|
||||
|
||||
Both styles can be combined within one single command line.
|
||||
|
||||
:line
|
||||
|
||||
[Restart, fix_modify, output, run start/stop, minimize info:]
|
||||
|
||||
By default, the energy associated to this fix is not added to the potential
|
||||
energy of the system.
|
||||
The "fix_modify"_fix_modify.html {energy} option is supported by this fix
|
||||
to add this magnetic potential energy to the potential energy of the system,
|
||||
|
||||
fix 1 all precession/spin zeeman 1.0 0.0 0.0 1.0
|
||||
fix_modify 1 energy yes :pre
|
||||
|
||||
This fix computes a global scalar which can be accessed by various
|
||||
"output commands"_Section_howto.html#howto_15.
|
||||
|
||||
No information about this fix is written to "binary restart
|
||||
files"_restart.html.
|
||||
|
||||
[Restrictions:]
|
||||
|
||||
The {precession/spin} style is part of the SPIN package.
|
||||
This style is only enabled if LAMMPS was built with this package, and
|
||||
if the atom_style "spin" was declared.
|
||||
See the "Making LAMMPS"_Section_start.html#start_3 section for more info.
|
||||
|
||||
[Related commands:]
|
||||
|
||||
"atom_style spin"_atom_style.html
|
||||
|
||||
[Default:] none
|
||||
@ -34,6 +34,8 @@ written to {filename} on timesteps that are multiples of {Nevery},
|
||||
including timestep 0. For time-averaged chemical species analysis,
|
||||
please see the "fix reaxc/c/species"_fix_reaxc_species.html command.
|
||||
|
||||
The specified group-ID is ignored by this fix.
|
||||
|
||||
The format of the output file should be reasonably self-explanatory.
|
||||
The meaning of the column header abbreviations is as follows:
|
||||
|
||||
|
||||
@ -24,10 +24,12 @@ keyword = {bond} or {angle} or {dihedral} :l
|
||||
atom1,atom2,atom3 = IDs of 3 atoms in angle, atom2 = middle atom
|
||||
Kstart,Kstop = restraint coefficients at start/end of run (energy units)
|
||||
theta0 = equilibrium angle theta (degrees)
|
||||
{dihedral} args = atom1 atom2 atom3 atom4 Kstart Kstop phi0
|
||||
{dihedral} args = atom1 atom2 atom3 atom4 Kstart Kstop phi0 keyword/value
|
||||
atom1,atom2,atom3,atom4 = IDs of 4 atoms in dihedral in linear order
|
||||
Kstart,Kstop = restraint coefficients at start/end of run (energy units)
|
||||
phi0 = equilibrium dihedral angle phi (degrees) :pre
|
||||
phi0 = equilibrium dihedral angle phi (degrees)
|
||||
keyword/value = optional keyword value pairs. supported keyword/value pairs:
|
||||
{mult} n = dihedral multiplicity n (integer >= 0, default = 1) :pre
|
||||
:ule
|
||||
|
||||
[Examples:]
|
||||
@ -155,11 +157,13 @@ associated with the restraint is
|
||||
with the following coefficients:
|
||||
|
||||
K (energy)
|
||||
n = 1
|
||||
n (multiplicity, >= 0)
|
||||
d (degrees) = phi0 + 180 :ul
|
||||
|
||||
K and phi0 are specified with the fix. Note that the value of n is
|
||||
hard-wired to 1. Also note that the energy will be a minimum when the
|
||||
K and phi0 are specified with the fix. Note that the value of the
|
||||
dihedral multiplicity {n} is set by default to 1. You can use the
|
||||
optional {mult} keyword to set it to a different positive integer.
|
||||
Also note that the energy will be a minimum when the
|
||||
current dihedral angle phi is equal to phi0.
|
||||
|
||||
:line
|
||||
@ -183,10 +187,17 @@ added forces to be included in the total potential energy of the
|
||||
system (the quantity being minimized), you MUST enable the
|
||||
"fix_modify"_fix_modify.html {energy} option for this fix.
|
||||
|
||||
This fix computes a global scalar, which can be accessed by various
|
||||
"output commands"_Section_howto.html#howto_15. The scalar is the
|
||||
potential energy for all the restraints as discussed above. The scalar
|
||||
value calculated by this fix is "extensive".
|
||||
This fix computes a global scalar and a global vector of length 3, which
|
||||
can be accessed by various "output commands"_Section_howto.html#howto_15.
|
||||
The scalar is the total potential energy for {all} the restraints as
|
||||
discussed above. The vector values are the sum of contributions to the
|
||||
following individual categories:
|
||||
|
||||
1 = bond energy
|
||||
2 = angle energy
|
||||
3 = dihedral energy :ul
|
||||
|
||||
The scalar and vector values calculated by this fix are "extensive".
|
||||
|
||||
No parameter of this fix can be used with the {start/stop} keywords of
|
||||
the "run"_run.html command.
|
||||
|
||||
@ -223,10 +223,10 @@ via several options.
|
||||
|
||||
NOTE: With the {rigid/small} styles, which require that {bodystyle} be
|
||||
specified as {molecule} or {custom}, you can define a system that has
|
||||
no rigid bodies initially. This is useful when you are using the {mol}
|
||||
keyword in conjunction with another fix that is adding rigid bodies
|
||||
on-the-fly as molecules, such as "fix deposit"_fix_deposit.html or
|
||||
"fix pour"_fix_pour.html.
|
||||
no rigid bodies initially. This is useful when you are using the
|
||||
{mol} keyword in conjunction with another fix that is adding rigid
|
||||
bodies on-the-fly as molecules, such as "fix deposit"_fix_deposit.html
|
||||
or "fix pour"_fix_pour.html.
|
||||
|
||||
For bodystyle {single} the entire fix group of atoms is treated as one
|
||||
rigid body. This option is only allowed for the {rigid} styles.
|
||||
@ -241,19 +241,17 @@ molecule ID = 0) surrounding rigid bodies, this may not be what you
|
||||
want. Thus you should be careful to use a fix group that only
|
||||
includes atoms you want to be part of rigid bodies.
|
||||
|
||||
Bodystyle {custom} is similar to bodystyle {molecule}, however some
|
||||
custom properties are used to group atoms into rigid bodies. The
|
||||
special case for molecule/body ID = 0 is not available. Possible
|
||||
custom properties are an integer property associated with atoms through
|
||||
"fix property/atom"_fix_property_atom.html or an atom style variable
|
||||
or an atomfile style variable. For the latter two, the variable value
|
||||
will be rounded to an integer and then rigid bodies defined from
|
||||
those values.
|
||||
|
||||
For bodystyle {group}, each of the listed groups is treated as a
|
||||
separate rigid body. Only atoms that are also in the fix group are
|
||||
included in each rigid body. This option is only allowed for the
|
||||
{rigid} styles.
|
||||
Bodystyle {custom} is similar to bodystyle {molecule} except that it
|
||||
is more flexible in using other per-atom properties to define the sets
|
||||
of atoms that form rigid bodies. An integer vector defined by the
|
||||
"fix property/atom"_fix_property_atom.txt command can be used. Or an
|
||||
"atom-style or atomfile-style variable"_variable.html can be used; the
|
||||
floating-point value produced by the variable is rounded to an
|
||||
integer. As with bondstyle {molecule}, each set of atoms in the fix
|
||||
groups with the same integer value is treated as a different rigid
|
||||
body. Since fix property/atom vectors and atom-style variables
|
||||
produce values for all atoms, you should be careful to use a fix group
|
||||
that only includes atoms you want to be part of rigid bodies.
|
||||
|
||||
NOTE: To compute the initial center-of-mass position and other
|
||||
properties of each rigid body, the image flags for each atom in the
|
||||
@ -742,6 +740,11 @@ used to calculate the instantaneous pressure tensor. Note that the 2
|
||||
NVT rigid fixes do not use any external compute to compute
|
||||
instantaneous temperature.
|
||||
|
||||
The "fix_modify"_fix_modify.html {bodyforces} option is supported by
|
||||
all rigid styles to set whether per-body forces and torques are
|
||||
computed early or late in a timestep, i.e. at the post-force stage or
|
||||
at the final-integrate stage or the timestep, respectively.
|
||||
|
||||
The 2 NVE rigid fixes compute a global scalar which can be accessed by
|
||||
various "output commands"_Section_howto.html#howto_15. The scalar
|
||||
value calculated by these fixes is "intensive". The scalar is the
|
||||
|
||||
@ -20,9 +20,11 @@ Fixes :h1
|
||||
fix_ave_time
|
||||
fix_aveforce
|
||||
fix_balance
|
||||
fix_bocs
|
||||
fix_bond_break
|
||||
fix_bond_create
|
||||
fix_bond_swap
|
||||
fix_bond_react
|
||||
fix_box_relax
|
||||
fix_cmap
|
||||
fix_colvars
|
||||
@ -59,6 +61,7 @@ Fixes :h1
|
||||
fix_langevin
|
||||
fix_langevin_drude
|
||||
fix_langevin_eff
|
||||
fix_langevin_spin
|
||||
fix_latte
|
||||
fix_lb_fluid
|
||||
fix_lb_momentum
|
||||
@ -97,6 +100,7 @@ Fixes :h1
|
||||
fix_nve_manifold_rattle
|
||||
fix_nve_noforce
|
||||
fix_nve_sphere
|
||||
fix_nve_spin
|
||||
fix_nve_tri
|
||||
fix_nvk
|
||||
fix_nvt_asphere
|
||||
@ -112,6 +116,7 @@ Fixes :h1
|
||||
fix_planeforce
|
||||
fix_poems
|
||||
fix_pour
|
||||
fix_precession_spin
|
||||
fix_press_berendsen
|
||||
fix_print
|
||||
fix_property_atom
|
||||
|
||||
@ -135,8 +135,10 @@ fix_ave_histo.html
|
||||
fix_ave_time.html
|
||||
fix_aveforce.html
|
||||
fix_balance.html
|
||||
fix_bocs.html
|
||||
fix_bond_break.html
|
||||
fix_bond_create.html
|
||||
fix_bond_react.html
|
||||
fix_bond_swap.html
|
||||
fix_box_relax.html
|
||||
fix_cmap.html
|
||||
@ -174,6 +176,7 @@ fix_ipi.html
|
||||
fix_langevin.html
|
||||
fix_langevin_drude.html
|
||||
fix_langevin_eff.html
|
||||
fix_langevin_spin.html
|
||||
fix_latte.html
|
||||
fix_lb_fluid.html
|
||||
fix_lb_momentum.html
|
||||
@ -211,6 +214,7 @@ fix_nve_line.html
|
||||
fix_nve_manifold_rattle.html
|
||||
fix_nve_noforce.html
|
||||
fix_nve_sphere.html
|
||||
fix_nve_spin.html
|
||||
fix_nve_tri.html
|
||||
fix_nvk.html
|
||||
fix_nvt_asphere.html
|
||||
@ -227,6 +231,7 @@ fix_pimd.html
|
||||
fix_planeforce.html
|
||||
fix_poems.html
|
||||
fix_pour.html
|
||||
fix_precession_spin.html
|
||||
fix_press_berendsen.html
|
||||
fix_print.html
|
||||
fix_property_atom.html
|
||||
@ -315,6 +320,7 @@ compute_displace_atom.html
|
||||
compute_dpd.html
|
||||
compute_dpd_atom.html
|
||||
compute_edpd_temp_atom.html
|
||||
compute_entropy_atom.html
|
||||
compute_erotate_asphere.html
|
||||
compute_erotate_rigid.html
|
||||
compute_erotate_sphere.html
|
||||
@ -379,6 +385,7 @@ compute_smd_ulsph_strain_rate.html
|
||||
compute_smd_ulsph_stress.html
|
||||
compute_smd_vol.html
|
||||
compute_sna_atom.html
|
||||
compute_spin.html
|
||||
compute_stress_atom.html
|
||||
compute_tally.html
|
||||
compute_tdpd_cc_atom.html
|
||||
@ -504,6 +511,10 @@ pair_sph_lj.html
|
||||
pair_sph_rhosum.html
|
||||
pair_sph_taitwater.html
|
||||
pair_sph_taitwater_morris.html
|
||||
pair_spin_dmi.html
|
||||
pair_spin_exchange.html
|
||||
pair_spin_magelec.html
|
||||
pair_spin_neel.html
|
||||
pair_srp.html
|
||||
pair_sw.html
|
||||
pair_table.html
|
||||
@ -580,6 +591,7 @@ dihedral_opls.html
|
||||
dihedral_quadratic.html
|
||||
dihedral_spherical.html
|
||||
dihedral_table.html
|
||||
dihedral_table_cut.html
|
||||
dihedral_zero.html
|
||||
|
||||
lammps_commands_improper.html
|
||||
|
||||
@ -98,19 +98,20 @@ molecule (header keyword = inertia).
|
||||
NOTE: The molecule command can be used to define molecules with bonds,
|
||||
angles, dihedrals, imporopers, or special bond lists of neighbors
|
||||
within a molecular topology, so that you can later add the molecules
|
||||
to your simulation, via one or more of the commands listed above. If
|
||||
such molecules do not already exist when LAMMPS creates the simulation
|
||||
box, via the "create_box"_create_box.html or
|
||||
"read_data"_read_data.html command, when you later add them you may
|
||||
overflow the pre-allocated data structures which store molecular
|
||||
topology information with each atom, and an error will be generated.
|
||||
Both the "create_box"_create_box.html command and the data files read
|
||||
by the "read_data"_read_data.html command have "extra" options which
|
||||
to your simulation, via one or more of the commands listed above.
|
||||
Since this topology-related information requires that suitable storage
|
||||
is reserved when LAMMPS creates the simulation box (e.g. when using
|
||||
the "create_box"_create_box.html command or the
|
||||
"read_data"_read_data.html command) suitable space has to be reserved
|
||||
so you do not overflow those pre-allocated data structures when adding
|
||||
molecules later. Both the "create_box"_create_box.html command and
|
||||
the "read_data"_read_data.html command have "extra" options which
|
||||
insure space is allocated for storing topology info for molecules that
|
||||
are added later.
|
||||
|
||||
The format of an individual molecule file is similar to the data file
|
||||
read by the "read_data"_read_data.html commands, and is as follows.
|
||||
The format of an individual molecule file is similar but
|
||||
(not identical) to the data file read by the "read_data"_read_data.html
|
||||
commands, and is as follows.
|
||||
|
||||
A molecule file has a header and a body. The header appears first.
|
||||
The first line of the header is always skipped; it typically contains
|
||||
@ -455,7 +456,11 @@ of SHAKE clusters.
|
||||
|
||||
:line
|
||||
|
||||
[Restrictions:] none
|
||||
[Restrictions:]
|
||||
|
||||
This command must come after the simulation box is define by a
|
||||
"read_data"_read_data.html, "read_restart"_read_restart.html, or
|
||||
"create_box"_create_box.html command.
|
||||
|
||||
[Related commands:]
|
||||
|
||||
|
||||
@ -12,12 +12,14 @@ pair_style born/omp command :h3
|
||||
pair_style born/gpu command :h3
|
||||
pair_style born/coul/long command :h3
|
||||
pair_style born/coul/long/cs command :h3
|
||||
pair_style born/coul/long/cs/gpu command :h3
|
||||
pair_style born/coul/long/gpu command :h3
|
||||
pair_style born/coul/long/omp command :h3
|
||||
pair_style born/coul/msm command :h3
|
||||
pair_style born/coul/msm/omp command :h3
|
||||
pair_style born/coul/wolf command :h3
|
||||
pair_style born/coul/wolf/cs command :h3
|
||||
pair_style born/coul/wolf/cs/gpu command :h3
|
||||
pair_style born/coul/wolf/gpu command :h3
|
||||
pair_style born/coul/wolf/omp command :h3
|
||||
pair_style born/coul/dsf command :h3
|
||||
|
||||
@ -20,6 +20,7 @@ pair_style coul/dsf/kk command :h3
|
||||
pair_style coul/dsf/omp command :h3
|
||||
pair_style coul/long command :h3
|
||||
pair_style coul/long/cs command :h3
|
||||
pair_style coul/long/cs/gpu command :h3
|
||||
pair_style coul/long/omp command :h3
|
||||
pair_style coul/long/gpu command :h3
|
||||
pair_style coul/long/kk command :h3
|
||||
|
||||
@ -95,9 +95,9 @@ This pair style can only be used via the {pair} keyword of the
|
||||
|
||||
[Restrictions:]
|
||||
|
||||
This pair style is part of the USER-MISC package. It is only enabled
|
||||
if LAMMPS was built with that package. See
|
||||
the "Making LAMMPS"_Section_start.html#start_3 section for more info.
|
||||
This pair style is part of the MANYBODY package. It is only enabled if
|
||||
LAMMPS was built with that package. See the "Making
|
||||
LAMMPS"_Section_start.html#start_3 section for more info.
|
||||
|
||||
This pair style requires the "newton"_newton.html setting to be "on"
|
||||
for pair interactions.
|
||||
@ -117,4 +117,5 @@ appropriate units if your simulation doesn't use "metal" units.
|
||||
:line
|
||||
|
||||
:link(Gao)
|
||||
[(Gao)] Gao and Weber, Nuclear Instruments and Methods in Physics Research B 191 (2012) 504.
|
||||
[(Gao)] Gao and Weber, Nuclear Instruments and Methods in Physics
|
||||
Research B 191 (2012) 504.
|
||||
|
||||
@ -23,15 +23,15 @@ pair_coeff * * ilp/graphene/hbn BNCH.ILP B N C :pre
|
||||
pair_style hybrid/overlay rebo tersoff ilp/graphene/hbn 16.0 coul/shield 16.0
|
||||
pair_coeff * * rebo CH.airebo NULL NULL C
|
||||
pair_coeff * * tersoff BNC.tersoff B N NULL
|
||||
pair_coeff * * ilp/graphene/hbn BNCH.ILP B N C :pre
|
||||
pair_coeff * * ilp/graphene/hbn BNCH.ILP B N C
|
||||
pair_coeff 1 1 coul/shield 0.70
|
||||
pair_coeff 1 2 coul/shield 0.69498201415576216335
|
||||
pair_coeff 2 2 coul/shield 0.69
|
||||
pair_coeff 2 2 coul/shield 0.69 :pre
|
||||
|
||||
[Description:]
|
||||
|
||||
The {ilp/graphene/hbn} style computes the registry-dependent interlayer
|
||||
potential (RDILP) potential as described in "(Leven)"_#Leven and
|
||||
potential (ILP) potential as described in "(Leven)"_#Leven and
|
||||
"(Maaravi)"_#Maaravi2. The normals are calculated in the way as described
|
||||
in "(Kolmogorov)"_#Kolmogorov2.
|
||||
|
||||
@ -61,13 +61,13 @@ NOTE: The parameters presented in the parameter file (e.g. BNCH.ILP),
|
||||
are fitted with taper function by setting the cutoff equal to 16.0
|
||||
Angstrom. Using different cutoff or taper function should be careful.
|
||||
|
||||
NOTE: Two parameter files (BNCH.ILP and BNCH-old.ILP) are presented,
|
||||
BNCH-old.ILP contains the parameters published in "(Leven)"_#Leven and
|
||||
"(Maaravi)"_#Maaravi2, which is only suitable for long-range
|
||||
interaction. The parameters in BNCH.ILP provides a good description both
|
||||
for short- and long-range interaction. This is useful for simulations in
|
||||
the high pressure (small interlayer distances) regime. The comparison of
|
||||
two sets of parameters can be found in "(Ouyang)"_#Ouyang.
|
||||
NOTE: Two new sets of parameters of ILP for two-dimensional hexagonal Materials
|
||||
are presented in "(Ouyang)"_#Ouyang1. These parameters provide a good description
|
||||
in both short- and long-range interaction regime, while the old ILP parameters
|
||||
published in "(Leven)"_#Leven and "(Maaravi)"_#Maaravi2 are only suitable for
|
||||
long-range interaction regime. This feature is essential for simulations in
|
||||
high-pressure regime (i.e., the interlayer distance smaller than the equilibrium distance).
|
||||
The benchmark tests and comparison of these parameters can be found in "(Ouyang)"_#Ouyang1.
|
||||
|
||||
This potential must be used in combination with hybrid/overlay.
|
||||
Other interactions can be set to zero using pair_style {none}.
|
||||
@ -101,12 +101,12 @@ units, if your simulation does not use {metal} units.
|
||||
|
||||
[Related commands:]
|
||||
|
||||
"pair_coeff"_pair_coeff.html
|
||||
"pair_none"_pair_none.html
|
||||
"pair_style hybrid/overlay"_pair_hybrid.html
|
||||
"pair_style pair_kolmogorov_crespi_z"_pair_kolmogorov_crespi_z.html
|
||||
"pair_style pair_kolmogorov_crespi_full"_pair_kolmogorov_crespi_full.html
|
||||
"pair_style pair_coul_shield"_pair_coul_shield.html
|
||||
"pair_coeff"_pair_coeff.html,
|
||||
"pair_none"_pair_none.html,
|
||||
"pair_style hybrid/overlay"_pair_hybrid.html,
|
||||
"pair_style pair_kolmogorov_crespi_z"_pair_kolmogorov_crespi_z.html,
|
||||
"pair_style pair_kolmogorov_crespi_full"_pair_kolmogorov_crespi_full.html,
|
||||
"pair_style pair_coul_shield"_pair_coul_shield.html.
|
||||
|
||||
[Default:] tap_flag = 1
|
||||
|
||||
@ -121,5 +121,5 @@ units, if your simulation does not use {metal} units.
|
||||
:link(Kolmogorov2)
|
||||
[(Kolmogorov)] A. N. Kolmogorov, V. H. Crespi, Phys. Rev. B 71, 235415 (2005)
|
||||
|
||||
:link(Ouyang)
|
||||
[(Ouyang)] W. Ouyang, D. Mandelli, O. Hod, M. Urbakh, In preparation.
|
||||
:link(Ouyang1)
|
||||
[(Ouyang)] W. Ouyang, D. Mandelli, M. Urbakh, O. Hod, arXiv:1806.09555 (2018).
|
||||
|
||||
@ -27,7 +27,7 @@ pair_coeff * * kolmogorov/crespi/full CC.KC C C :pre
|
||||
|
||||
[Description:]
|
||||
|
||||
The {kolmogorov/crespi/full} style computes the Kolmogorov-Crespi
|
||||
The {kolmogorov/crespi/full} style computes the Kolmogorov-Crespi (KC)
|
||||
interaction potential as described in "(Kolmogorov)"_#Kolmogorov1.
|
||||
No simplification is made,
|
||||
|
||||
@ -51,6 +51,15 @@ and {rcut} are included in the parameter file. {S} is designed to
|
||||
facilitate scaling of energies. {rcut} is designed to build the neighbor
|
||||
list for calculating the normals for each atom pair.
|
||||
|
||||
NOTE: A new set of parameters of KC potential for hydrocarbons (CH.KC)
|
||||
is presented in "(Ouyang)"_#Ouyang2. The parameters in CH.KC provides
|
||||
a good description in both short- and long-range interaction regime,
|
||||
while the original parameters (CC.KC) published in "(Kolmogorov)"_#Kolmogorov1
|
||||
are only suitable for long-range interaction regime.
|
||||
This feature is essential for simulations in high-pressure regime
|
||||
(i.e., the interlayer distance smaller than the equilibrium distance).
|
||||
The benchmark tests and comparison of these parameters can be found in "(Ouyang)"_#Ouyang2.
|
||||
|
||||
This potential must be used in combination with hybrid/overlay.
|
||||
Other interactions can be set to zero using pair_style {none}.
|
||||
|
||||
@ -83,11 +92,11 @@ units.
|
||||
|
||||
[Related commands:]
|
||||
|
||||
"pair_coeff"_pair_coeff.html
|
||||
"pair_none"_pair_none.html
|
||||
"pair_style hybrid/overlay"_pair_hybrid.html
|
||||
"pair_style kolmogorov/crespi/z"_pair_kolmogorov_crespi_z.html
|
||||
"pair_style ilp/graphene/hbn"_pair_ilp_graphene_hbn.html
|
||||
"pair_coeff"_pair_coeff.html,
|
||||
"pair_none"_pair_none.html,
|
||||
"pair_style hybrid/overlay"_pair_hybrid.html,
|
||||
"pair_style kolmogorov/crespi/z"_pair_kolmogorov_crespi_z.html,
|
||||
"pair_style ilp/graphene/hbn"_pair_ilp_graphene_hbn.html.
|
||||
|
||||
[Default:] tap_flag = 0
|
||||
|
||||
@ -95,3 +104,6 @@ units.
|
||||
|
||||
:link(Kolmogorov1)
|
||||
[(Kolmogorov)] A. N. Kolmogorov, V. H. Crespi, Phys. Rev. B 71, 235415 (2005)
|
||||
|
||||
:link(Ouyang2)
|
||||
[(Ouyang)] W. Ouyang, D. Mandelli, M. Urbakh, O. Hod, arXiv:1806.09555 (2018).
|
||||
|
||||
@ -38,7 +38,7 @@ This shift is achieved by the last term in the equation for {Vij} above.
|
||||
This potential is intended for interactions between two layers of graphene.
|
||||
Therefore, to avoid interaction between layers in multi-layered materials,
|
||||
each layer should have a separate atom type and interactions should only
|
||||
be computed between atom types of neighbouring layers.
|
||||
be computed between atom types of neighboring layers.
|
||||
|
||||
The parameter file (e.g. CC.KC), is intended for use with metal
|
||||
"units"_units.html, with energies in meV. An additional parameter, {S},
|
||||
|
||||
@ -71,9 +71,11 @@ the temperature coefficients have to be matched to the one used in the fix.
|
||||
Example input and data files for DNA duplexes can be found in examples/USER/cgdna/examples/oxDNA/ and /oxDNA2/.
|
||||
A simple python setup tool which creates single straight or helical DNA strands,
|
||||
DNA duplexes or arrays of DNA duplexes can be found in examples/USER/cgdna/util/.
|
||||
A technical report with more information on the model, the structure of the input file,
|
||||
the setup tool and the performance of the LAMMPS-implementation of oxDNA
|
||||
can be found "here"_PDF/USER-CGDNA-overview.pdf.
|
||||
|
||||
Please cite "(Henrich)"_#Henrich1 and the relevant oxDNA articles in any publication that uses this implementation.
|
||||
The article contains more information on the model, the structure of the input file, the setup tool
|
||||
and the performance of the LAMMPS-implementation of oxDNA.
|
||||
The preprint version of the article can be found "here"_PDF/USER-CGDNA.pdf.
|
||||
|
||||
:line
|
||||
|
||||
@ -92,6 +94,9 @@ LAMMPS"_Section_start.html#start_3 section for more info on packages.
|
||||
|
||||
:line
|
||||
|
||||
:link(Henrich1)
|
||||
[(Henrich)] O. Henrich, Y. A. Gutierrez-Fosado, T. Curk, T. E. Ouldridge, Eur. Phys. J. E 41, 57 (2018).
|
||||
|
||||
:link(Sulc1)
|
||||
[(Sulc)] P. Sulc, F. Romano, T.E. Ouldridge, L. Rovigatti, J.P.K. Doye, A.A. Louis, J. Chem. Phys. 137, 135101 (2012).
|
||||
|
||||
|
||||
@ -77,9 +77,11 @@ the temperature coefficients have to be matched to the one used in the fix.
|
||||
Example input and data files for DNA duplexes can be found in examples/USER/cgdna/examples/oxDNA/ and /oxDNA2/.
|
||||
A simple python setup tool which creates single straight or helical DNA strands,
|
||||
DNA duplexes or arrays of DNA duplexes can be found in examples/USER/cgdna/util/.
|
||||
A technical report with more information on the model, the structure of the input file,
|
||||
the setup tool and the performance of the LAMMPS-implementation of oxDNA
|
||||
can be found "here"_PDF/USER-CGDNA-overview.pdf.
|
||||
|
||||
Please cite "(Henrich)"_#Henrich and the relevant oxDNA articles in any publication that uses this implementation.
|
||||
The article contains more information on the model, the structure of the input file, the setup tool
|
||||
and the performance of the LAMMPS-implementation of oxDNA.
|
||||
The preprint version of the article can be found "here"_PDF/USER-CGDNA.pdf.
|
||||
|
||||
:line
|
||||
|
||||
@ -98,6 +100,9 @@ LAMMPS"_Section_start.html#start_3 section for more info on packages.
|
||||
|
||||
:line
|
||||
|
||||
:link(Henrich)
|
||||
[(Henrich)] O. Henrich, Y. A. Gutierrez-Fosado, T. Curk, T. E. Ouldridge, Eur. Phys. J. E 41, 57 (2018).
|
||||
|
||||
:link(Sulc2)
|
||||
[(Sulc)] P. Sulc, F. Romano, T.E. Ouldridge, L. Rovigatti, J.P.K. Doye, A.A. Louis, J. Chem. Phys. 137, 135101 (2012).
|
||||
|
||||
|
||||
@ -47,13 +47,14 @@ the "(Aktulga)"_#Aktulga paper. The {reax/c} style was initially
|
||||
implemented as a stand-alone C code and is now integrated into LAMMPS
|
||||
as a package.
|
||||
|
||||
The {reax/c/kk} style is a Kokkos version of the ReaxFF potential that is
|
||||
derived from the {reax/c} style. The Kokkos version can run on GPUs and
|
||||
can also use OpenMP multithreading. For more information about the Kokkos package,
|
||||
see "Section 4"_Section_packages.html#kokkos and "Section 5.3.3"_accelerate_kokkos.html.
|
||||
One important consideration when using the {reax/c/kk} style is the choice of either
|
||||
half or full neighbor lists. This setting can be changed using the Kokkos "package"_package.html
|
||||
command.
|
||||
The {reax/c/kk} style is a Kokkos version of the ReaxFF potential that
|
||||
is derived from the {reax/c} style. The Kokkos version can run on GPUs
|
||||
and can also use OpenMP multithreading. For more information about the
|
||||
Kokkos package, see "Section 4"_Section_packages.html#kokkos and
|
||||
"Section 5.3.3"_accelerate_kokkos.html. One important consideration
|
||||
when using the {reax/c/kk} style is the choice of either half or full
|
||||
neighbor lists. This setting can be changed using the Kokkos
|
||||
"package"_package.html command.
|
||||
|
||||
The {reax/c} style differs from the "pair_style reax"_pair_reax.html
|
||||
command in the lo-level implementation details. The {reax} style is a
|
||||
@ -80,9 +81,8 @@ parameterizations for different classes of materials. You can submit
|
||||
a contact request at the Materials Computation Center (MCC) website
|
||||
"https://www.mri.psu.edu/materials-computation-center/connect-mcc"_https://www.mri.psu.edu/materials-computation-center/connect-mcc,
|
||||
describing the material(s) you are interested in modeling with ReaxFF.
|
||||
They can tell
|
||||
you what is currently available or what it would take to create a
|
||||
suitable ReaxFF parameterization.
|
||||
They can tell you what is currently available or what it would take to
|
||||
create a suitable ReaxFF parameterization.
|
||||
|
||||
The {cfile} setting can be specified as NULL, in which case default
|
||||
settings are used. A control file can be specified which defines
|
||||
@ -120,28 +120,31 @@ assign to each atom will be used for computing the electrostatic
|
||||
interactions in the system.
|
||||
See the "fix qeq/reax"_fix_qeq_reax.html command for details.
|
||||
|
||||
Using the optional keyword {lgvdw} with the value {yes} turns on
|
||||
the low-gradient correction of the ReaxFF/C for long-range
|
||||
London Dispersion, as described in the "(Liu)"_#Liu_2011 paper. Force field
|
||||
Using the optional keyword {lgvdw} with the value {yes} turns on the
|
||||
low-gradient correction of the ReaxFF/C for long-range London
|
||||
Dispersion, as described in the "(Liu)"_#Liu_2011 paper. Force field
|
||||
file {ffield.reax.lg} is designed for this correction, and is trained
|
||||
for several energetic materials (see "Liu"). When using lg-correction,
|
||||
recommended value for parameter {thb} is 0.01, which can be set in the
|
||||
control file. Note: Force field files are different for the original
|
||||
or lg corrected pair styles, using wrong ffield file generates an error message.
|
||||
or lg corrected pair styles, using wrong ffield file generates an
|
||||
error message.
|
||||
|
||||
Using the optional keyword {enobonds} with the value {yes}, the energy
|
||||
of atoms with no bonds (i.e. isolated atoms) is included in the total
|
||||
potential energy and the per-atom energy of that atom. If the value
|
||||
{no} is specified then the energy of atoms with no bonds is set to 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.
|
||||
{no} is specified then the energy of atoms with no bonds is set to
|
||||
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 aren't 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.
|
||||
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 aren't 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.
|
||||
|
||||
The thermo variable {evdwl} stores the sum of all the ReaxFF potential
|
||||
energy contributions, with the exception of the Coulombic and charge
|
||||
@ -153,7 +156,8 @@ This pair style tallies a breakdown of the total ReaxFF potential
|
||||
energy into sub-categories, which can be accessed via the "compute
|
||||
pair"_compute_pair.html command as a vector of values of length 14.
|
||||
The 14 values correspond to the following sub-categories (the variable
|
||||
names in italics match those used in the original FORTRAN ReaxFF code):
|
||||
names in italics match those used in the original FORTRAN ReaxFF
|
||||
code):
|
||||
|
||||
{eb} = bond energy
|
||||
{ea} = atom energy
|
||||
@ -340,8 +344,8 @@ reax"_pair_reax.html
|
||||
|
||||
[Default:]
|
||||
|
||||
The keyword defaults are checkqeq = yes, enobonds = yes, lgvdw = no, safezone = 1.2,
|
||||
mincap = 50.
|
||||
The keyword defaults are checkqeq = yes, enobonds = yes, lgvdw = no,
|
||||
safezone = 1.2, mincap = 50.
|
||||
|
||||
:line
|
||||
|
||||
|
||||
66
doc/src/pair_spin_dmi.txt
Normal file
@ -0,0 +1,66 @@
|
||||
"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c
|
||||
|
||||
:link(lws,http://lammps.sandia.gov)
|
||||
:link(ld,Manual.html)
|
||||
:link(lc,Section_commands.html#comm)
|
||||
|
||||
:line
|
||||
|
||||
pair_style spin/dmi command :h3
|
||||
|
||||
[Syntax:]
|
||||
|
||||
pair_style spin/dmi cutoff :pre
|
||||
|
||||
cutoff = global cutoff pair (distance in metal units) :ulb,l
|
||||
|
||||
:ule
|
||||
|
||||
[Examples:]
|
||||
|
||||
pair_style spin/dmi 4.0
|
||||
pair_coeff * * dmi 2.6 0.001 1.0 0.0 0.0
|
||||
pair_coeff 1 2 dmi 4.0 0.00109 0.0 0.0 1.0 :pre
|
||||
|
||||
[Description:]
|
||||
|
||||
Style {spin/dmi} computes the Dzyaloshinskii-Moriya (DM) interaction
|
||||
between pairs of magnetic spins:
|
||||
|
||||
:c,image(Eqs/pair_spin_dmi_interaction.jpg)
|
||||
|
||||
where si and sj are two neighboring magnetic spins of two particles,
|
||||
eij = (ri - rj)/|ri-rj| is the normalized separation vector between the
|
||||
two particles, and D is the DM vector defining the intensity and the
|
||||
sign of the interaction.
|
||||
|
||||
Examples and more explanations about this interaction and its parametrization are
|
||||
reported in "(Tranchida)"_#Tranchida5.
|
||||
|
||||
From this DM interaction, each spin i will be submitted to a magnetic torque
|
||||
omega and its associated atom to a force F (for spin-lattice calculations only).
|
||||
|
||||
More details about the derivation of these torques/forces are reported in
|
||||
"(Tranchida)"_#Tranchida5.
|
||||
|
||||
:line
|
||||
|
||||
[Restrictions:]
|
||||
|
||||
All the {pair/spin} styles are part of the SPIN package.
|
||||
These styles are only enabled if LAMMPS was built with this package, and
|
||||
if the atom_style "spin" was declared.
|
||||
See the "Making LAMMPS"_Section_start.html#start_3 section for more info.
|
||||
|
||||
[Related commands:]
|
||||
|
||||
"atom_style spin"_atom_style.html, "pair_coeff"_pair_coeff.html,
|
||||
"pair_eam"_pair_eam.html,
|
||||
|
||||
[Default:] none
|
||||
|
||||
:line
|
||||
|
||||
:link(Tranchida5)
|
||||
[(Tranchida)] Tranchida, Plimpton, Thibaudeau and Thompson,
|
||||
arXiv preprint arXiv:1801.10233, (2018).
|
||||
82
doc/src/pair_spin_exchange.txt
Normal file
@ -0,0 +1,82 @@
|
||||
"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c
|
||||
|
||||
:link(lws,http://lammps.sandia.gov)
|
||||
:link(ld,Manual.html)
|
||||
:link(lc,Section_commands.html#comm)
|
||||
|
||||
:line
|
||||
|
||||
pair_style spin/exchange command :h3
|
||||
|
||||
[Syntax:]
|
||||
|
||||
pair_style spin/exchange cutoff :pre
|
||||
|
||||
cutoff = global cutoff pair (distance in metal units) :ulb,l
|
||||
|
||||
:ule
|
||||
|
||||
[Examples:]
|
||||
|
||||
pair_style spin/exchange 4.0
|
||||
pair_coeff * * exchange 4.0 0.0446928 0.003496 1.4885
|
||||
pair_coeff 1 2 exchange 6.0 -0.01575 0.0 1.965 :pre
|
||||
|
||||
[Description:]
|
||||
|
||||
Style {spin/exchange} computes the exchange interaction between
|
||||
pairs of magnetic spins:
|
||||
|
||||
:c,image(Eqs/pair_spin_exchange_interaction.jpg)
|
||||
|
||||
where si and sj are two neighboring magnetic spins of two particles,
|
||||
rij = ri - rj is the inter-atomic distance between the two particles,
|
||||
and J(rij) is a function defining the intensity and the sign of the exchange
|
||||
interaction.
|
||||
|
||||
This function is defined as:
|
||||
|
||||
:c,image(Eqs/pair_spin_exchange_function.jpg)
|
||||
|
||||
where a, b and d are the three constant coefficients defined in the associated
|
||||
"pair_coeff" command.
|
||||
|
||||
The coefficients a, b, and d need to be fitted so that the function above matches with
|
||||
the value of the exchange interaction for the N neighbor shells taken into account.
|
||||
|
||||
Examples and more explanations about this function and its parametrization are reported
|
||||
in "(Tranchida)"_#Tranchida3.
|
||||
|
||||
From this exchange interaction, each spin i will be submitted
|
||||
to a magnetic torque omega, and its associated atom can be submitted to a
|
||||
force F for spin-lattice calculations (see "fix_nve_spin"_fix_nve_spin.html),
|
||||
such as:
|
||||
|
||||
:c,image(Eqs/pair_spin_exchange_forces.jpg)
|
||||
|
||||
with h the Planck constant (in metal units).
|
||||
|
||||
More details about the derivation of these torques/forces are reported in
|
||||
"(Tranchida)"_#Tranchida3.
|
||||
|
||||
:line
|
||||
|
||||
[Restrictions:]
|
||||
|
||||
All the {pair/spin} styles are part of the SPIN package.
|
||||
These styles are only enabled if LAMMPS was built with this package, and
|
||||
if the atom_style "spin" was declared.
|
||||
See the "Making LAMMPS"_Section_start.html#start_3 section for more info.
|
||||
|
||||
[Related commands:]
|
||||
|
||||
"atom_style spin"_atom_style.html, "pair_coeff"_pair_coeff.html,
|
||||
"pair_eam"_pair_eam.html,
|
||||
|
||||
[Default:] none
|
||||
|
||||
:line
|
||||
|
||||
:link(Tranchida3)
|
||||
[(Tranchida)] Tranchida, Plimpton, Thibaudeau and Thompson,
|
||||
arXiv preprint arXiv:1801.10233, (2018).
|
||||