Compare commits
2153 Commits
patch_8Feb
...
stable_2Au
| Author | SHA1 | Date | |
|---|---|---|---|
| ce756540e8 | |||
| bb462b9ea3 | |||
| 63eda98779 | |||
| 0ca72bb58e | |||
| a6bcf507e1 | |||
| a1621a7229 | |||
| 62d41c6afb | |||
| 5480d25e36 | |||
| a4145ec852 | |||
| 5b16f15b25 | |||
| e77aaba3a4 | |||
| 7f08e8d11c | |||
| f62b129dec | |||
| db967a5bbf | |||
| f20af66312 | |||
| 01766c7631 | |||
| 7846bb59db | |||
| c27951cb1f | |||
| 4ab82d76ad | |||
| c6cbc1f965 | |||
| 88e58e9189 | |||
| e14005c443 | |||
| 9570c2fb50 | |||
| 180ce5277f | |||
| e81b86e114 | |||
| 6c6262a637 | |||
| 062bb88561 | |||
| cf5b653a9a | |||
| c5a5e4a099 | |||
| ccab900342 | |||
| fc400af724 | |||
| b1ea4d9601 | |||
| 2ca3be7b16 | |||
| 31b94aa1b0 | |||
| b1b94980fa | |||
| 770ad34267 | |||
| 10c523a950 | |||
| 62ef884564 | |||
| b3860a82de | |||
| 1deb3d8865 | |||
| 266e519013 | |||
| fffb86cb02 | |||
| fcaabe510e | |||
| a6043d92cb | |||
| ee16f6503e | |||
| 84168fc84d | |||
| 8a5fd08fa1 | |||
| 8944609419 | |||
| e90478e932 | |||
| 52c23785c5 | |||
| 088ff4ad27 | |||
| e32ae65aa1 | |||
| a5bf853c35 | |||
| b0a1b58c68 | |||
| bdaf3c64a6 | |||
| ccc478ad96 | |||
| fadb210052 | |||
| c105a187d9 | |||
| d74f86f2cd | |||
| c5b35970dc | |||
| 5626836995 | |||
| 53111f8c0e | |||
| e0ca512f50 | |||
| e87bad43f9 | |||
| 27d065a682 | |||
| f1dd7f1415 | |||
| 554db7daaf | |||
| dea8050a8a | |||
| 3c24e4fbf3 | |||
| 8d5343ea23 | |||
| 3f1f08d4c0 | |||
| 2a82ed9494 | |||
| f6732f028c | |||
| 91fdf6918d | |||
| 07b36025e2 | |||
| 6f6eb1dbb1 | |||
| c800a2c676 | |||
| 2808a78822 | |||
| 498ca44310 | |||
| 97d406f2ff | |||
| e493519c12 | |||
| dfcd3f945e | |||
| 2711917a6e | |||
| dfb614bd42 | |||
| 56b50d6580 | |||
| c918bdeb07 | |||
| c99d0f5452 | |||
| 1fa2060175 | |||
| 8a53c66bef | |||
| 57b6543886 | |||
| 310ede65d9 | |||
| f76300c4f8 | |||
| 22a9f869ea | |||
| ea5a20afc5 | |||
| f1cda322fe | |||
| 4f1946f307 | |||
| 6c8291fa15 | |||
| f2bc41a83c | |||
| fd9af7d5c9 | |||
| b9682fc6fd | |||
| 1f829dd2e9 | |||
| b67de91feb | |||
| d38ec56f3a | |||
| 44cec03729 | |||
| 89b205a08e | |||
| 6b50daf5b7 | |||
| 418b2c3df0 | |||
| 488b4d46cd | |||
| 0d7687cd02 | |||
| 349cf728b1 | |||
| 5fdeefe0ac | |||
| be9d246b93 | |||
| fbf05fb9a9 | |||
| 33e893dbed | |||
| 49d411e7c1 | |||
| b5a5cf1c96 | |||
| d41bf628c7 | |||
| 2f159df3b7 | |||
| 0a0184221c | |||
| 68454b3f73 | |||
| cadc45d41d | |||
| 75254bf305 | |||
| 72ea2673dd | |||
| 6d58910c5c | |||
| e899a07b4c | |||
| c95bf2c14b | |||
| 1c8b9e9467 | |||
| 2eca0f2634 | |||
| 93b2f24841 | |||
| 12fee35d78 | |||
| 9e5dcfcf78 | |||
| 080d868e40 | |||
| ac9163447c | |||
| 05c8d260d9 | |||
| e23176d633 | |||
| b3766384c3 | |||
| 2d6ae69048 | |||
| 81790e1c44 | |||
| a2503711d0 | |||
| d9f4ce04af | |||
| b75407684f | |||
| 62ec8e744a | |||
| cb5470ece3 | |||
| bb96707ec8 | |||
| c1d690d190 | |||
| 7a9694b849 | |||
| 2da71bd2d6 | |||
| 739bffa5e6 | |||
| e6e5be4477 | |||
| 034b7458bc | |||
| a8de49769b | |||
| f170d8a56d | |||
| 2644c064e1 | |||
| 32091d9f32 | |||
| dd25bac428 | |||
| a2657c67dd | |||
| 1697d1edf6 | |||
| 056c60839c | |||
| f81ee57c97 | |||
| da0669d988 | |||
| a62d1be3e6 | |||
| f3e54cada1 | |||
| 1698587a40 | |||
| e0ed11a053 | |||
| 0120c7b8b7 | |||
| 3287d79e9d | |||
| cde3328927 | |||
| c96e4d59da | |||
| 89b92e8b13 | |||
| e6dc5822c3 | |||
| 984a311dce | |||
| e548c0bde6 | |||
| e4dde8ebd4 | |||
| 368be8ac39 | |||
| 6e0aaab973 | |||
| 8b9174821a | |||
| f7881f4de5 | |||
| 5d34cc624d | |||
| ab792acbe5 | |||
| 276b89366a | |||
| 7eb2afa994 | |||
| 5da462670f | |||
| 5d1251df27 | |||
| 4fd648c11e | |||
| a402d2c6d8 | |||
| 908e925b8f | |||
| a49a1b644e | |||
| b87ced52b4 | |||
| 497659a4c7 | |||
| c2ceb0d9e4 | |||
| 6422565048 | |||
| 732566c8a9 | |||
| cbee2dd86d | |||
| a4a206e601 | |||
| 21d4be321a | |||
| cccc362b3f | |||
| 9669bf3d3b | |||
| 2da908190b | |||
| 0b57ea246c | |||
| 78880c9099 | |||
| c7996b506a | |||
| 6c6258371b | |||
| b725f5da28 | |||
| c441a999f1 | |||
| 7d46165c2a | |||
| e299fa9aab | |||
| c42ec8a647 | |||
| f26064d9a5 | |||
| 66403c93ad | |||
| 7aec563b86 | |||
| 021eeae860 | |||
| 34fcf1361f | |||
| 164b254602 | |||
| 2e2624d719 | |||
| cea202ebe9 | |||
| 7a04e048fe | |||
| 1057fa9b00 | |||
| dba4d9ebbc | |||
| 74c5ca0996 | |||
| fa4a3a0622 | |||
| d27ab47ed9 | |||
| 3568cced4b | |||
| 27aa6898f8 | |||
| 89d82fde22 | |||
| fd0a72eab5 | |||
| 77bdcb3e19 | |||
| baac049aed | |||
| 5e1c722b10 | |||
| e6873bb7c8 | |||
| 78d3d4948f | |||
| 2090d33d5f | |||
| be2e437cec | |||
| 620c60122a | |||
| 02d189fb23 | |||
| e2d7c54409 | |||
| acb0b89833 | |||
| 6907543e9d | |||
| df2cfe28c4 | |||
| 24de6377d3 | |||
| fe95dbc82f | |||
| 751dc1cfb6 | |||
| 3b859094bf | |||
| 7d88a351f5 | |||
| 6e65744d1a | |||
| eb52112a57 | |||
| 9e049147be | |||
| fe2a275531 | |||
| 6efa8526ba | |||
| 6123883324 | |||
| 4bfffce703 | |||
| 0f89a8b2ca | |||
| 564a8e88c1 | |||
| 3328389baf | |||
| 4d8ef552c4 | |||
| c63c9711d5 | |||
| a4b3306b7c | |||
| cb27cb644f | |||
| 254afdd938 | |||
| 469ffc7aba | |||
| 55343d715c | |||
| 2607212363 | |||
| 63c28337ab | |||
| 91b16c5945 | |||
| 60b45f9766 | |||
| 0718114a67 | |||
| 75a2557e82 | |||
| d6412dc97b | |||
| 651ed1960d | |||
| 6a8ca34ce8 | |||
| a3b9914f62 | |||
| 8665da6824 | |||
| 6f289df980 | |||
| 6d8f5a38ea | |||
| bf0372280e | |||
| 3e4b66378a | |||
| 55b7b3d999 | |||
| b66a5cd225 | |||
| cac8247383 | |||
| 6e41ac7ead | |||
| 02845483d2 | |||
| 8ae5ab57fc | |||
| fcf30f4c58 | |||
| 146245e6ae | |||
| afe2226797 | |||
| ef3de795c5 | |||
| ad14862cd0 | |||
| d57e1be942 | |||
| 9031d79791 | |||
| 9dd5ceaf4e | |||
| 677ff15740 | |||
| 268faf935b | |||
| d23cebf9f1 | |||
| b7bfc86eaf | |||
| 5878040f26 | |||
| 900c6cf545 | |||
| c1213c5222 | |||
| 55918ebabf | |||
| 83528f02e8 | |||
| 02498925c5 | |||
| ab1e090e0e | |||
| b7024288b6 | |||
| 14462d8f80 | |||
| b0b26d9d3a | |||
| a50993dac1 | |||
| 5d027fc92c | |||
| a4cba99ff9 | |||
| 89c4d43a87 | |||
| 906eecdbd7 | |||
| c347de7850 | |||
| c332103938 | |||
| 46a9f0a08c | |||
| d4e705b059 | |||
| d813519493 | |||
| d1980031ef | |||
| 92c118b29f | |||
| bfa39a37ff | |||
| fab01c7d5f | |||
| a38e0fb47b | |||
| e9a06a0654 | |||
| ffda6596da | |||
| 558298ac04 | |||
| e95b10f24a | |||
| e4b50a610e | |||
| 6d6f57aeff | |||
| fcc3c99e2b | |||
| 6791651b62 | |||
| af3d971023 | |||
| c5d9f901d9 | |||
| 104d175a85 | |||
| 585e47c01a | |||
| f5d9e78659 | |||
| d6f93a5253 | |||
| c08182801f | |||
| 0adb355001 | |||
| 838be24af4 | |||
| 542aa203da | |||
| 6ccf5f107c | |||
| 21fb50f37b | |||
| 2cea819e7f | |||
| 5196e4422b | |||
| 70823cac50 | |||
| e2e9170dfa | |||
| 753a0bd386 | |||
| 5eba9d7ee3 | |||
| f193a87426 | |||
| 058d817335 | |||
| a3de790a0d | |||
| 9231ec6dbe | |||
| 37ca3f9af8 | |||
| 60d060eeb1 | |||
| ce75691eae | |||
| 6f5e5746b3 | |||
| 2d3bbd2e72 | |||
| bb9dc960b7 | |||
| a20ed8e5e4 | |||
| 59c5ed63e3 | |||
| 74c4eb1063 | |||
| 9673c22cc7 | |||
| 0df1542be1 | |||
| 1144a01658 | |||
| 55d767e416 | |||
| e01bde5be5 | |||
| 4eb602e0d4 | |||
| b8dda7ebfe | |||
| d19d12e9e1 | |||
| 4d02c6f26f | |||
| 162f243ebc | |||
| 77898e4a86 | |||
| 57f82924f5 | |||
| 618fa815cc | |||
| 634c6cdc13 | |||
| 4faebaf4ed | |||
| 82f664acd4 | |||
| 27908139ae | |||
| c83dc1ff30 | |||
| 0564d79570 | |||
| 0cd566a417 | |||
| 80f3b6699e | |||
| 8a738fabcb | |||
| b225c94f59 | |||
| fcd234f723 | |||
| e27895b232 | |||
| 0314c9892c | |||
| 3b37c92b87 | |||
| 96b8bbbdc9 | |||
| e6cd79e0e9 | |||
| 8aeb059ce8 | |||
| bc52d863b4 | |||
| e831e54a21 | |||
| beabb4effe | |||
| 2afa07655f | |||
| dfd384eeff | |||
| 494341ba48 | |||
| 6f69e5ae02 | |||
| 8984b89feb | |||
| 233fb67eaa | |||
| 03b25dcbaa | |||
| 14a27e98c9 | |||
| 105ef5f103 | |||
| f128de7dd0 | |||
| 64508e08aa | |||
| d7ecf41ff6 | |||
| 2f7c3bf959 | |||
| 53f90fff3d | |||
| 603e397919 | |||
| 2ba83a4d8f | |||
| 82cea7a546 | |||
| 90416faf0a | |||
| bc87c69d60 | |||
| 68a73f1c33 | |||
| c214f654b6 | |||
| 23552d4b7a | |||
| 92e069b19d | |||
| 62b388b48f | |||
| 0dab1910db | |||
| da9637e94c | |||
| acaa2b7f9b | |||
| 0e7d91b611 | |||
| 235e98ee6a | |||
| fe45b766c3 | |||
| ecf7c24e87 | |||
| f6b0981474 | |||
| e0cbcff1f9 | |||
| 89b37396eb | |||
| 04a31c33e2 | |||
| 2cb87bc9a2 | |||
| 54286ce4dd | |||
| cbf062f383 | |||
| 4cad18a057 | |||
| ce38bb988d | |||
| 2e1190bfee | |||
| 5d4f9abf5b | |||
| 81854cd03e | |||
| b093f1aac1 | |||
| 3f6032e80d | |||
| 8ddac8cf02 | |||
| a2c968386e | |||
| 36cac1e83d | |||
| dc9cefbf21 | |||
| d6ad52ea66 | |||
| 2272d8dd20 | |||
| c851c7304c | |||
| dd0bba6ac7 | |||
| 7551219d81 | |||
| 9235377b44 | |||
| f3ff8dac66 | |||
| 491e152289 | |||
| de561737a3 | |||
| af25bd87fb | |||
| 30e6b8b9b6 | |||
| 620cca34d4 | |||
| b7afe412dc | |||
| 6360c02daa | |||
| 5fdba37492 | |||
| 2f88153f06 | |||
| 73693ca25b | |||
| f2f8e139d8 | |||
| 57f166670f | |||
| 37d894db51 | |||
| bd3e7882e6 | |||
| f406aa1492 | |||
| 53b1af7720 | |||
| 045b230587 | |||
| 0f925f7a39 | |||
| 6c7a5d2f1e | |||
| bbfd909be6 | |||
| b81b1f5ecc | |||
| 74a9cfc110 | |||
| 14acb3e0ca | |||
| f83867787c | |||
| 5ff6fd9aad | |||
| a415d732fc | |||
| ee6b12ee30 | |||
| 0ec5274873 | |||
| e954d8f050 | |||
| eafabf0fb1 | |||
| c4d49324b5 | |||
| 51b45d6830 | |||
| f85474c9ec | |||
| 0ef0419a98 | |||
| 9cc6839a8b | |||
| 409bced5fd | |||
| c558de3ce0 | |||
| 0978308f5e | |||
| 966efd8bd5 | |||
| 2e09ba2702 | |||
| a12133ce03 | |||
| 8eed55b56c | |||
| ead5a28d35 | |||
| a2d58c878b | |||
| ed9eaadad8 | |||
| 0cff31060b | |||
| c25999d208 | |||
| 3782eeee2b | |||
| 51851c2f4d | |||
| d8fad4db15 | |||
| a0057d674f | |||
| 3282470cf5 | |||
| bf8a4402ce | |||
| 196641927f | |||
| b5ab173763 | |||
| 63f3d183fe | |||
| f507e30d36 | |||
| a40b87b05c | |||
| 738a955c40 | |||
| d85342cd6d | |||
| a25100120b | |||
| 8c6e2ca000 | |||
| 2e7ca5f65c | |||
| 250eac93dc | |||
| a42bfb0e26 | |||
| 241f3b751e | |||
| 40cd3bbdc4 | |||
| 390888179f | |||
| 9dc1f45e1e | |||
| 28e3a741a8 | |||
| c30762ca8b | |||
| e7ae02dd2a | |||
| 70507462e9 | |||
| 8ef4e933b2 | |||
| 08ffd268bf | |||
| 77340921ff | |||
| 869780828b | |||
| bda933e0db | |||
| a4f4f965e3 | |||
| 887534fd02 | |||
| 1189661edc | |||
| c310616bb7 | |||
| c1cec45652 | |||
| f3bf20be8b | |||
| 6bc27db58c | |||
| b01db47b2d | |||
| ea6ece510e | |||
| a0461d29dd | |||
| 5f8b0f56a5 | |||
| cae2414126 | |||
| 6138b2b1f7 | |||
| 90000ca166 | |||
| cb02563d3d | |||
| c0602b6500 | |||
| 4073241413 | |||
| 69c5493631 | |||
| 8602ecd57f | |||
| 4540427e2b | |||
| 70709f2f08 | |||
| ddc34e03d6 | |||
| 9ec55dcb1f | |||
| 088d870e20 | |||
| 2a799d45a9 | |||
| da7a348089 | |||
| b3e9efcb50 | |||
| 3b38145d91 | |||
| 86743bc0a6 | |||
| c934208a4a | |||
| f9ee2ad42b | |||
| f69b50408d | |||
| 4c4eb6ee1e | |||
| b28ee36f00 | |||
| 458cce7699 | |||
| 01b481ec4f | |||
| 16751b06b3 | |||
| b5a1c6d47f | |||
| 2e68930f2a | |||
| 87850f31ca | |||
| fd87c1464a | |||
| 49b2c299a7 | |||
| 6eb586e66f | |||
| b7146c900f | |||
| ff7bae1739 | |||
| 3d8df660c3 | |||
| 4174116014 | |||
| 3012426bd5 | |||
| 1fd34ffac6 | |||
| edfb8cf100 | |||
| 58ee392579 | |||
| ceed30e7c6 | |||
| f26f397e08 | |||
| 8e6615918b | |||
| 35a55068d7 | |||
| 29ba0e3f18 | |||
| b2e5f93d49 | |||
| d66504be81 | |||
| e246864682 | |||
| ecca46acf9 | |||
| 9ee40cceef | |||
| c7c8b065a2 | |||
| 25bff3e4ed | |||
| df708a67a5 | |||
| 0692ed3bd7 | |||
| 2855f18d02 | |||
| c95dcd7582 | |||
| a701a5e6cc | |||
| 0510ce7372 | |||
| d190249e98 | |||
| 685255083e | |||
| 91ac9ef3fc | |||
| 276bc39a51 | |||
| 3822e6ff0f | |||
| 28c9c274be | |||
| 6977f71eb0 | |||
| 1d7a6f813b | |||
| 90427c8750 | |||
| 5da65bbd0a | |||
| 36eb11f499 | |||
| fe7a6fce29 | |||
| 8d0eb9b1f7 | |||
| 5fac8f483e | |||
| d7b7d1d323 | |||
| aaabe41b22 | |||
| ad7b27a67a | |||
| 0a45d1f9ac | |||
| b9f01f106e | |||
| 0dd26189d4 | |||
| cb5934cbcd | |||
| 7ec842d9cb | |||
| 0334ddb7c6 | |||
| 22d9c047f4 | |||
| 7c14b750ef | |||
| 9da310a33e | |||
| 842016e997 | |||
| ed03d04a70 | |||
| c73b7483b2 | |||
| af71279df1 | |||
| 50858205f6 | |||
| bbff6c25b3 | |||
| 3d35d68a4b | |||
| af04ecc532 | |||
| cc30c4478d | |||
| 81a497adcd | |||
| 6585151ce1 | |||
| d206f583c4 | |||
| f1aca8b71a | |||
| d8ca6274e7 | |||
| 10880332ed | |||
| 5d66dc6659 | |||
| 79f3eb6a4d | |||
| 8736f97792 | |||
| 39f61b6af3 | |||
| 5be9eda905 | |||
| 377c652a83 | |||
| 7c98d4dba3 | |||
| 88d9d39bab | |||
| d98b1e9f04 | |||
| 166301180b | |||
| e044ccbbb3 | |||
| 4f57026dc0 | |||
| 2e58a9ecf8 | |||
| 05b8082e3c | |||
| 0d31ab9c88 | |||
| 2b9c65855a | |||
| 858fd4cc2c | |||
| b1ee177c0a | |||
| b9256fa492 | |||
| a84470383b | |||
| 2328cae55f | |||
| 91e0d0411b | |||
| cf51c94be0 | |||
| ed958d8aed | |||
| d584f2fe50 | |||
| 17747a3c58 | |||
| 2d18883e8b | |||
| c76e85c445 | |||
| d6d825258e | |||
| 8414d23c2b | |||
| ac4cf2dc99 | |||
| 96af466f4a | |||
| cd79276309 | |||
| aa069b2cfb | |||
| 9a8640ca1a | |||
| 0abb217d59 | |||
| 5f34f53ab7 | |||
| cbb0558778 | |||
| b54d39adf9 | |||
| f1a3d0ce5a | |||
| 9ef4d7f320 | |||
| 54b2a5c17a | |||
| dd3d4e2b50 | |||
| 4c65aa572d | |||
| 7c4883704c | |||
| f74947a359 | |||
| a92e0030e8 | |||
| d2361ffe7d | |||
| f015aaff84 | |||
| 9890987eec | |||
| ee5a300643 | |||
| 4c51264b15 | |||
| c54ff43806 | |||
| 9512568fd8 | |||
| a6310f170a | |||
| 820899cd5e | |||
| 200f740c06 | |||
| fceff845c7 | |||
| 49ac79fcdd | |||
| abe238ce61 | |||
| a6f60405b6 | |||
| 69f60c5222 | |||
| 8ed42f6e4b | |||
| 7342f27fb1 | |||
| 7b46f15068 | |||
| b1d0f4afab | |||
| 15116a0456 | |||
| d8584bb15a | |||
| 0cd95d64e2 | |||
| 6074303f4a | |||
| 806af5322e | |||
| b9161843dc | |||
| aa62a2a9cf | |||
| 56f06bc9e0 | |||
| c328761c78 | |||
| 0facd4cf66 | |||
| 1b7f9439ad | |||
| 366b64571d | |||
| 0de35dee29 | |||
| 6ffa720f87 | |||
| b3130a2878 | |||
| 0b71371597 | |||
| 67b6a1de70 | |||
| 0c10184a69 | |||
| 5da1df5004 | |||
| 93100adbe0 | |||
| 269f07a137 | |||
| d4554fc89e | |||
| 77ea3ed215 | |||
| 8fe4394ada | |||
| 042829c40d | |||
| 40f7c90474 | |||
| ccc1b200c0 | |||
| a0d9854e11 | |||
| de45437cc9 | |||
| b61e06a40f | |||
| 42e090d945 | |||
| 936b24e3b0 | |||
| c9cfc952aa | |||
| 5a52369fff | |||
| b560559b0a | |||
| 62858115b2 | |||
| 2542a7e840 | |||
| 89d59fad61 | |||
| 8054923941 | |||
| db38d99f3c | |||
| 25bc0bd365 | |||
| 81523b7ba3 | |||
| 7ab30aa468 | |||
| 3e3ed89f33 | |||
| a8dcb3987a | |||
| 7b5fecfad7 | |||
| 36632e3356 | |||
| 6d050374c3 | |||
| 3f8cd4577c | |||
| b6e211dd62 | |||
| e8a77c61ac | |||
| 3119434932 | |||
| 8a9091595d | |||
| 22eb09ee0f | |||
| aa4447413a | |||
| fdf9288e52 | |||
| d13096e08b | |||
| 8ca1e2d417 | |||
| c5e4f7c5fd | |||
| d2bb1b420d | |||
| eacb420e21 | |||
| 12135bac77 | |||
| 56f791eec2 | |||
| c8d5b9e4d0 | |||
| ba747e5544 | |||
| ff29ef7d31 | |||
| b38544a9e8 | |||
| 73b8bb8617 | |||
| a2b74c8466 | |||
| 39a77064e0 | |||
| 478058119b | |||
| d1f64c02d8 | |||
| 53848be081 | |||
| 41a0196874 | |||
| dbcc19aef4 | |||
| f8058f039f | |||
| fae0ef6cde | |||
| ef9ce62aa8 | |||
| f1b29941fd | |||
| 76f9336de4 | |||
| cd972884ff | |||
| 757130f9d0 | |||
| fd65000afc | |||
| 059601734f | |||
| 370ec56207 | |||
| e679936e0a | |||
| 2fe423cc70 | |||
| c282d8d5d0 | |||
| f644f7078c | |||
| 2c8a49bb26 | |||
| f66cf7c9e8 | |||
| 24e7204b51 | |||
| 29a2b58ab6 | |||
| 235372d6e8 | |||
| 8d6c3a7536 | |||
| 4a608dced6 | |||
| b17f9ac10e | |||
| 50adf2b340 | |||
| 7791ab728f | |||
| 7c3deba4a6 | |||
| 4705f46a30 | |||
| c95a349fae | |||
| 1f54dc3ac4 | |||
| a4d56b56ab | |||
| 787399f5e3 | |||
| 449f5439ae | |||
| 89aa45e15c | |||
| 717c3207d6 | |||
| f68603703f | |||
| d4a3903ba3 | |||
| 367b0afb17 | |||
| 9b9b14e614 | |||
| 4aee151b0e | |||
| 59e8b9370f | |||
| 58ec69c34a | |||
| 39fa2021e2 | |||
| 83f492a195 | |||
| 9f11cac393 | |||
| 933457acbe | |||
| 06f4099566 | |||
| 5624a78b17 | |||
| 217be1f274 | |||
| cbc635110a | |||
| 90496a663b | |||
| d76c9a198d | |||
| b28e650308 | |||
| 3cd6c776e7 | |||
| a83c112e9f | |||
| c1da9c26a1 | |||
| bbbdfd57e4 | |||
| 289601e814 | |||
| 31a7d10756 | |||
| 07de4abc08 | |||
| 47e875142f | |||
| b9c940926f | |||
| ddf801f08f | |||
| 62c844d5ac | |||
| 263b6d4d6f | |||
| c6c470a2c9 | |||
| 4acca38a65 | |||
| 4cf642b526 | |||
| 94f84409aa | |||
| 6ca91b01a1 | |||
| 601f2bf137 | |||
| 4c0705a741 | |||
| 2667543e0e | |||
| f60ed39322 | |||
| 3e05efa1f3 | |||
| 7c723b4852 | |||
| 77ad4fdac6 | |||
| d1ecb206f6 | |||
| 4890d820f6 | |||
| b7350188a4 | |||
| 30cdb635c2 | |||
| 8cfac6fd60 | |||
| 2197d62c2f | |||
| e6e7121445 | |||
| 7c7e626097 | |||
| b511681c2b | |||
| 5c8f3a0c95 | |||
| 6ef6d6f0b2 | |||
| b548a06270 | |||
| c2027d7512 | |||
| bf32d219d8 | |||
| 313b3a6935 | |||
| 28d31dedc8 | |||
| b7ea2cc50c | |||
| b58368dc34 | |||
| cf2e55f4ac | |||
| f5e55bb6d9 | |||
| 5cb3d15ada | |||
| e99a41158e | |||
| 2cf690cc99 | |||
| 58be6dcd52 | |||
| dab02394ce | |||
| 29ad47cc0f | |||
| 9aa8f1bfb1 | |||
| 76afaefe45 | |||
| 040a43b50b | |||
| a9e715bce8 | |||
| 4e466d8840 | |||
| 1404424071 | |||
| bc27e96d23 | |||
| f436bd69b5 | |||
| 3b0eedeb08 | |||
| 94c773ee03 | |||
| c1eecf0b48 | |||
| c2a58a692a | |||
| 5547492d34 | |||
| fcea2cc5b5 | |||
| 43cf7e9094 | |||
| 08bf9e2513 | |||
| a7460445bb | |||
| 7e4d180e57 | |||
| 88dcad59af | |||
| 213a6d8ac8 | |||
| 82e17c8aec | |||
| 32f9800943 | |||
| ca2222e11f | |||
| fbded8d8f4 | |||
| 8a3d0caffd | |||
| bfe40a324a | |||
| e506dd738b | |||
| 7f35ecffcc | |||
| 24365d7353 | |||
| 9279f6b385 | |||
| d685bf8962 | |||
| 6e47e5284e | |||
| a9c686dfcc | |||
| b3c00f3edf | |||
| 09a9951c69 | |||
| 56b5291529 | |||
| 4e33b1b867 | |||
| 7a32152ee5 | |||
| 382c09abcb | |||
| 12731f23a7 | |||
| 4a760f5e81 | |||
| 3249d9eba3 | |||
| dc4e4e6329 | |||
| 9a1250a9d7 | |||
| ff5b4e971d | |||
| 96b696450c | |||
| 96f3c88f0f | |||
| 13c4e4e8f2 | |||
| 415be03f6c | |||
| 52fc8f05ee | |||
| bc4d664f2b | |||
| f84a31dfdf | |||
| 71700b8765 | |||
| 891c284754 | |||
| d71de7cc38 | |||
| d5680f0c6d | |||
| a6a8f2c451 | |||
| a98a77041e | |||
| f7d6592aa6 | |||
| fbf1fcc605 | |||
| 227e41e50b | |||
| c03ff3b61a | |||
| 37eb81799e | |||
| 70f1d17495 | |||
| 8085d34b40 | |||
| 6b2896db75 | |||
| 6ce9e2283e | |||
| 0f07c5e809 | |||
| 5d893b36c9 | |||
| 486489acd7 | |||
| 1e531cb25d | |||
| 276e1dd12b | |||
| 317c7761d4 | |||
| 4e8038a4f5 | |||
| 3950765e8f | |||
| ebb8eee941 | |||
| dd5763cd3a | |||
| ad72e9f6ea | |||
| b202f7b3d5 | |||
| fbea0af29b | |||
| 5b6e8884b4 | |||
| 4c403e5b71 | |||
| ebcb443237 | |||
| e82fd31bd4 | |||
| e44aa77403 | |||
| 4e48ddb975 | |||
| 8e3ec4d567 | |||
| 313c70f211 | |||
| fa1df5ffb9 | |||
| eef94ac5a8 | |||
| 6562a4eb14 | |||
| abb32a319e | |||
| e670a94b8a | |||
| c9605e1cba | |||
| 106f029941 | |||
| d0b86ad612 | |||
| e59c9d0f67 | |||
| dfed9bf854 | |||
| 27127a46cc | |||
| b53a47b192 | |||
| cbf7f66a6f | |||
| 5d34150bed | |||
| e0f5215414 | |||
| dfd16c95ff | |||
| c9b6fad6a0 | |||
| 8e4e0e3749 | |||
| 0bac0b4e0f | |||
| 4e6dffc7cd | |||
| d5418bd463 | |||
| 15fb6965c1 | |||
| 19683ade92 | |||
| 09deafd6d4 | |||
| eb13217498 | |||
| 5a2160c96e | |||
| 590de515e3 | |||
| 2056ef4aed | |||
| 3f40d1ef5d | |||
| 88f3ebe63b | |||
| ec8e0f84a0 | |||
| 932d54b5eb | |||
| 03d6d54435 | |||
| 81150b7392 | |||
| 02babb16cd | |||
| c36ae07bd1 | |||
| 06d67756d4 | |||
| 909b20c00a | |||
| d9fcc4b968 | |||
| 60b83a5732 | |||
| 4aacbfb24f | |||
| 5dd7ad4759 | |||
| ad9db3a127 | |||
| d03fc75329 | |||
| e5a82bc461 | |||
| 51beb97dd0 | |||
| a6576046e0 | |||
| 31bd8ce0c8 | |||
| b6ff9f0607 | |||
| 11dbfab4cc | |||
| 047df9aa9e | |||
| f16c8b4cc4 | |||
| 2ac369a3e1 | |||
| 63c86ccc61 | |||
| 9021129799 | |||
| 42758d0780 | |||
| f444fe8fdf | |||
| c37247eb5a | |||
| 25c449df8e | |||
| 18e4ed2e32 | |||
| 1c8aff1297 | |||
| f1d1e9d241 | |||
| 3d652af44d | |||
| 0da6d71757 | |||
| 8439c0e0c6 | |||
| 664a022c46 | |||
| 2fd5c4a192 | |||
| beb3feb73e | |||
| c4fd1070b2 | |||
| ea5c068f5a | |||
| c3df4a9485 | |||
| 5f45bbe243 | |||
| 6b25b67a08 | |||
| 751dbd08b6 | |||
| b1e1e85279 | |||
| 6d23551aed | |||
| f0b290dadc | |||
| 75f5130f5f | |||
| 9cd5557ac4 | |||
| 6ed7d24363 | |||
| a382f4ce3c | |||
| c68e71a24f | |||
| 0965d9da2b | |||
| 2a7f3d002a | |||
| 44fc1c55f6 | |||
| 35121a2ed8 | |||
| e195b840f2 | |||
| ea7e75798d | |||
| 1a17ecdeb8 | |||
| 08f64e1edb | |||
| e338c648bb | |||
| ff96eb2e84 | |||
| bb01b849a9 | |||
| 8a77837f21 | |||
| 304778b617 | |||
| 68d79274cd | |||
| f9edd3a539 | |||
| 7d5d2b909f | |||
| ee3c000339 | |||
| 7738b67737 | |||
| 2b9962ea68 | |||
| 824ed3379a | |||
| 19da998932 | |||
| 849933a687 | |||
| 2610feb270 | |||
| d3a766af2d | |||
| f6d94a95dd | |||
| 42fa5b736d | |||
| aa918d3d1e | |||
| cbcba31d47 | |||
| 561f80ccc7 | |||
| 4e4ae34de6 | |||
| 53c452506f | |||
| 89ceb1688f | |||
| 28acbdb4fc | |||
| 7460cc682d | |||
| 165b40b22a | |||
| 47e3230186 | |||
| 5b37ff8160 | |||
| b8ff478d78 | |||
| 8e8bb0d2b3 | |||
| 58b9466852 | |||
| 0334dcaf57 | |||
| 317ce28538 | |||
| bc5e45af6c | |||
| 4244e458f5 | |||
| 584f526e71 | |||
| 4234c04e6d | |||
| 0d8623c3f2 | |||
| 7787734496 | |||
| a1a0186438 | |||
| d31f754451 | |||
| 6facb8d424 | |||
| 5390b2b0aa | |||
| 41e13e99fb | |||
| e446b950d9 | |||
| 315d0733f7 | |||
| cfac692012 | |||
| 47e3da2c7b | |||
| 5074d589fe | |||
| 5c4dd6d5a3 | |||
| c667b5d8dc | |||
| 4de0cd762f | |||
| 8cd34af4f0 | |||
| 22a1cf935e | |||
| 7edb42f190 | |||
| 974d560453 | |||
| 0d145f317f | |||
| f906aeee9b | |||
| 19df5ff811 | |||
| 529e81e142 | |||
| 1d13af8057 | |||
| c0f0edfaba | |||
| 7ec1d1e330 | |||
| 1a234a4351 | |||
| 72783d6cfd | |||
| 131173d062 | |||
| ddaa008ede | |||
| a09013986a | |||
| ab48b834f7 | |||
| 45fabe74b9 | |||
| 2a6a21eba3 | |||
| aec41d60de | |||
| 294f8c0d80 | |||
| ff622f10ea | |||
| d83386de56 | |||
| 23524c6655 | |||
| 83b4e18704 | |||
| bd59c3ea69 | |||
| fb3bd20dff | |||
| 1666f5f903 | |||
| ee9c7cbe3a | |||
| f1b0e911e1 | |||
| 47c2103930 | |||
| 5be5d8be7c | |||
| 487bb24896 | |||
| 51e3db6a6d | |||
| 0a5f523eae | |||
| 313c86af6a | |||
| 1654b74fb6 | |||
| 1ee2a7bff4 | |||
| bb1f1a7593 | |||
| 3b3325076a | |||
| d846b1b952 | |||
| 92b78d6804 | |||
| 3da45d2f9e | |||
| ed8b06a756 | |||
| b669c793fc | |||
| 19efa08778 | |||
| 8d0de74d5c | |||
| 5c94806a1d | |||
| 0007b7c9fe | |||
| c7d62c4709 | |||
| b18008c58d | |||
| 9469321e3d | |||
| a4a9efeefc | |||
| 70744f10e0 | |||
| 7587eaf763 | |||
| 12e0131abf | |||
| 667ba0febb | |||
| 8149386aec | |||
| 9470169d2f | |||
| 737ef160d2 | |||
| 5e85baf919 | |||
| 872a4e2999 | |||
| 56ac387e6f | |||
| b5e1bbfa6f | |||
| 1463e2c52b | |||
| 1370f05714 | |||
| cc2106397a | |||
| 06d6c183fb | |||
| 669397b092 | |||
| 375eb46450 | |||
| 91eb544979 | |||
| 91f3edb63b | |||
| a6c7eef624 | |||
| 115c9ee3af | |||
| bd9ea586a7 | |||
| 6fc17bfa17 | |||
| 3c5083d75d | |||
| af8d4788b8 | |||
| 2c0ac82996 | |||
| 32efa1a3af | |||
| 2cb9d2784b | |||
| f94bea8d97 | |||
| 3d47c5c6f0 | |||
| 1101383b51 | |||
| 4351ada794 | |||
| badfd0bc40 | |||
| d15e13d475 | |||
| ac9389f5cb | |||
| 7876fb7ee7 | |||
| 0dd8a6aea2 | |||
| 7a38f49a21 | |||
| be8c0b9835 | |||
| ecc6269648 | |||
| 9f22974209 | |||
| 3280d6b786 | |||
| a320f24247 | |||
| e317b0eb7e | |||
| f4314076ae | |||
| b0e7d9702b | |||
| 57e86346a6 | |||
| 03b63de588 | |||
| ece7697f6a | |||
| a2a4dcba06 | |||
| c9af040be9 | |||
| 26941e4a2e | |||
| 29e724b810 | |||
| d8f41a9032 | |||
| 7beec96dd3 | |||
| fd21a584bf | |||
| 1ccb0f8d8d | |||
| 29a68c37c5 | |||
| 76c19410c7 | |||
| 008147d1f3 | |||
| 0e22e36b94 | |||
| ad25af56a9 | |||
| 06e9163e65 | |||
| 68d01429ea | |||
| 882a72987b | |||
| fceb9a6925 | |||
| aeb3b92148 | |||
| 14e30d61cf | |||
| aca8bc4ea9 | |||
| fce1f8e0af | |||
| 21c71bf35d | |||
| 4a7ab34568 | |||
| a232915e71 | |||
| 073f21c0d9 | |||
| c9b383d3f0 | |||
| e7b7d5804e | |||
| 08153b7b4d | |||
| 4e221803b0 | |||
| 7c0fdbe2d9 | |||
| ea20c934ea | |||
| bf94448843 | |||
| 5e6004961d | |||
| 224b1369a1 | |||
| f1539d0ef5 | |||
| b41d826e0a | |||
| d3a23817f1 | |||
| 120f5cf7f1 | |||
| 4a66389bf1 | |||
| 9bea55bd77 | |||
| 73525b3bbc | |||
| feb1b9e029 | |||
| 180ed2553c | |||
| 9cf67699cc | |||
| 666fe4cfbe | |||
| 6069e8cb14 | |||
| d71a78449a | |||
| 45a3e30f6c | |||
| f63befc80f | |||
| 5c5e7b7e48 | |||
| 0e3dc6fefa | |||
| a8c27a2275 | |||
| 4940bda15f | |||
| 0bf0fd98cc | |||
| 56f4aaff47 | |||
| fa9062a87e | |||
| 5071b2f016 | |||
| 4e0af69b67 | |||
| aa84548002 | |||
| 0aca0435ef | |||
| 3f965a1c33 | |||
| f7bc270c00 | |||
| 77b9fe37ba | |||
| 2c6fe1e8bc | |||
| 32c695a7d4 | |||
| c472821d67 | |||
| 730e5d2e64 | |||
| d459c3763d | |||
| c3dba53040 | |||
| 04dfda9952 | |||
| d8d1235773 | |||
| 88c8781396 | |||
| 5dc9a570fa | |||
| 14180774b7 | |||
| a328537ee3 | |||
| b4dc074638 | |||
| d2faf86214 | |||
| 266f8fb67e | |||
| 03454aeefb | |||
| 0e2b2eb266 | |||
| 17f39d9d2c | |||
| e4ad330c2b | |||
| 1031110d93 | |||
| ef67f790a2 | |||
| 3ba37fc954 | |||
| c369c0252f | |||
| 92302d0f22 | |||
| 3815c0ef76 | |||
| 2d8936068e | |||
| 6bec23e7db | |||
| 8353c8336c | |||
| 961c847c00 | |||
| 21293f1c08 | |||
| ed7bd50500 | |||
| ac848c91e9 | |||
| 6cb45a5e0f | |||
| 11d220e956 | |||
| c34f398b5c | |||
| a6185fa0b2 | |||
| 1887495434 | |||
| a8c1359c54 | |||
| 251fac2c60 | |||
| 91aae79fdc | |||
| da9559d92c | |||
| cf6f6829ae | |||
| 6b6f8087d3 | |||
| 37b7ba7cae | |||
| 2de3f4d261 | |||
| b5804b320c | |||
| 2a6515f765 | |||
| 02854c1d5c | |||
| 416df96c1b | |||
| 7b07fe04c8 | |||
| 2b6c2e07a4 | |||
| 80233f353f | |||
| 2dad2586f1 | |||
| b75a8e5d31 | |||
| d28c3cf674 | |||
| 233c55337c | |||
| e8871d990a | |||
| 45da03340a | |||
| f301c00406 | |||
| da6d3de48e | |||
| 5a593f06f6 | |||
| 882df6ad23 | |||
| 53056f47ed | |||
| b6756c0319 | |||
| d5f6c7e0be | |||
| 544a4e3d7f | |||
| 7da2f62bf6 | |||
| 0088607bc7 | |||
| 4b434c9a03 | |||
| 189be4625e | |||
| 2a3f753c41 | |||
| bbed5adeac | |||
| c3c99b701c | |||
| 7e1a21ad6e | |||
| c96ac858bf | |||
| 451f3f71b8 | |||
| 4220944ace | |||
| fc8a048662 | |||
| 9a8b5ebae0 | |||
| fd2cda66bb | |||
| 381d0445ed | |||
| 68ed9ec85e | |||
| 010b030b56 | |||
| e2aa948fac | |||
| d32411f61a | |||
| 323248faef | |||
| 01c03bddf6 | |||
| c2d0734bc4 | |||
| b21d915a7c | |||
| 2aa0e76ad9 | |||
| 2a3d0458d5 | |||
| 19a3e2f6b3 | |||
| 4ed49d2f21 | |||
| ce1956e60b | |||
| a3c9029664 | |||
| b65623ef1f | |||
| 9e57bedea2 | |||
| 41c5ba98ab | |||
| 353e0820e3 | |||
| 4265b7379e | |||
| 710baff14d | |||
| 6c1ed6a9b5 | |||
| 6d7d0f78d5 | |||
| d7c783560a | |||
| 40790f6c45 | |||
| 642dccceb5 | |||
| 0b204c8cb3 | |||
| 76cbc6f48d | |||
| 3645ad9582 | |||
| 21b2bf0253 | |||
| 5e4714b41e | |||
| 795227d376 | |||
| d13f8c6701 | |||
| 2af1949a92 | |||
| 5909a0527b | |||
| 4f420f8454 | |||
| f63eec6953 | |||
| 376c7899ab | |||
| 31fc26a8ee | |||
| 4089b7bd37 | |||
| 2627f60a39 | |||
| 37f22c8627 | |||
| f658a947c6 | |||
| b11049ba1a | |||
| 646ef15d83 | |||
| 2aff321187 | |||
| 7f934e3b25 | |||
| 8aad97ca4a | |||
| fcf8fc503f | |||
| dcb58a94b4 | |||
| 02f36f4e72 | |||
| 6640e8b647 | |||
| 3df51305df | |||
| 76387d003b | |||
| 142876a59b | |||
| 11aa922a6c | |||
| 444a5daac5 | |||
| fc4ca0503e | |||
| c3c6c5f154 | |||
| e373aa39e7 | |||
| de182aeeed | |||
| a136283312 | |||
| 77ae215047 | |||
| b2c636af75 | |||
| c9e300f76f | |||
| e73776240c | |||
| 6f27357630 | |||
| e4b1a33ced | |||
| eb750f0217 | |||
| 13f82be035 | |||
| 4612cd94f0 | |||
| 67d4893f6e | |||
| ed11cbd2c7 | |||
| f23c2494ea | |||
| 0e03569def | |||
| 9cdb9283ca | |||
| cfb967d309 | |||
| df9bf18ed2 | |||
| fa38047749 | |||
| c4f095f9df | |||
| b08fe855a1 | |||
| 9b1afd7145 | |||
| 4a8aaf9f46 | |||
| 663d57cc8f | |||
| c2205266f0 | |||
| 2f0aff7b78 | |||
| 12f5bc9c77 | |||
| da79aadc8d | |||
| de466cf998 | |||
| 63a391a649 | |||
| 765d792f40 | |||
| 2979296c02 | |||
| c8696478b7 | |||
| e4e994f1b1 | |||
| 8a1771aa61 | |||
| c5c787ca5c | |||
| 04d3032914 | |||
| a715a56afe | |||
| 87a9695c64 | |||
| c2fe2b4360 | |||
| d44ba14030 | |||
| 993aba288a | |||
| 7d0a28ec43 | |||
| 6d29e9209d | |||
| 2ccfe635ce | |||
| c1e14e09f3 | |||
| ef6f4465af | |||
| 512eead15a | |||
| 35a9771e23 | |||
| fa57857cc0 | |||
| b8922ffe07 | |||
| 060976bb26 | |||
| 45009c8c66 | |||
| e0cc7aad97 | |||
| 85f3d6eaef | |||
| e59d08ee8b | |||
| 11172c1949 | |||
| bc4da2afef | |||
| 103e63eca5 | |||
| 2507e414d9 | |||
| a98c497dbb | |||
| 202a22ea68 | |||
| 02190b82c2 | |||
| a6eac92cd5 | |||
| 36ce91c634 | |||
| 3cd881f0b9 | |||
| 7aeccd9a6d | |||
| 3ab4735aa4 | |||
| 22998f43ae | |||
| f866c1d961 | |||
| 88760170bf | |||
| 64d5317d19 | |||
| 2511872823 | |||
| a67d82c183 | |||
| 02c26f4b87 | |||
| 81a2d47c16 | |||
| 446913f2f3 | |||
| 3667382067 | |||
| 83f936f31b | |||
| 095f1d328e | |||
| bbd275a4e3 | |||
| 93b42f14e9 | |||
| c8f3f4b173 | |||
| 8368b78f23 | |||
| 0b5acdca51 | |||
| 2bd6cde4e8 | |||
| 76c879c388 | |||
| 3e2b5dd9d3 | |||
| 666be5c3d9 | |||
| 6b1cad1e3d | |||
| 25a1996ece | |||
| f84765f29e | |||
| c950df2ede | |||
| 00a5930d4c | |||
| c9b22ba04f | |||
| 27067beabc | |||
| 0911565660 | |||
| 3737b5f774 | |||
| bb17541c30 | |||
| 2bad63c68e | |||
| 828b70fbfa | |||
| 60129958c8 | |||
| d691d1db78 | |||
| d241e26d03 | |||
| 81b0bb47be | |||
| c288a20077 | |||
| 7242186045 | |||
| 73e7163ed6 | |||
| fdf5148238 | |||
| 6d12f7925b | |||
| 7a4b23938e | |||
| 7d3b9e4dda | |||
| 6abc32efe8 | |||
| ea73ddcb59 | |||
| 0e6be96de1 | |||
| fae0442130 | |||
| 7b66238eb2 | |||
| ea6ec5c70f | |||
| ed822f8002 | |||
| 37d6014f40 | |||
| c351b63919 | |||
| de98704e1e | |||
| b0b14bd1d1 | |||
| 4d78d987c6 | |||
| d831562e1f | |||
| 8ba61e11a2 | |||
| f264631267 | |||
| a32440cdef | |||
| 885c4d7609 | |||
| 3ea0447715 | |||
| c4bf0f0ab5 | |||
| c35b32961b | |||
| e610924641 | |||
| 6886f37188 | |||
| c5f29dee39 | |||
| 54a4bde88b | |||
| 7548dc3e04 | |||
| 2d4f2532ae | |||
| 5a5a86684a | |||
| ae3f57e89a | |||
| fff7b2a859 | |||
| 6b9911dd74 | |||
| d3ac4a728d | |||
| 6ae177f37e | |||
| bb75ed5071 | |||
| 5fb11e3f06 | |||
| 1a520325b2 | |||
| cad3c5ba95 | |||
| fc0efd43fc | |||
| e422ae9477 | |||
| 2e5bc2f6b7 | |||
| 34430c1047 | |||
| b314f73ef4 | |||
| ec87c71064 | |||
| 0dcb591ee8 | |||
| a3ff40ccf0 | |||
| a92c9e3b91 | |||
| 8b16301e5f | |||
| b12facbd54 | |||
| 36ec4a098b | |||
| f4d8b2a57a | |||
| 94ac3895f9 | |||
| 1411d48d9e | |||
| fc0d23965b | |||
| d24952ad0a | |||
| 2542778fa8 | |||
| 54a18be0ff | |||
| c6c5a157f1 | |||
| 4814578d85 | |||
| c1a37ac00f | |||
| 27f07206f6 | |||
| febaf55afe | |||
| c647be0287 | |||
| 4c36702546 | |||
| e86e67e8cd | |||
| 1aa7a6c8b8 | |||
| 6c5c93438c | |||
| 633ae8bc40 | |||
| cdcc33aebc | |||
| e3003ce294 | |||
| ea9a498fcf | |||
| 9611347d1b | |||
| ee2b6315ec | |||
| ca8a1b80d9 | |||
| 994745bd53 | |||
| a86302beb7 | |||
| 095e00e3e9 | |||
| 2ea29affb8 | |||
| d5ba6f70f2 | |||
| f7aae84cf6 | |||
| c7eaee117e | |||
| a59e4a961b | |||
| e1d013bf7b | |||
| dfc9da8020 | |||
| 9220ea5695 | |||
| 7149143df8 | |||
| 472d32ee17 | |||
| 7383daa23e | |||
| 29c5c1a0d3 | |||
| d300225f78 | |||
| 8a5ee84901 | |||
| 42b7c40020 | |||
| ff72268430 | |||
| a875ef77cd | |||
| 863aec4c79 | |||
| ac506255a6 | |||
| c020aba17c | |||
| ca7cb7bd0e | |||
| aa209e621d | |||
| 0ead219a8b | |||
| 83ba1c9d20 | |||
| 9c73f32121 | |||
| ce10614cab | |||
| facbeac052 | |||
| ba80af3bd9 | |||
| af4c45a52b | |||
| 621283bb78 | |||
| 17e1ed4869 | |||
| 33056a4fd3 | |||
| 8d3b06623e | |||
| 76c00fe2ed | |||
| bdfc49f88f | |||
| 329dbd0485 | |||
| f775de1884 | |||
| 5f5c7624f2 | |||
| 4a5d7c671c | |||
| d13634cd6b | |||
| 553a98036c | |||
| 7c951d60da | |||
| 864488adbb | |||
| 115c09ce23 | |||
| 4bf9024c17 | |||
| 4dac68ef72 | |||
| f06d783497 | |||
| 04c22e86cd | |||
| f1fde259e7 | |||
| 9c7ba5a329 | |||
| a0760d0ca6 | |||
| fbe30ffec6 | |||
| e99ec32b4b | |||
| 401ac8c4f7 | |||
| 575dfd9b21 | |||
| eab3c4d382 | |||
| 188ee5af15 | |||
| f2713aad94 | |||
| b465594aec | |||
| c0e147dc57 | |||
| 7709dfa118 | |||
| 46ea4843c1 | |||
| 403e88b25f | |||
| f135771ddf | |||
| 89510e793d | |||
| 4f4a67fb45 | |||
| e80bfa4a95 | |||
| d0c6c310d9 | |||
| 23bfc1666c | |||
| 26333c28ab | |||
| f176b8b14c | |||
| 4d5d04aba3 | |||
| 2396b2feea | |||
| 7fa298f2ef | |||
| 88ccd546d8 | |||
| 58a90d613b | |||
| 4399c1b6c1 | |||
| c37c752d36 | |||
| fd046c8fd8 | |||
| 09b7694601 | |||
| 32186b98f5 | |||
| b4b3d47783 | |||
| df20503434 | |||
| f4aa24a36a | |||
| f9be11ac8a | |||
| 618e766d5f | |||
| 007c04bc97 | |||
| 2cd32d7e76 | |||
| 10b20ec647 | |||
| 19bcf6b43c | |||
| 418d1e16e1 | |||
| 6471d781d0 | |||
| 97ddc5917c | |||
| 3419bfa3f2 | |||
| a95ff20647 | |||
| 9e0a9e2601 | |||
| 8b34d65970 | |||
| c60fd6f89d | |||
| e5b067d1ab | |||
| 0a1c2bcccc | |||
| 08b9af89bb | |||
| ddc23bb3bf | |||
| 162ee16825 | |||
| e7fc590f91 | |||
| c9442c591c | |||
| b7d316031d | |||
| 361e9f3ea5 | |||
| b7ed8828e7 | |||
| c45b9a5301 | |||
| 1c77ffc288 | |||
| 55f454db2d | |||
| fd1823a890 | |||
| 28120793b8 | |||
| 751e33c70e | |||
| 56ca901cdb | |||
| 12079c32de | |||
| b3262684af | |||
| c53ea66f39 | |||
| 090e61f0ec | |||
| a81e6693cd | |||
| f32ce8377e | |||
| 9021b8bc6a | |||
| 838fe3020d | |||
| b4d4dcbcbc | |||
| 52a892ec46 | |||
| 0ee3d9da5d | |||
| 50afb292b0 | |||
| 275ef9da17 | |||
| b6a87390a3 | |||
| 72178631c5 | |||
| f8859c5fca | |||
| 979119a29b | |||
| bc66572275 | |||
| 609231675f | |||
| 2b5ef8d93e | |||
| 018a815398 | |||
| 7c9068c34a | |||
| b4ac95b225 | |||
| dc5980ab7e | |||
| be22256765 | |||
| e7bcdc63e5 | |||
| 3b2647917f | |||
| 092a67ab93 | |||
| 243fcbf47d | |||
| d9675b5da4 | |||
| 8bc8f3eb4c | |||
| 7d32b4f42a | |||
| 697e5b15ec | |||
| ade0718c11 | |||
| 31033ff6e0 | |||
| 9a598ba5a8 | |||
| ff20448b1d | |||
| af5229ba58 | |||
| b180200c48 | |||
| 27441cf2ea | |||
| db61bf609b | |||
| 015fa4cb0a | |||
| 62f6f91146 | |||
| e163b0b1d7 | |||
| 169a886898 | |||
| cbd276c49d | |||
| 183c6c06ff | |||
| 93a46da58e | |||
| 6b6a47bd3c | |||
| 4a0a98a0fd | |||
| 369ea4fd26 | |||
| d63c002bf5 | |||
| bc567ac406 | |||
| 07c17d4e63 | |||
| 2695ecbc07 | |||
| 4d7a5fb225 | |||
| 25a8e08703 | |||
| 420606658b | |||
| e931d3153b | |||
| 2913c063d4 | |||
| 5606b57646 | |||
| 0fafe34008 | |||
| a9a1640d67 | |||
| 812363fb99 | |||
| b40e0be1c9 | |||
| 1be973da07 | |||
| aca2c52795 | |||
| 536b2ab7e5 | |||
| ccef293161 | |||
| 4b0de87813 | |||
| fa22aef31b | |||
| cb7544a615 | |||
| a9be4906b7 | |||
| 6f36d21a04 | |||
| c55a15c4dc | |||
| 8f01dad1a9 | |||
| db6e1aa20d | |||
| 3cee69a077 | |||
| 69ffe71595 | |||
| 16fa033111 | |||
| 8e494aa771 | |||
| d203cce8b5 | |||
| f8de1b1a75 | |||
| de89a25a25 | |||
| f982e95267 | |||
| 293d0cdb58 | |||
| 011f2651ee | |||
| a8d3c43a77 | |||
| c19641f8b3 | |||
| 6596b343ff | |||
| b6dbb0330c | |||
| 0dd138666a | |||
| 33b9fec150 | |||
| 32b020a165 | |||
| c1db230331 | |||
| 254c052ecc | |||
| 8e889dfa7c | |||
| 5b6a52a646 | |||
| 55f56deb63 | |||
| bfe127a720 | |||
| d95c8911a3 | |||
| 0380f9d854 | |||
| 71b1d60363 | |||
| 8b1f92fabd | |||
| 419af0cf28 | |||
| 9030c59932 | |||
| ee88078150 | |||
| 04451f6072 | |||
| 2364f7f08b | |||
| 7f82a58f51 | |||
| 1caf074ba1 | |||
| 34677f78c2 | |||
| e095609ac6 | |||
| 1122408957 | |||
| 5f9b78ca01 | |||
| fe138fc75c | |||
| 31c324ff61 | |||
| 30564ed8b7 | |||
| f175a15627 | |||
| f05bfe45a8 | |||
| 1234f7d16d | |||
| 249773e08c | |||
| 0f9a36a171 | |||
| 531912a3c8 | |||
| f2d866420a | |||
| 6c3ebc19b7 | |||
| e8c271cc16 | |||
| 1a467233fb | |||
| 8026845346 | |||
| f51ab2c440 | |||
| 5f0fff58ac | |||
| b2c5c1fda4 | |||
| d6b5878dce | |||
| d1dd8d3c11 | |||
| ea8ded470b | |||
| 971b932387 | |||
| a1db5fda70 | |||
| cd658e6779 | |||
| 88c8b6ec6f | |||
| bc74fef3f4 | |||
| 871efda589 | |||
| b5d57531d9 | |||
| 3561bbe887 | |||
| 74122040a3 | |||
| 4dcf8c99de | |||
| 95a8d2cc25 | |||
| f671cd7765 | |||
| 88be5a3781 | |||
| c8347df494 | |||
| dca901617e | |||
| 5dcbbc084b | |||
| f66179f336 | |||
| 1eb048ef93 | |||
| f01e28f574 | |||
| 96627d27b1 | |||
| 955fbe46d1 | |||
| b3fc574a6a | |||
| 8a3f7560c9 | |||
| 8406e92a9a | |||
| 3b376b4448 | |||
| ca3b7be623 | |||
| c825c52d2f | |||
| 0ea0e4ce59 | |||
| d53d4b4d99 | |||
| b37cd14dd1 | |||
| a921a6bdc1 | |||
| 51a0345941 | |||
| 8d70960e2d | |||
| 5661703b30 | |||
| bc30304f72 | |||
| c76da483fb | |||
| 036a1e47d2 | |||
| 20fd34a55c | |||
| 5430c3b592 | |||
| 9b7cb8200c | |||
| 550eedbb1f | |||
| 3a058f278d | |||
| 0f7f0b5f86 | |||
| 3de7534b84 | |||
| 7065462faf | |||
| ca34dccec0 | |||
| 2e9d8e1ccb | |||
| 19b84f7cbd | |||
| 9b7c445a15 | |||
| 4f2e0147e0 | |||
| c07f5e8339 | |||
| 91e56444ce | |||
| 9b3c8c36bd | |||
| e73d27cfa4 | |||
| 8242559377 | |||
| 85726b7ce2 | |||
| bf42f06a39 | |||
| dc6fc3ec03 | |||
| 2f4fd62aed | |||
| 76220727c8 | |||
| ba468fffcc | |||
| a3839cd07a | |||
| 3403520967 | |||
| d8f969f1df | |||
| 57d2086a5c | |||
| 3487deccb6 | |||
| cca7a53132 | |||
| 0926fc627d | |||
| 7999778d94 | |||
| b4ef4c1ff2 | |||
| 72b08e4b87 | |||
| dc1b7d4cfe | |||
| 13be68aece | |||
| 7f16225ffb | |||
| c9ba3f4157 | |||
| 71db9f5e75 | |||
| b61cfb7480 | |||
| 038f4a5210 | |||
| faa64a84e8 | |||
| 06953bd67a | |||
| 6a6291827f | |||
| 3df0abd081 | |||
| 32b67fff2b | |||
| f3dbf4122d | |||
| e25ac786da | |||
| f30fba0061 | |||
| 03f319604f | |||
| 0782dab1ec | |||
| c43cce54ab | |||
| 281a368702 | |||
| 1cd18d2b37 | |||
| c5da64ccea | |||
| 92c10cc210 | |||
| f28d69b429 | |||
| e674e0c927 | |||
| 12c1923511 | |||
| 454f6b6c0d | |||
| df22b91ac3 | |||
| eebabf99b8 | |||
| 23a19f4431 | |||
| d618b0ffc0 | |||
| ffc71b8733 | |||
| 564df78698 | |||
| 8db0b5ca39 | |||
| 79e26fe829 | |||
| 523d4b0242 | |||
| fe39a3e581 | |||
| 081cc1f992 | |||
| 22de863da9 | |||
| 53c80c2c00 | |||
| 673823dd82 | |||
| 554b64a147 | |||
| dc08dba592 | |||
| 0eaa2775cd | |||
| 852673ce41 | |||
| 8c711e405a | |||
| 25b9f95061 | |||
| ee66a6f8c1 | |||
| b694a5f582 | |||
| 7ab3fce93f | |||
| 1f9509cb6f | |||
| cad1d8ece4 | |||
| b709d75f80 | |||
| 5839909061 | |||
| 30f374de58 | |||
| 0f9fec05fb | |||
| 8557ce7c97 | |||
| 972a86f0ec | |||
| 6a1a06d76c | |||
| 7338ebfc94 | |||
| 7132152693 | |||
| c9925f64f7 | |||
| 6da523c8b8 | |||
| 0522284589 | |||
| e10a66dabc | |||
| 51dd631a76 | |||
| 6dae78f900 | |||
| 6b40ae29e4 | |||
| d37249787e | |||
| f44841de69 | |||
| 54c5337d2d | |||
| efb0e63bf6 | |||
| bb92dae6d3 | |||
| 13d78c3afa | |||
| f2910b1d9c | |||
| 78b22a64aa | |||
| 8bb1880c9d | |||
| e7b36c7b90 | |||
| d7804e3770 | |||
| 8d0f9695d2 | |||
| 52b2e4f364 | |||
| ba1c4e8e81 | |||
| 41140149ea | |||
| 85e556ac8f | |||
| cd5437a7e2 | |||
| 00cc82ac94 | |||
| 20f87e3f1d | |||
| 97e34f0667 | |||
| 3e5da9b09a | |||
| a62fcca7a4 | |||
| 222c40ebcf | |||
| 778d59fa6b | |||
| 3833a85d7a | |||
| 6d961ab29f | |||
| 001824e0f6 | |||
| 953d32f9b3 | |||
| edba922665 | |||
| 53806d4601 | |||
| 67597722d5 | |||
| 337794a9e9 | |||
| 5f5fb895ff | |||
| 0302d03bc6 | |||
| 0a4fef369f | |||
| 7d5fc356fe | |||
| 8103e5a18f | |||
| e5b56b67fe | |||
| 8ffb7e5f89 | |||
| cb9ab48ce7 | |||
| 1faa7397d3 | |||
| 468a6d9f29 | |||
| 68e00a60bd | |||
| c0078fda05 | |||
| 66188d9d57 | |||
| c6d59fc526 | |||
| e01ef14025 | |||
| 783cb117c5 | |||
| 1ebb1cee40 | |||
| f0e7101bd2 | |||
| cb7db85096 | |||
| 15f0a63260 | |||
| 662cfca43b | |||
| 3d3cca2964 | |||
| 6fd8b2b177 | |||
| 6edaf42b3d | |||
| 79c047487d | |||
| ac5acb9abf | |||
| 87fbbd3b13 | |||
| 8ac0ec6473 | |||
| 8acba74c4d | |||
| 34bcbdf41d | |||
| d519ca0213 | |||
| a392e8dc09 | |||
| a4d4f77bc2 | |||
| 83a8f72d83 | |||
| 3c54b56cfe | |||
| ff1a08f148 | |||
| 5a53b0fc03 | |||
| e550600ebe | |||
| 7cb13be52a | |||
| ab56d7ecd7 | |||
| bd6ac3ee6d | |||
| 27ca0a8f41 | |||
| f688b9b6b5 | |||
| 16c61b3cc0 | |||
| fb480f22fc | |||
| d0507559a4 | |||
| 58eb331b08 | |||
| c68015ca87 | |||
| 583c22d6e0 | |||
| e0c0739b11 | |||
| 21c0702917 | |||
| 58a4694d92 | |||
| 97cf345528 | |||
| 0658abbdd4 | |||
| 72026a58bf | |||
| 7152231a10 | |||
| 8fe8a667b6 | |||
| 560c543e69 | |||
| c5e6650924 | |||
| 10373ea5c9 | |||
| 992b1cf582 | |||
| 1505f3de06 | |||
| 566efe04f2 | |||
| 7586adbb6a | |||
| 69d6ddccc5 | |||
| 5ae496dcef | |||
| bc5d742623 | |||
| 882e699163 | |||
| 9c725d79d6 | |||
| 79fbf437a3 | |||
| d130aa4289 | |||
| 5d8b83a251 | |||
| 5a2548a83d | |||
| a85b310e1f | |||
| e51fd40547 | |||
| 62f271658b | |||
| 0aa742934f | |||
| a26a709a7b | |||
| 027293d285 | |||
| f7d049ac2d | |||
| ea0ff1c8f7 | |||
| 5c1bb5f13a | |||
| 24d9b4b611 | |||
| a0e75c9006 | |||
| 2435b953e1 | |||
| c042e12323 | |||
| e9efe46db9 | |||
| ecc14b7308 | |||
| 0152fe5cdf | |||
| 892d17af22 | |||
| 2cca00203e | |||
| 9f4626a62a | |||
| e890a0b45e | |||
| 68223f0385 | |||
| 1291a88bff | |||
| d9b687450a | |||
| bd950b37d7 | |||
| 21fcdf8c56 | |||
| 6b400fb4bf | |||
| d982298ab2 | |||
| 765fd7f763 | |||
| 0325047c01 | |||
| 2dce8923ee | |||
| 8d1ba074be | |||
| 4675a3b560 | |||
| 8999b1f69f | |||
| 6c2b19c11b | |||
| a425334928 | |||
| db2faf2789 | |||
| fdbb7d0da4 | |||
| 52cd99918f | |||
| a3e6a95ffb | |||
| 5b65169997 | |||
| 5f3bf69e30 | |||
| 507c02b9af | |||
| b7fe47ba48 | |||
| 7dfd11da4b | |||
| 97ba95f30e | |||
| c1945b4ec9 | |||
| c4291a4b8e | |||
| 5b5dfa86c5 | |||
| 3ca3f6959f | |||
| f7b7bfa406 | |||
| 3d2f29c92d | |||
| 7a457c143c | |||
| 661cfef0fb | |||
| 4349750e31 | |||
| eb38f7404c | |||
| 4908f7f93a | |||
| 01399a4f09 | |||
| 0bf48ac47f | |||
| 93f149951e | |||
| 55cc76bac7 | |||
| 9cc72ab3a0 |
7
.github/CODEOWNERS
vendored
7
.github/CODEOWNERS
vendored
@ -67,6 +67,7 @@ src/EXTRA-COMPUTE/compute_born_matrix.* @Bibobu @athomps
|
||||
src/MISC/*_tracker.* @jtclemm
|
||||
src/MC/fix_gcmc.* @athomps
|
||||
src/MC/fix_sgcmc.* @athomps
|
||||
src/REPLICA/fix_pimd_langevin.* @Yi-FanLi
|
||||
|
||||
# core LAMMPS classes
|
||||
src/lammps.* @sjplimp
|
||||
@ -150,12 +151,12 @@ tools/vim/* @hammondkd
|
||||
unittest/* @akohlmey
|
||||
|
||||
# cmake
|
||||
cmake/* @junghans @rbberger
|
||||
cmake/* @rbberger
|
||||
cmake/Modules/LAMMPSInterfacePlugin.cmake @akohlmey
|
||||
cmake/Modules/MPI4WIN.cmake @akohlmey
|
||||
cmake/Modules/OpenCLLoader.cmake @akohlmey
|
||||
cmake/Modules/Packages/COLVARS.cmake @junghans @rbberger @giacomofiorin
|
||||
cmake/Modules/Packages/KIM.cmake @junghans @rbberger @ellio167
|
||||
cmake/Modules/Packages/COLVARS.cmake @rbberger @giacomofiorin
|
||||
cmake/Modules/Packages/KIM.cmake @rbberger @ellio167
|
||||
cmake/presets/*.cmake @akohlmey
|
||||
|
||||
# python
|
||||
|
||||
2
.github/CONTRIBUTING.md
vendored
2
.github/CONTRIBUTING.md
vendored
@ -1,6 +1,6 @@
|
||||
# Contributing to LAMMPS via GitHub
|
||||
|
||||
Thank your for considering to contribute to the LAMMPS software project.
|
||||
Thank you for considering to contribute to the LAMMPS software project.
|
||||
|
||||
The following is a set of guidelines as well as explanations of policies and work flows for contributing to the LAMMPS molecular dynamics software project. These guidelines focus on submitting issues or pull requests on the LAMMPS GitHub project.
|
||||
|
||||
|
||||
3
.gitignore
vendored
3
.gitignore
vendored
@ -57,3 +57,6 @@ out/x86
|
||||
out/x64
|
||||
src/Makefile.package-e
|
||||
src/Makefile.package.settings-e
|
||||
/cmake/build/x64-Debug-Clang
|
||||
/install/x64-GUI-MSVC
|
||||
/install
|
||||
|
||||
26
SECURITY.md
26
SECURITY.md
@ -32,17 +32,21 @@ for unicode characters and only all-ASCII source code is accepted.
|
||||
|
||||
LAMMPS follows a continuous release development model. We aim to keep
|
||||
the development version (`develop` branch) always fully functional and
|
||||
employ a variety of automatic testing procedures to detect failures
|
||||
of existing functionality from adding or modifying features. Most of
|
||||
those tests are run on pull requests *before* merging to the `develop`
|
||||
branch. The `develop` branch is protected, so all changes *must* be
|
||||
submitted as a pull request and thus cannot avoid the automated tests.
|
||||
employ a variety of automatic testing procedures to detect failures of
|
||||
existing functionality from adding or modifying features. Most of those
|
||||
tests are run on pull requests and must be passed *before* merging to
|
||||
the `develop` branch. The `develop` branch is protected, so all changes
|
||||
*must* be submitted as a pull request and thus cannot avoid the
|
||||
automated tests.
|
||||
|
||||
Additional tests are run *after* merging. Before releases are made
|
||||
*all* tests must have cleared. Then a release tag is applied and the
|
||||
`release` branch is fast-forwarded to that tag. This is often referred
|
||||
to as a patch release. Bug fixes and updates are
|
||||
applied first to the `develop` branch. Later, they appear in the `release`
|
||||
branch when the next patch release occurs.
|
||||
For stable releases, selected bug fixes, updates, and new functionality
|
||||
are pushed to the `stable` branch and a new stable tag is applied.
|
||||
`release` branch is fast-forwarded to that tag. This is referred to to
|
||||
as a "feature release". Bug fixes and updates are applied first to the
|
||||
`develop` branch. Later, they appear in the `release` branch when the
|
||||
next patch release occurs. For stable releases, backported bug fixes
|
||||
and infrastructure updates are first applied to the `maintenance` branch
|
||||
and then merged to `stable` and published as "updates". For a new
|
||||
stable release the `stable` branch is updated to the corresponding state
|
||||
of the `release` branch and a new stable tag is applied in addition to
|
||||
the release tag.
|
||||
|
||||
@ -1,25 +1,25 @@
|
||||
# FENE beadspring benchmark
|
||||
|
||||
units lj
|
||||
atom_style bond
|
||||
units lj
|
||||
atom_style bond
|
||||
special_bonds fene
|
||||
|
||||
read_data data.chain
|
||||
read_data data.chain
|
||||
|
||||
neighbor 0.4 bin
|
||||
neigh_modify every 1 delay 1
|
||||
neighbor 0.4 bin
|
||||
neigh_modify every 1 delay 1
|
||||
|
||||
bond_style fene
|
||||
bond_coeff 1 30.0 1.5 1.0 1.0
|
||||
bond_coeff 1 30.0 1.5 1.0 1.0
|
||||
|
||||
pair_style lj/cut 1.12
|
||||
pair_modify shift yes
|
||||
pair_coeff 1 1 1.0 1.0 1.12
|
||||
pair_style lj/cut 1.12
|
||||
pair_modify shift yes
|
||||
pair_coeff 1 1 1.0 1.0 1.12
|
||||
|
||||
fix 1 all nve
|
||||
fix 2 all langevin 1.0 1.0 10.0 904297
|
||||
fix 1 all nve
|
||||
fix 2 all langevin 1.0 1.0 10.0 904297
|
||||
|
||||
thermo 100
|
||||
timestep 0.012
|
||||
timestep 0.012
|
||||
|
||||
run 100
|
||||
run 100
|
||||
|
||||
@ -1,32 +1,32 @@
|
||||
# FENE beadspring benchmark
|
||||
|
||||
variable x index 1
|
||||
variable y index 1
|
||||
variable z index 1
|
||||
variable x index 1
|
||||
variable y index 1
|
||||
variable z index 1
|
||||
|
||||
units lj
|
||||
atom_style bond
|
||||
atom_modify map hash
|
||||
units lj
|
||||
atom_style bond
|
||||
atom_modify map hash
|
||||
special_bonds fene
|
||||
|
||||
read_data data.chain
|
||||
read_data data.chain
|
||||
|
||||
replicate $x $y $z
|
||||
replicate $x $y $z
|
||||
|
||||
neighbor 0.4 bin
|
||||
neigh_modify every 1 delay 1
|
||||
neighbor 0.4 bin
|
||||
neigh_modify every 1 delay 1
|
||||
|
||||
bond_style fene
|
||||
bond_coeff 1 30.0 1.5 1.0 1.0
|
||||
bond_coeff 1 30.0 1.5 1.0 1.0
|
||||
|
||||
pair_style lj/cut 1.12
|
||||
pair_modify shift yes
|
||||
pair_coeff 1 1 1.0 1.0 1.12
|
||||
pair_style lj/cut 1.12
|
||||
pair_modify shift yes
|
||||
pair_coeff 1 1 1.0 1.0 1.12
|
||||
|
||||
fix 1 all nve
|
||||
fix 2 all langevin 1.0 1.0 10.0 904297
|
||||
fix 1 all nve
|
||||
fix 2 all langevin 1.0 1.0 10.0 904297
|
||||
|
||||
thermo 100
|
||||
timestep 0.012
|
||||
timestep 0.012
|
||||
|
||||
run 100
|
||||
run 100
|
||||
|
||||
@ -1,33 +1,33 @@
|
||||
# LAMMPS benchmark of granular flow
|
||||
# chute flow of 32000 atoms with frozen base at 26 degrees
|
||||
|
||||
units lj
|
||||
atom_style sphere
|
||||
boundary p p fs
|
||||
newton off
|
||||
comm_modify vel yes
|
||||
units lj
|
||||
atom_style sphere
|
||||
boundary p p fs
|
||||
newton off
|
||||
comm_modify vel yes
|
||||
|
||||
read_data data.chute
|
||||
read_data data.chute
|
||||
|
||||
pair_style gran/hooke/history 200000.0 NULL 50.0 NULL 0.5 0
|
||||
pair_coeff * *
|
||||
pair_style gran/hooke/history 200000.0 NULL 50.0 NULL 0.5 0
|
||||
pair_coeff * *
|
||||
|
||||
neighbor 0.1 bin
|
||||
neigh_modify every 1 delay 0
|
||||
neighbor 0.1 bin
|
||||
neigh_modify every 1 delay 0
|
||||
|
||||
timestep 0.0001
|
||||
timestep 0.0001
|
||||
|
||||
group bottom type 2
|
||||
group active subtract all bottom
|
||||
neigh_modify exclude group bottom bottom
|
||||
group bottom type 2
|
||||
group active subtract all bottom
|
||||
neigh_modify exclude group bottom bottom
|
||||
|
||||
fix 1 all gravity 1.0 chute 26.0
|
||||
fix 2 bottom freeze
|
||||
fix 3 active nve/sphere
|
||||
fix 1 all gravity 1.0 chute 26.0
|
||||
fix 2 bottom freeze
|
||||
fix 3 active nve/sphere
|
||||
|
||||
compute 1 all erotate/sphere
|
||||
thermo_style custom step atoms ke c_1 vol
|
||||
thermo_modify norm no
|
||||
thermo 100
|
||||
compute 1 all erotate/sphere
|
||||
thermo_style custom step atoms ke c_1 vol
|
||||
thermo_modify norm no
|
||||
thermo 100
|
||||
|
||||
run 100
|
||||
run 100
|
||||
|
||||
@ -1,38 +1,38 @@
|
||||
# LAMMPS benchmark of granular flow
|
||||
# chute flow of 32000 atoms with frozen base at 26 degrees
|
||||
|
||||
variable x index 1
|
||||
variable y index 1
|
||||
variable x index 1
|
||||
variable y index 1
|
||||
|
||||
units lj
|
||||
atom_style sphere
|
||||
boundary p p fs
|
||||
newton off
|
||||
comm_modify vel yes
|
||||
units lj
|
||||
atom_style sphere
|
||||
boundary p p fs
|
||||
newton off
|
||||
comm_modify vel yes
|
||||
|
||||
read_data data.chute
|
||||
read_data data.chute
|
||||
|
||||
replicate $x $y 1
|
||||
replicate $x $y 1
|
||||
|
||||
pair_style gran/hooke/history 200000.0 NULL 50.0 NULL 0.5 0
|
||||
pair_coeff * *
|
||||
pair_style gran/hooke/history 200000.0 NULL 50.0 NULL 0.5 0
|
||||
pair_coeff * *
|
||||
|
||||
neighbor 0.1 bin
|
||||
neigh_modify every 1 delay 0
|
||||
neighbor 0.1 bin
|
||||
neigh_modify every 1 delay 0
|
||||
|
||||
timestep 0.0001
|
||||
timestep 0.0001
|
||||
|
||||
group bottom type 2
|
||||
group active subtract all bottom
|
||||
neigh_modify exclude group bottom bottom
|
||||
group bottom type 2
|
||||
group active subtract all bottom
|
||||
neigh_modify exclude group bottom bottom
|
||||
|
||||
fix 1 all gravity 1.0 chute 26.0
|
||||
fix 2 bottom freeze
|
||||
fix 3 active nve/sphere
|
||||
fix 1 all gravity 1.0 chute 26.0
|
||||
fix 2 bottom freeze
|
||||
fix 3 active nve/sphere
|
||||
|
||||
compute 1 all erotate/sphere
|
||||
thermo_style custom step atoms ke c_1 vol
|
||||
thermo_modify norm no
|
||||
thermo 100
|
||||
compute 1 all erotate/sphere
|
||||
thermo_style custom step atoms ke c_1 vol
|
||||
thermo_modify norm no
|
||||
thermo 100
|
||||
|
||||
run 100
|
||||
run 100
|
||||
|
||||
40
bench/in.eam
40
bench/in.eam
@ -1,32 +1,32 @@
|
||||
# bulk Cu lattice
|
||||
|
||||
variable x index 1
|
||||
variable y index 1
|
||||
variable z index 1
|
||||
variable x index 1
|
||||
variable y index 1
|
||||
variable z index 1
|
||||
|
||||
variable xx equal 20*$x
|
||||
variable yy equal 20*$y
|
||||
variable zz equal 20*$z
|
||||
variable xx equal 20*$x
|
||||
variable yy equal 20*$y
|
||||
variable zz equal 20*$z
|
||||
|
||||
units metal
|
||||
atom_style atomic
|
||||
units metal
|
||||
atom_style atomic
|
||||
|
||||
lattice fcc 3.615
|
||||
region box block 0 ${xx} 0 ${yy} 0 ${zz}
|
||||
create_box 1 box
|
||||
create_atoms 1 box
|
||||
lattice fcc 3.615
|
||||
region box block 0 ${xx} 0 ${yy} 0 ${zz}
|
||||
create_box 1 box
|
||||
create_atoms 1 box
|
||||
|
||||
pair_style eam
|
||||
pair_coeff 1 1 Cu_u3.eam
|
||||
pair_style eam
|
||||
pair_coeff 1 1 Cu_u3.eam
|
||||
|
||||
velocity all create 1600.0 376847 loop geom
|
||||
velocity all create 1600.0 376847 loop geom
|
||||
|
||||
neighbor 1.0 bin
|
||||
neighbor 1.0 bin
|
||||
neigh_modify every 1 delay 5 check yes
|
||||
|
||||
fix 1 all nve
|
||||
fix 1 all nve
|
||||
|
||||
timestep 0.005
|
||||
thermo 50
|
||||
timestep 0.005
|
||||
thermo 50
|
||||
|
||||
run 100
|
||||
run 100
|
||||
|
||||
40
bench/in.lj
40
bench/in.lj
@ -1,30 +1,30 @@
|
||||
# 3d Lennard-Jones melt
|
||||
|
||||
variable x index 1
|
||||
variable y index 1
|
||||
variable z index 1
|
||||
variable x index 1
|
||||
variable y index 1
|
||||
variable z index 1
|
||||
|
||||
variable xx equal 20*$x
|
||||
variable yy equal 20*$y
|
||||
variable zz equal 20*$z
|
||||
variable xx equal 20*$x
|
||||
variable yy equal 20*$y
|
||||
variable zz equal 20*$z
|
||||
|
||||
units lj
|
||||
atom_style atomic
|
||||
units lj
|
||||
atom_style atomic
|
||||
|
||||
lattice fcc 0.8442
|
||||
region box block 0 ${xx} 0 ${yy} 0 ${zz}
|
||||
create_box 1 box
|
||||
create_atoms 1 box
|
||||
mass 1 1.0
|
||||
lattice fcc 0.8442
|
||||
region box block 0 ${xx} 0 ${yy} 0 ${zz}
|
||||
create_box 1 box
|
||||
create_atoms 1 box
|
||||
mass 1 1.0
|
||||
|
||||
velocity all create 1.44 87287 loop geom
|
||||
velocity all create 1.44 87287 loop geom
|
||||
|
||||
pair_style lj/cut 2.5
|
||||
pair_coeff 1 1 1.0 1.0 2.5
|
||||
pair_style lj/cut 2.5
|
||||
pair_coeff 1 1 1.0 1.0 2.5
|
||||
|
||||
neighbor 0.3 bin
|
||||
neigh_modify delay 0 every 20 check no
|
||||
neighbor 0.3 bin
|
||||
neigh_modify delay 0 every 20 check no
|
||||
|
||||
fix 1 all nve
|
||||
fix 1 all nve
|
||||
|
||||
run 100
|
||||
run 100
|
||||
|
||||
@ -1,27 +1,27 @@
|
||||
# Rhodopsin model
|
||||
|
||||
units real
|
||||
neigh_modify delay 5 every 1
|
||||
units real
|
||||
neigh_modify delay 5 every 1
|
||||
|
||||
atom_style full
|
||||
bond_style harmonic
|
||||
angle_style charmm
|
||||
dihedral_style charmm
|
||||
improper_style harmonic
|
||||
pair_style lj/charmm/coul/long 8.0 10.0
|
||||
pair_modify mix arithmetic
|
||||
kspace_style pppm 1e-4
|
||||
atom_style full
|
||||
bond_style harmonic
|
||||
angle_style charmm
|
||||
dihedral_style charmm
|
||||
improper_style harmonic
|
||||
pair_style lj/charmm/coul/long 8.0 10.0
|
||||
pair_modify mix arithmetic
|
||||
kspace_style pppm 1e-4
|
||||
|
||||
read_data data.rhodo
|
||||
|
||||
fix 1 all shake 0.0001 5 0 m 1.0 a 232
|
||||
fix 2 all npt temp 300.0 300.0 100.0 &
|
||||
z 0.0 0.0 1000.0 mtk no pchain 0 tchain 1
|
||||
z 0.0 0.0 1000.0 mtk no pchain 0 tchain 1
|
||||
|
||||
special_bonds charmm
|
||||
|
||||
|
||||
thermo 50
|
||||
thermo_style multi
|
||||
thermo_style multi
|
||||
timestep 2.0
|
||||
|
||||
run 100
|
||||
run 100
|
||||
|
||||
@ -1,34 +1,34 @@
|
||||
# Rhodopsin model
|
||||
|
||||
variable x index 1
|
||||
variable y index 1
|
||||
variable z index 1
|
||||
variable x index 1
|
||||
variable y index 1
|
||||
variable z index 1
|
||||
|
||||
units real
|
||||
neigh_modify delay 5 every 1
|
||||
units real
|
||||
neigh_modify delay 5 every 1
|
||||
|
||||
atom_style full
|
||||
atom_modify map hash
|
||||
bond_style harmonic
|
||||
angle_style charmm
|
||||
dihedral_style charmm
|
||||
improper_style harmonic
|
||||
pair_style lj/charmm/coul/long 8.0 10.0
|
||||
pair_modify mix arithmetic
|
||||
kspace_style pppm 1e-4
|
||||
atom_style full
|
||||
atom_modify map hash
|
||||
bond_style harmonic
|
||||
angle_style charmm
|
||||
dihedral_style charmm
|
||||
improper_style harmonic
|
||||
pair_style lj/charmm/coul/long 8.0 10.0
|
||||
pair_modify mix arithmetic
|
||||
kspace_style pppm 1e-4
|
||||
|
||||
read_data data.rhodo
|
||||
|
||||
replicate $x $y $z
|
||||
replicate $x $y $z
|
||||
|
||||
fix 1 all shake 0.0001 5 0 m 1.0 a 232
|
||||
fix 2 all npt temp 300.0 300.0 100.0 &
|
||||
z 0.0 0.0 1000.0 mtk no pchain 0 tchain 1
|
||||
z 0.0 0.0 1000.0 mtk no pchain 0 tchain 1
|
||||
|
||||
special_bonds charmm
|
||||
|
||||
|
||||
thermo 50
|
||||
thermo_style multi
|
||||
thermo_style multi
|
||||
timestep 2.0
|
||||
|
||||
run 100
|
||||
run 100
|
||||
|
||||
@ -1,615 +0,0 @@
|
||||
cmake_minimum_required(VERSION 3.10)
|
||||
# When using CMake 3.4 and later, don't export symbols from executables unless
|
||||
# the CMAKE_ENABLE_EXPORTS variable is set.
|
||||
if(POLICY CMP0065)
|
||||
cmake_policy(SET CMP0065 NEW)
|
||||
endif()
|
||||
if (POLICY CMP0077)
|
||||
cmake_policy(SET CMP0077 NEW)
|
||||
endif()
|
||||
if(CMAKE_EXECUTABLE_SUFFIX)
|
||||
set(CMAKE_EXECUTABLE_SUFFIX_TMP ${CMAKE_EXECUTABLE_SUFFIX})
|
||||
endif()
|
||||
|
||||
project(libjpeg-turbo C)
|
||||
set(VERSION 2.1.3)
|
||||
set(COPYRIGHT_YEAR "1991-2022")
|
||||
string(REPLACE "." ";" VERSION_TRIPLET ${VERSION})
|
||||
list(GET VERSION_TRIPLET 0 VERSION_MAJOR)
|
||||
list(GET VERSION_TRIPLET 1 VERSION_MINOR)
|
||||
list(GET VERSION_TRIPLET 2 VERSION_REVISION)
|
||||
function(pad_number NUMBER OUTPUT_LEN)
|
||||
string(LENGTH "${${NUMBER}}" INPUT_LEN)
|
||||
if(INPUT_LEN LESS OUTPUT_LEN)
|
||||
math(EXPR ZEROES "${OUTPUT_LEN} - ${INPUT_LEN} - 1")
|
||||
set(NUM ${${NUMBER}})
|
||||
foreach(C RANGE ${ZEROES})
|
||||
set(NUM "0${NUM}")
|
||||
endforeach()
|
||||
set(${NUMBER} ${NUM} PARENT_SCOPE)
|
||||
endif()
|
||||
endfunction()
|
||||
pad_number(VERSION_MINOR 3)
|
||||
pad_number(VERSION_REVISION 3)
|
||||
set(LIBJPEG_TURBO_VERSION_NUMBER ${VERSION_MAJOR}${VERSION_MINOR}${VERSION_REVISION})
|
||||
|
||||
# CMake 3.14 and later sets CMAKE_MACOSX_BUNDLE to TRUE by default when
|
||||
# CMAKE_SYSTEM_NAME is iOS, tvOS, or watchOS, which breaks the libjpeg-turbo
|
||||
# build. (Specifically, when CMAKE_MACOSX_BUNDLE is TRUE, executables for
|
||||
# Apple platforms are built as application bundles, which causes CMake to
|
||||
# complain that our install() directives for executables do not specify a
|
||||
# BUNDLE DESTINATION. Even if CMake did not complain, building executables as
|
||||
# application bundles would break our iOS packages.)
|
||||
set(CMAKE_MACOSX_BUNDLE FALSE)
|
||||
|
||||
string(TIMESTAMP DEFAULT_BUILD "%Y%m%d")
|
||||
set(BUILD ${DEFAULT_BUILD} CACHE STRING "Build string (default: ${DEFAULT_BUILD})")
|
||||
|
||||
# NOTE: On Windows, this does nothing except when using MinGW or Cygwin.
|
||||
# CMAKE_BUILD_TYPE has no meaning in Visual Studio, and it always defaults to
|
||||
# Debug when using NMake.
|
||||
if(NOT CMAKE_BUILD_TYPE)
|
||||
set(CMAKE_BUILD_TYPE Release)
|
||||
endif()
|
||||
message(STATUS "CMAKE_BUILD_TYPE = ${CMAKE_BUILD_TYPE}")
|
||||
|
||||
message(STATUS "VERSION = ${VERSION}, BUILD = ${BUILD}")
|
||||
|
||||
include(cmakescripts/PackageInfo.cmake)
|
||||
|
||||
# Detect CPU type and whether we're building 64-bit or 32-bit code
|
||||
math(EXPR BITS "${CMAKE_SIZEOF_VOID_P} * 8")
|
||||
string(TOLOWER ${CMAKE_SYSTEM_PROCESSOR} CMAKE_SYSTEM_PROCESSOR_LC)
|
||||
set(COUNT 1)
|
||||
foreach(ARCH ${CMAKE_OSX_ARCHITECTURES})
|
||||
if(COUNT GREATER 1)
|
||||
message(FATAL_ERROR "The libjpeg-turbo build system does not support multiple values in CMAKE_OSX_ARCHITECTURES.")
|
||||
endif()
|
||||
math(EXPR COUNT "${COUNT}+1")
|
||||
endforeach()
|
||||
if(CMAKE_SYSTEM_PROCESSOR_LC MATCHES "x86_64" OR
|
||||
CMAKE_SYSTEM_PROCESSOR_LC MATCHES "amd64" OR
|
||||
CMAKE_SYSTEM_PROCESSOR_LC MATCHES "i[0-9]86" OR
|
||||
CMAKE_SYSTEM_PROCESSOR_LC MATCHES "x86" OR
|
||||
CMAKE_SYSTEM_PROCESSOR_LC MATCHES "ia32")
|
||||
if(BITS EQUAL 64 OR CMAKE_C_COMPILER_ABI MATCHES "ELF X32")
|
||||
set(CPU_TYPE x86_64)
|
||||
else()
|
||||
set(CPU_TYPE i386)
|
||||
endif()
|
||||
if(NOT CMAKE_SYSTEM_PROCESSOR STREQUAL ${CPU_TYPE})
|
||||
set(CMAKE_SYSTEM_PROCESSOR ${CPU_TYPE})
|
||||
endif()
|
||||
elseif(CMAKE_SYSTEM_PROCESSOR_LC STREQUAL "aarch64" OR
|
||||
CMAKE_SYSTEM_PROCESSOR_LC MATCHES "^arm")
|
||||
if(BITS EQUAL 64)
|
||||
set(CPU_TYPE arm64)
|
||||
else()
|
||||
set(CPU_TYPE arm)
|
||||
endif()
|
||||
elseif(CMAKE_SYSTEM_PROCESSOR_LC MATCHES "^ppc" OR
|
||||
CMAKE_SYSTEM_PROCESSOR_LC MATCHES "^powerpc")
|
||||
set(CPU_TYPE powerpc)
|
||||
else()
|
||||
set(CPU_TYPE ${CMAKE_SYSTEM_PROCESSOR_LC})
|
||||
endif()
|
||||
if(CMAKE_OSX_ARCHITECTURES MATCHES "x86_64" OR
|
||||
CMAKE_OSX_ARCHITECTURES MATCHES "arm64" OR
|
||||
CMAKE_OSX_ARCHITECTURES MATCHES "i386")
|
||||
set(CPU_TYPE ${CMAKE_OSX_ARCHITECTURES})
|
||||
endif()
|
||||
if(CMAKE_OSX_ARCHITECTURES MATCHES "ppc")
|
||||
set(CPU_TYPE powerpc)
|
||||
endif()
|
||||
if(MSVC_IDE AND CMAKE_GENERATOR_PLATFORM MATCHES "arm64")
|
||||
set(CPU_TYPE arm64)
|
||||
endif()
|
||||
|
||||
message(STATUS "${BITS}-bit build (${CPU_TYPE})")
|
||||
|
||||
macro(report_directory var)
|
||||
if(CMAKE_INSTALL_${var} STREQUAL CMAKE_INSTALL_FULL_${var})
|
||||
message(STATUS "CMAKE_INSTALL_${var} = ${CMAKE_INSTALL_${var}}")
|
||||
else()
|
||||
message(STATUS "CMAKE_INSTALL_${var} = ${CMAKE_INSTALL_${var}} (${CMAKE_INSTALL_FULL_${var}})")
|
||||
endif()
|
||||
mark_as_advanced(CLEAR CMAKE_INSTALL_${var})
|
||||
endmacro()
|
||||
|
||||
set(DIRLIST "BINDIR;DATAROOTDIR;DOCDIR;INCLUDEDIR;LIBDIR")
|
||||
if(UNIX)
|
||||
list(APPEND DIRLIST "MANDIR")
|
||||
endif()
|
||||
foreach(dir ${DIRLIST})
|
||||
report_directory(${dir})
|
||||
endforeach()
|
||||
|
||||
|
||||
###############################################################################
|
||||
# CONFIGURATION OPTIONS
|
||||
###############################################################################
|
||||
|
||||
macro(boolean_number var)
|
||||
if(${var})
|
||||
set(${var} 1 ${ARGN})
|
||||
else()
|
||||
set(${var} 0 ${ARGN})
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
option(ENABLE_SHARED "Build shared libraries" FALSE)
|
||||
boolean_number(ENABLE_SHARED)
|
||||
option(ENABLE_STATIC "Build static libraries" TRUE)
|
||||
boolean_number(ENABLE_STATIC)
|
||||
option(REQUIRE_SIMD "Generate a fatal error if SIMD extensions are not available for this platform (default is to fall back to a non-SIMD build)" FALSE)
|
||||
boolean_number(REQUIRE_SIMD)
|
||||
option(WITH_12BIT "Encode/decode JPEG images with 12-bit samples (implies WITH_ARITH_DEC=0 WITH_ARITH_ENC=0 WITH_JAVA=0 WITH_SIMD=0 WITH_TURBOJPEG=0 )" FALSE)
|
||||
boolean_number(WITH_12BIT)
|
||||
option(WITH_ARITH_DEC "Include arithmetic decoding support when emulating the libjpeg v6b API/ABI" TRUE)
|
||||
boolean_number(WITH_ARITH_DEC)
|
||||
option(WITH_ARITH_ENC "Include arithmetic encoding support when emulating the libjpeg v6b API/ABI" TRUE)
|
||||
boolean_number(WITH_ARITH_ENC)
|
||||
if(CMAKE_C_COMPILER_ABI MATCHES "ELF X32")
|
||||
set(WITH_JAVA 0)
|
||||
else()
|
||||
option(WITH_JAVA "Build Java wrapper for the TurboJPEG API library (implies ENABLE_SHARED=1)" FALSE)
|
||||
boolean_number(WITH_JAVA)
|
||||
endif()
|
||||
option(WITH_JPEG7 "Emulate libjpeg v7 API/ABI (this makes ${CMAKE_PROJECT_NAME} backward-incompatible with libjpeg v6b)" FALSE)
|
||||
boolean_number(WITH_JPEG7)
|
||||
option(WITH_JPEG8 "Emulate libjpeg v8 API/ABI (this makes ${CMAKE_PROJECT_NAME} backward-incompatible with libjpeg v6b)" FALSE)
|
||||
boolean_number(WITH_JPEG8)
|
||||
option(WITH_MEM_SRCDST "Include in-memory source/destination manager functions when emulating the libjpeg v6b or v7 API/ABI" TRUE)
|
||||
boolean_number(WITH_MEM_SRCDST)
|
||||
option(WITH_SIMD "Include SIMD extensions, if available for this platform" FALSE)
|
||||
boolean_number(WITH_SIMD)
|
||||
option(WITH_TURBOJPEG "Include the TurboJPEG API library and associated test programs" FALSE)
|
||||
boolean_number(WITH_TURBOJPEG)
|
||||
option(WITH_FUZZ "Build fuzz targets" FALSE)
|
||||
|
||||
macro(report_option var desc)
|
||||
if(${var})
|
||||
message(STATUS "${desc} enabled (${var} = ${${var}})")
|
||||
else()
|
||||
message(STATUS "${desc} disabled (${var} = ${${var}})")
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
if(WITH_JAVA)
|
||||
set(ENABLE_SHARED 1)
|
||||
endif()
|
||||
|
||||
# Explicitly setting CMAKE_POSITION_INDEPENDENT_CODE=FALSE disables PIC for all
|
||||
# targets, which will cause the shared library builds to fail. Thus, if shared
|
||||
# libraries are enabled and CMAKE_POSITION_INDEPENDENT_CODE is explicitly set
|
||||
# to FALSE, we need to unset it, thus restoring the default behavior
|
||||
# (automatically using PIC for shared library targets.)
|
||||
if(DEFINED CMAKE_POSITION_INDEPENDENT_CODE AND
|
||||
NOT CMAKE_POSITION_INDEPENDENT_CODE AND ENABLE_SHARED)
|
||||
unset(CMAKE_POSITION_INDEPENDENT_CODE CACHE)
|
||||
endif()
|
||||
|
||||
report_option(ENABLE_SHARED "Shared libraries")
|
||||
report_option(ENABLE_STATIC "Static libraries")
|
||||
|
||||
if(ENABLE_SHARED)
|
||||
set(CMAKE_INSTALL_RPATH ${CMAKE_INSTALL_FULL_LIBDIR})
|
||||
endif()
|
||||
|
||||
if(WITH_JPEG8 OR WITH_JPEG7)
|
||||
set(WITH_ARITH_ENC 1)
|
||||
set(WITH_ARITH_DEC 1)
|
||||
endif()
|
||||
if(WITH_JPEG8)
|
||||
set(WITH_MEM_SRCDST 0)
|
||||
endif()
|
||||
|
||||
if(WITH_12BIT)
|
||||
set(WITH_ARITH_DEC 0)
|
||||
set(WITH_ARITH_ENC 0)
|
||||
set(WITH_JAVA 0)
|
||||
set(WITH_SIMD 0)
|
||||
set(WITH_TURBOJPEG 0)
|
||||
set(BITS_IN_JSAMPLE 12)
|
||||
else()
|
||||
set(BITS_IN_JSAMPLE 8)
|
||||
endif()
|
||||
report_option(WITH_12BIT "12-bit JPEG support")
|
||||
|
||||
if(WITH_ARITH_DEC)
|
||||
set(D_ARITH_CODING_SUPPORTED 1)
|
||||
endif()
|
||||
if(NOT WITH_12BIT)
|
||||
report_option(WITH_ARITH_DEC "Arithmetic decoding support")
|
||||
endif()
|
||||
|
||||
if(WITH_ARITH_ENC)
|
||||
set(C_ARITH_CODING_SUPPORTED 1)
|
||||
endif()
|
||||
if(NOT WITH_12BIT)
|
||||
report_option(WITH_ARITH_ENC "Arithmetic encoding support")
|
||||
endif()
|
||||
|
||||
if(NOT WITH_12BIT)
|
||||
report_option(WITH_TURBOJPEG "TurboJPEG API library")
|
||||
report_option(WITH_JAVA "TurboJPEG Java wrapper")
|
||||
endif()
|
||||
|
||||
if(WITH_MEM_SRCDST)
|
||||
set(MEM_SRCDST_SUPPORTED 1)
|
||||
set(MEM_SRCDST_FUNCTIONS "global: jpeg_mem_dest; jpeg_mem_src;")
|
||||
endif()
|
||||
if(NOT WITH_JPEG8)
|
||||
report_option(WITH_MEM_SRCDST "In-memory source/destination managers")
|
||||
endif()
|
||||
|
||||
set(SO_AGE 2)
|
||||
if(WITH_MEM_SRCDST)
|
||||
set(SO_AGE 3)
|
||||
endif()
|
||||
|
||||
if(WITH_JPEG8)
|
||||
set(JPEG_LIB_VERSION 80)
|
||||
elseif(WITH_JPEG7)
|
||||
set(JPEG_LIB_VERSION 70)
|
||||
else()
|
||||
set(JPEG_LIB_VERSION 62)
|
||||
endif()
|
||||
|
||||
math(EXPR JPEG_LIB_VERSION_DIV10 "${JPEG_LIB_VERSION} / 10")
|
||||
math(EXPR JPEG_LIB_VERSION_MOD10 "${JPEG_LIB_VERSION} % 10")
|
||||
if(JPEG_LIB_VERSION STREQUAL "62")
|
||||
set(DEFAULT_SO_MAJOR_VERSION ${JPEG_LIB_VERSION})
|
||||
else()
|
||||
set(DEFAULT_SO_MAJOR_VERSION ${JPEG_LIB_VERSION_DIV10})
|
||||
endif()
|
||||
if(JPEG_LIB_VERSION STREQUAL "80")
|
||||
set(DEFAULT_SO_MINOR_VERSION 2)
|
||||
else()
|
||||
set(DEFAULT_SO_MINOR_VERSION 0)
|
||||
endif()
|
||||
|
||||
# This causes SO_MAJOR_VERSION/SO_MINOR_VERSION to reset to defaults if
|
||||
# WITH_JPEG7 or WITH_JPEG8 has changed.
|
||||
if((DEFINED WITH_JPEG7_INT AND NOT WITH_JPEG7 EQUAL WITH_JPEG7_INT) OR
|
||||
(DEFINED WITH_JPEG8_INT AND NOT WITH_JPEG8 EQUAL WITH_JPEG8_INT))
|
||||
set(FORCE_SO_VERSION "FORCE")
|
||||
endif()
|
||||
set(WITH_JPEG7_INT ${WITH_JPEG7} CACHE INTERNAL "")
|
||||
set(WITH_JPEG8_INT ${WITH_JPEG8} CACHE INTERNAL "")
|
||||
|
||||
set(SO_MAJOR_VERSION ${DEFAULT_SO_MAJOR_VERSION} CACHE STRING
|
||||
"Major version of the libjpeg API shared library (default: ${DEFAULT_SO_MAJOR_VERSION})"
|
||||
${FORCE_SO_VERSION})
|
||||
set(SO_MINOR_VERSION ${DEFAULT_SO_MINOR_VERSION} CACHE STRING
|
||||
"Minor version of the libjpeg API shared library (default: ${DEFAULT_SO_MINOR_VERSION})"
|
||||
${FORCE_SO_VERSION})
|
||||
|
||||
set(JPEG_LIB_VERSION_DECIMAL "${JPEG_LIB_VERSION_DIV10}.${JPEG_LIB_VERSION_MOD10}")
|
||||
message(STATUS "Emulating libjpeg API/ABI v${JPEG_LIB_VERSION_DECIMAL} (WITH_JPEG7 = ${WITH_JPEG7}, WITH_JPEG8 = ${WITH_JPEG8})")
|
||||
message(STATUS "libjpeg API shared library version = ${SO_MAJOR_VERSION}.${SO_AGE}.${SO_MINOR_VERSION}")
|
||||
|
||||
# Because the TurboJPEG API library uses versioned symbols and changes the
|
||||
# names of functions whenever they are modified in a backward-incompatible
|
||||
# manner, it is always backward-ABI-compatible with itself, so the major and
|
||||
# minor SO versions don't change. However, we increase the middle number (the
|
||||
# SO "age") whenever functions are added to the API.
|
||||
set(TURBOJPEG_SO_MAJOR_VERSION 0)
|
||||
set(TURBOJPEG_SO_AGE 2)
|
||||
set(TURBOJPEG_SO_VERSION 0.${TURBOJPEG_SO_AGE}.0)
|
||||
|
||||
|
||||
###############################################################################
|
||||
# COMPILER SETTINGS
|
||||
###############################################################################
|
||||
|
||||
if(MSVC)
|
||||
option(WITH_CRT_DLL
|
||||
"Link all ${CMAKE_PROJECT_NAME} libraries and executables with the C run-time DLL (msvcr*.dll) instead of the static C run-time library (libcmt*.lib.) The default is to use the C run-time DLL only with the libraries and executables that need it."
|
||||
FALSE)
|
||||
if(NOT WITH_CRT_DLL)
|
||||
# Use the static C library for all build types
|
||||
foreach(var CMAKE_C_FLAGS CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE
|
||||
CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELWITHDEBINFO)
|
||||
if(${var} MATCHES "/MD")
|
||||
string(REGEX REPLACE "/MD" "/MT" ${var} "${${var}}")
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
add_definitions(-D_CRT_NONSTDC_NO_WARNINGS)
|
||||
endif()
|
||||
|
||||
if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID STREQUAL "Clang")
|
||||
# Use the maximum optimization level for release builds
|
||||
foreach(var CMAKE_C_FLAGS_RELEASE CMAKE_C_FLAGS_RELWITHDEBINFO)
|
||||
if(${var} MATCHES "-O2")
|
||||
string(REGEX REPLACE "-O2" "-O3" ${var} "${${var}}")
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "SunOS")
|
||||
if(CMAKE_C_COMPILER_ID MATCHES "SunPro")
|
||||
# Use the maximum optimization level for release builds
|
||||
foreach(var CMAKE_C_FLAGS_RELEASE CMAKE_C_FLAGS_RELWITHDEBINFO)
|
||||
if(${var} MATCHES "-xO3")
|
||||
string(REGEX REPLACE "-xO3" "-xO5" ${var} "${${var}}")
|
||||
endif()
|
||||
if(${var} MATCHES "-xO2")
|
||||
string(REGEX REPLACE "-xO2" "-xO5" ${var} "${${var}}")
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
string(TOUPPER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE_UC)
|
||||
|
||||
set(EFFECTIVE_C_FLAGS "${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_${CMAKE_BUILD_TYPE_UC}}")
|
||||
message(STATUS "Compiler flags = ${EFFECTIVE_C_FLAGS}")
|
||||
|
||||
set(EFFECTIVE_LD_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${CMAKE_EXE_LINKER_FLAGS_${CMAKE_BUILD_TYPE_UC}}")
|
||||
message(STATUS "Linker flags = ${EFFECTIVE_LD_FLAGS}")
|
||||
|
||||
include(CheckCSourceCompiles)
|
||||
include(CheckIncludeFiles)
|
||||
include(CheckTypeSize)
|
||||
|
||||
check_type_size("size_t" SIZE_T)
|
||||
check_type_size("unsigned long" UNSIGNED_LONG)
|
||||
|
||||
if(SIZE_T EQUAL UNSIGNED_LONG)
|
||||
check_c_source_compiles("int main(int argc, char **argv) { unsigned long a = argc; return __builtin_ctzl(a); }"
|
||||
HAVE_BUILTIN_CTZL)
|
||||
endif()
|
||||
if(MSVC)
|
||||
check_include_files("intrin.h" HAVE_INTRIN_H)
|
||||
endif()
|
||||
|
||||
if(UNIX)
|
||||
if(CMAKE_CROSSCOMPILING)
|
||||
set(RIGHT_SHIFT_IS_UNSIGNED 0)
|
||||
else()
|
||||
include(CheckCSourceRuns)
|
||||
check_c_source_runs("
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
int is_shifting_signed (long arg) {
|
||||
long res = arg >> 4;
|
||||
if (res == -0x7F7E80CL)
|
||||
return 1; /* right shift is signed */
|
||||
/* see if unsigned-shift hack will fix it. */
|
||||
/* we can't just test exact value since it depends on width of long... */
|
||||
res |= (~0L) << (32-4);
|
||||
if (res == -0x7F7E80CL)
|
||||
return 0; /* right shift is unsigned */
|
||||
printf(\"Right shift isn't acting as I expect it to.\\\\n\");
|
||||
printf(\"I fear the JPEG software will not work at all.\\\\n\\\\n\");
|
||||
return 0; /* try it with unsigned anyway */
|
||||
}
|
||||
int main (void) {
|
||||
exit(is_shifting_signed(-0x7F7E80B1L));
|
||||
}" RIGHT_SHIFT_IS_UNSIGNED)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(MSVC)
|
||||
set(INLINE_OPTIONS "__inline;inline")
|
||||
else()
|
||||
set(INLINE_OPTIONS "__inline__;inline")
|
||||
endif()
|
||||
option(FORCE_INLINE "Force function inlining" TRUE)
|
||||
boolean_number(FORCE_INLINE)
|
||||
if(FORCE_INLINE)
|
||||
if(MSVC)
|
||||
list(INSERT INLINE_OPTIONS 0 "__forceinline")
|
||||
else()
|
||||
list(INSERT INLINE_OPTIONS 0 "inline __attribute__((always_inline))")
|
||||
list(INSERT INLINE_OPTIONS 0 "__inline__ __attribute__((always_inline))")
|
||||
endif()
|
||||
endif()
|
||||
foreach(inline ${INLINE_OPTIONS})
|
||||
check_c_source_compiles("${inline} static int foo(void) { return 0; } int main(void) { return foo(); }"
|
||||
INLINE_WORKS)
|
||||
if(INLINE_WORKS)
|
||||
set(INLINE ${inline})
|
||||
break()
|
||||
endif()
|
||||
endforeach()
|
||||
if(NOT INLINE_WORKS)
|
||||
message(FATAL_ERROR "Could not determine how to inline functions.")
|
||||
endif()
|
||||
message(STATUS "INLINE = ${INLINE} (FORCE_INLINE = ${FORCE_INLINE})")
|
||||
|
||||
if(WITH_TURBOJPEG)
|
||||
if(MSVC)
|
||||
set(THREAD_LOCAL "__declspec(thread)")
|
||||
else()
|
||||
set(THREAD_LOCAL "__thread")
|
||||
endif()
|
||||
check_c_source_compiles("${THREAD_LOCAL} int i; int main(void) { i = 0; return i; }" HAVE_THREAD_LOCAL)
|
||||
if(HAVE_THREAD_LOCAL)
|
||||
message(STATUS "THREAD_LOCAL = ${THREAD_LOCAL}")
|
||||
else()
|
||||
message(WARNING "Thread-local storage is not available. The TurboJPEG API library's global error handler will not be thread-safe.")
|
||||
unset(THREAD_LOCAL)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(UNIX AND NOT APPLE)
|
||||
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/conftest.map "VERS_1 { global: *; };")
|
||||
set(CMAKE_REQUIRED_FLAGS
|
||||
"-Wl,--version-script,${CMAKE_CURRENT_BINARY_DIR}/conftest.map")
|
||||
check_c_source_compiles("int main(void) { return 0; }" HAVE_VERSION_SCRIPT)
|
||||
set(CMAKE_REQUIRED_FLAGS)
|
||||
file(REMOVE ${CMAKE_CURRENT_BINARY_DIR}/conftest.map)
|
||||
if(HAVE_VERSION_SCRIPT)
|
||||
message(STATUS "Linker supports GNU-style version scripts")
|
||||
set(MAPFLAG "-Wl,--version-script,")
|
||||
set(TJMAPFLAG "-Wl,--version-script,")
|
||||
else()
|
||||
message(STATUS "Linker does not support GNU-style version scripts")
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "SunOS")
|
||||
# The Solaris linker doesn't like our version script for the libjpeg API
|
||||
# library, but the version script for the TurboJPEG API library should
|
||||
# still work.
|
||||
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/conftest.map
|
||||
"VERS_1 { global: foo; local: *; }; VERS_2 { global: foo2; } VERS_1;")
|
||||
set(CMAKE_REQUIRED_FLAGS "-Wl,-M,${CMAKE_CURRENT_BINARY_DIR}/conftest.map -shared")
|
||||
check_c_source_compiles("int foo() { return 0; } int foo2() { return 2; }"
|
||||
HAVE_MAPFILE)
|
||||
set(CMAKE_REQUIRED_FLAGS)
|
||||
file(REMOVE ${CMAKE_CURRENT_BINARY_DIR}/conftest.map)
|
||||
if(HAVE_MAPFILE)
|
||||
message(STATUS "Linker supports mapfiles")
|
||||
set(TJMAPFLAG "-Wl,-M,")
|
||||
else()
|
||||
message(STATUS "Linker does not support mapfiles")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Generate files
|
||||
if(WIN32)
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/win/jconfig.h.in jconfig.h)
|
||||
else()
|
||||
configure_file(jconfig.h.in jconfig.h)
|
||||
endif()
|
||||
configure_file(jconfigint.h.in jconfigint.h)
|
||||
configure_file(jversion.h.in jversion.h)
|
||||
if(UNIX)
|
||||
configure_file(libjpeg.map.in libjpeg.map)
|
||||
endif()
|
||||
|
||||
# Include directories and compiler definitions
|
||||
include_directories(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
|
||||
###############################################################################
|
||||
# TARGETS
|
||||
###############################################################################
|
||||
|
||||
if(CMAKE_EXECUTABLE_SUFFIX_TMP)
|
||||
set(CMAKE_EXECUTABLE_SUFFIX ${CMAKE_EXECUTABLE_SUFFIX_TMP})
|
||||
endif()
|
||||
message(STATUS "CMAKE_EXECUTABLE_SUFFIX = ${CMAKE_EXECUTABLE_SUFFIX}")
|
||||
|
||||
set(JPEG_SOURCES jcapimin.c jcapistd.c jccoefct.c jccolor.c jcdctmgr.c jchuff.c
|
||||
jcicc.c jcinit.c jcmainct.c jcmarker.c jcmaster.c jcomapi.c jcparam.c
|
||||
jcphuff.c jcprepct.c jcsample.c jctrans.c jdapimin.c jdapistd.c jdatadst.c
|
||||
jdatasrc.c jdcoefct.c jdcolor.c jddctmgr.c jdhuff.c jdicc.c jdinput.c
|
||||
jdmainct.c jdmarker.c jdmaster.c jdmerge.c jdphuff.c jdpostct.c jdsample.c
|
||||
jdtrans.c jerror.c jfdctflt.c jfdctfst.c jfdctint.c jidctflt.c jidctfst.c
|
||||
jidctint.c jidctred.c jquant1.c jquant2.c jutils.c jmemmgr.c jmemnobs.c)
|
||||
|
||||
if(WITH_ARITH_ENC OR WITH_ARITH_DEC)
|
||||
set(JPEG_SOURCES ${JPEG_SOURCES} jaricom.c)
|
||||
endif()
|
||||
|
||||
if(WITH_ARITH_ENC)
|
||||
set(JPEG_SOURCES ${JPEG_SOURCES} jcarith.c)
|
||||
endif()
|
||||
|
||||
if(WITH_ARITH_DEC)
|
||||
set(JPEG_SOURCES ${JPEG_SOURCES} jdarith.c)
|
||||
endif()
|
||||
|
||||
if(WITH_SIMD)
|
||||
add_subdirectory(simd)
|
||||
if(NEON_INTRINSICS)
|
||||
add_definitions(-DNEON_INTRINSICS)
|
||||
endif()
|
||||
elseif(NOT WITH_12BIT)
|
||||
message(STATUS "SIMD extensions: None (WITH_SIMD = ${WITH_SIMD})")
|
||||
endif()
|
||||
if(WITH_SIMD)
|
||||
message(STATUS "SIMD extensions: ${CPU_TYPE} (WITH_SIMD = ${WITH_SIMD})")
|
||||
if(MSVC_IDE OR XCODE)
|
||||
set_source_files_properties(${SIMD_OBJS} PROPERTIES GENERATED 1)
|
||||
endif()
|
||||
else()
|
||||
add_library(simd OBJECT jsimd_none.c)
|
||||
if(NOT WIN32 AND (CMAKE_POSITION_INDEPENDENT_CODE OR ENABLE_SHARED))
|
||||
set_target_properties(simd PROPERTIES POSITION_INDEPENDENT_CODE 1)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_JAVA)
|
||||
add_subdirectory(java)
|
||||
endif()
|
||||
|
||||
if(ENABLE_SHARED)
|
||||
add_subdirectory(sharedlib)
|
||||
endif()
|
||||
|
||||
if(ENABLE_STATIC)
|
||||
add_library(jpeg-static STATIC ${JPEG_SOURCES} $<TARGET_OBJECTS:simd>
|
||||
${SIMD_OBJS})
|
||||
if(NOT MSVC)
|
||||
set_target_properties(jpeg-static PROPERTIES OUTPUT_NAME jpeg)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_TURBOJPEG)
|
||||
if(ENABLE_SHARED)
|
||||
set(TURBOJPEG_SOURCES ${JPEG_SOURCES} $<TARGET_OBJECTS:simd> ${SIMD_OBJS}
|
||||
turbojpeg.c transupp.c jdatadst-tj.c jdatasrc-tj.c rdbmp.c rdppm.c
|
||||
wrbmp.c wrppm.c)
|
||||
set(TJMAPFILE ${CMAKE_CURRENT_SOURCE_DIR}/turbojpeg-mapfile)
|
||||
if(WITH_JAVA)
|
||||
set(TURBOJPEG_SOURCES ${TURBOJPEG_SOURCES} turbojpeg-jni.c)
|
||||
include_directories(${JAVA_INCLUDE_PATH} ${JAVA_INCLUDE_PATH2})
|
||||
set(TJMAPFILE ${CMAKE_CURRENT_SOURCE_DIR}/turbojpeg-mapfile.jni)
|
||||
endif()
|
||||
if(MSVC)
|
||||
configure_file(${CMAKE_SOURCE_DIR}/win/turbojpeg.rc.in
|
||||
${CMAKE_BINARY_DIR}/win/turbojpeg.rc)
|
||||
set(TURBOJPEG_SOURCES ${TURBOJPEG_SOURCES}
|
||||
${CMAKE_BINARY_DIR}/win/turbojpeg.rc)
|
||||
endif()
|
||||
add_library(turbojpeg SHARED ${TURBOJPEG_SOURCES})
|
||||
set_property(TARGET turbojpeg PROPERTY COMPILE_FLAGS
|
||||
"-DBMP_SUPPORTED -DPPM_SUPPORTED")
|
||||
if(WIN32)
|
||||
set_target_properties(turbojpeg PROPERTIES DEFINE_SYMBOL DLLDEFINE)
|
||||
endif()
|
||||
if(MINGW)
|
||||
set_target_properties(turbojpeg PROPERTIES LINK_FLAGS -Wl,--kill-at)
|
||||
endif()
|
||||
if(APPLE AND (NOT CMAKE_OSX_DEPLOYMENT_TARGET OR
|
||||
CMAKE_OSX_DEPLOYMENT_TARGET VERSION_GREATER 10.4))
|
||||
if(NOT CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG)
|
||||
set(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-Wl,-rpath,")
|
||||
endif()
|
||||
set_target_properties(turbojpeg PROPERTIES MACOSX_RPATH 1)
|
||||
endif()
|
||||
set_target_properties(turbojpeg PROPERTIES
|
||||
SOVERSION ${TURBOJPEG_SO_MAJOR_VERSION} VERSION ${TURBOJPEG_SO_VERSION})
|
||||
if(TJMAPFLAG)
|
||||
set_target_properties(turbojpeg PROPERTIES
|
||||
LINK_FLAGS "${TJMAPFLAG}${TJMAPFILE}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(ENABLE_STATIC)
|
||||
add_library(turbojpeg-static STATIC ${JPEG_SOURCES} $<TARGET_OBJECTS:simd>
|
||||
${SIMD_OBJS} turbojpeg.c transupp.c jdatadst-tj.c jdatasrc-tj.c rdbmp.c
|
||||
rdppm.c wrbmp.c wrppm.c)
|
||||
set_property(TARGET turbojpeg-static PROPERTY COMPILE_FLAGS
|
||||
"-DBMP_SUPPORTED -DPPM_SUPPORTED")
|
||||
if(NOT MSVC)
|
||||
set_target_properties(turbojpeg-static PROPERTIES OUTPUT_NAME turbojpeg)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
set(USE_SETMODE "-DUSE_SETMODE")
|
||||
endif()
|
||||
if(WITH_12BIT)
|
||||
set(COMPILE_FLAGS "-DGIF_SUPPORTED -DPPM_SUPPORTED ${USE_SETMODE}")
|
||||
else()
|
||||
set(COMPILE_FLAGS "-DBMP_SUPPORTED -DGIF_SUPPORTED -DPPM_SUPPORTED -DTARGA_SUPPORTED ${USE_SETMODE}")
|
||||
set(CJPEG_BMP_SOURCES rdbmp.c rdtarga.c)
|
||||
set(DJPEG_BMP_SOURCES wrbmp.c wrtarga.c)
|
||||
endif()
|
||||
@ -1,741 +0,0 @@
|
||||
# CMakeLists.txt
|
||||
|
||||
# Copyright (C) 2018 Cosmin Truta
|
||||
# Copyright (C) 2007,2009-2018 Glenn Randers-Pehrson
|
||||
# Written by Christian Ehrlicher, 2007
|
||||
# Revised by Roger Lowman, 2009-2010
|
||||
# Revised by Clifford Yapp, 2011-2012,2017
|
||||
# Revised by Roger Leigh, 2016
|
||||
# Revised by Andreas Franek, 2016
|
||||
# Revised by Sam Serrels, 2017
|
||||
# Revised by Vadim Barkov, 2017
|
||||
# Revised by Vicky Pfau, 2018
|
||||
# Revised by Cameron Cawley, 2018
|
||||
# Revised by Cosmin Truta, 2018
|
||||
# Revised by Kyle Bentley, 2018
|
||||
|
||||
# This code is released under the libpng license.
|
||||
# For conditions of distribution and use, see the disclaimer
|
||||
# and license in png.h
|
||||
|
||||
cmake_minimum_required(VERSION 3.10)
|
||||
cmake_policy(VERSION 3.1)
|
||||
# When using CMake 3.4 and later, don't export symbols from executables unless
|
||||
# the CMAKE_ENABLE_EXPORTS variable is set.
|
||||
if(POLICY CMP0065)
|
||||
cmake_policy(SET CMP0065 NEW)
|
||||
endif()
|
||||
if (POLICY CMP0077)
|
||||
cmake_policy(SET CMP0077 NEW)
|
||||
endif()
|
||||
set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS ON)
|
||||
|
||||
project(libpng C ASM)
|
||||
enable_testing()
|
||||
|
||||
set(PNGLIB_MAJOR 1)
|
||||
set(PNGLIB_MINOR 6)
|
||||
set(PNGLIB_RELEASE 37)
|
||||
set(PNGLIB_NAME libpng${PNGLIB_MAJOR}${PNGLIB_MINOR})
|
||||
set(PNGLIB_VERSION ${PNGLIB_MAJOR}.${PNGLIB_MINOR}.${PNGLIB_RELEASE})
|
||||
|
||||
include(GNUInstallDirs)
|
||||
|
||||
# needed packages
|
||||
|
||||
# Allow users to specify location of Zlib.
|
||||
# Useful if zlib is being built alongside this as a sub-project.
|
||||
option(PNG_BUILD_ZLIB "Custom zlib Location, else find_package is used" ON)
|
||||
|
||||
if(NOT PNG_BUILD_ZLIB)
|
||||
find_package(ZLIB REQUIRED)
|
||||
include_directories(${ZLIB_INCLUDE_DIR})
|
||||
endif()
|
||||
|
||||
if(UNIX AND NOT APPLE AND NOT BEOS AND NOT HAIKU)
|
||||
find_library(M_LIBRARY m)
|
||||
else()
|
||||
# libm is not needed and/or not available
|
||||
set(M_LIBRARY "")
|
||||
endif()
|
||||
|
||||
# COMMAND LINE OPTIONS
|
||||
option(PNG_SHARED "Build shared lib" OFF)
|
||||
option(PNG_STATIC "Build static lib" ON)
|
||||
option(PNG_TESTS "Build libpng tests" OFF)
|
||||
|
||||
# Many more configuration options could be added here
|
||||
option(PNG_FRAMEWORK "Build OS X framework" OFF)
|
||||
option(PNG_DEBUG "Build with debug output" OFF)
|
||||
option(PNG_HARDWARE_OPTIMIZATIONS "Enable hardware optimizations" OFF)
|
||||
|
||||
set(PNG_PREFIX "" CACHE STRING "Prefix to add to the API function names")
|
||||
set(DFA_XTRA "" CACHE FILEPATH "File containing extra configuration settings")
|
||||
|
||||
if(PNG_HARDWARE_OPTIMIZATIONS)
|
||||
|
||||
# set definitions and sources for arm
|
||||
if(CMAKE_SYSTEM_PROCESSOR MATCHES "^arm" OR
|
||||
CMAKE_SYSTEM_PROCESSOR MATCHES "^aarch64")
|
||||
set(PNG_ARM_NEON_POSSIBLE_VALUES check on off)
|
||||
set(PNG_ARM_NEON "check" CACHE STRING "Enable ARM NEON optimizations:
|
||||
check: (default) use internal checking code;
|
||||
off: disable the optimizations;
|
||||
on: turn on unconditionally.")
|
||||
set_property(CACHE PNG_ARM_NEON PROPERTY STRINGS
|
||||
${PNG_ARM_NEON_POSSIBLE_VALUES})
|
||||
list(FIND PNG_ARM_NEON_POSSIBLE_VALUES ${PNG_ARM_NEON} index)
|
||||
if(index EQUAL -1)
|
||||
message(FATAL_ERROR
|
||||
"PNG_ARM_NEON must be one of [${PNG_ARM_NEON_POSSIBLE_VALUES}]")
|
||||
elseif(NOT ${PNG_ARM_NEON} STREQUAL "off")
|
||||
set(libpng_arm_sources
|
||||
arm/arm_init.c
|
||||
arm/filter_neon.S
|
||||
arm/filter_neon_intrinsics.c
|
||||
arm/palette_neon_intrinsics.c)
|
||||
|
||||
if(${PNG_ARM_NEON} STREQUAL "on")
|
||||
add_definitions(-DPNG_ARM_NEON_OPT=2)
|
||||
elseif(${PNG_ARM_NEON} STREQUAL "check")
|
||||
add_definitions(-DPNG_ARM_NEON_CHECK_SUPPORTED)
|
||||
endif()
|
||||
else()
|
||||
add_definitions(-DPNG_ARM_NEON_OPT=0)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# set definitions and sources for powerpc
|
||||
if(CMAKE_SYSTEM_PROCESSOR MATCHES "^powerpc*" OR
|
||||
CMAKE_SYSTEM_PROCESSOR MATCHES "^ppc64*")
|
||||
set(PNG_POWERPC_VSX_POSSIBLE_VALUES on off)
|
||||
set(PNG_POWERPC_VSX "on" CACHE STRING "Enable POWERPC VSX optimizations:
|
||||
off: disable the optimizations.")
|
||||
set_property(CACHE PNG_POWERPC_VSX PROPERTY STRINGS
|
||||
${PNG_POWERPC_VSX_POSSIBLE_VALUES})
|
||||
list(FIND PNG_POWERPC_VSX_POSSIBLE_VALUES ${PNG_POWERPC_VSX} index)
|
||||
if(index EQUAL -1)
|
||||
message(FATAL_ERROR
|
||||
"PNG_POWERPC_VSX must be one of [${PNG_POWERPC_VSX_POSSIBLE_VALUES}]")
|
||||
elseif(NOT ${PNG_POWERPC_VSX} STREQUAL "off")
|
||||
set(libpng_powerpc_sources
|
||||
powerpc/powerpc_init.c
|
||||
powerpc/filter_vsx_intrinsics.c)
|
||||
if(${PNG_POWERPC_VSX} STREQUAL "on")
|
||||
add_definitions(-DPNG_POWERPC_VSX_OPT=2)
|
||||
endif()
|
||||
else()
|
||||
add_definitions(-DPNG_POWERPC_VSX_OPT=0)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# set definitions and sources for intel
|
||||
if(CMAKE_SYSTEM_PROCESSOR MATCHES "^i?86" OR
|
||||
CMAKE_SYSTEM_PROCESSOR MATCHES "^x86_64*")
|
||||
set(PNG_INTEL_SSE_POSSIBLE_VALUES on off)
|
||||
set(PNG_INTEL_SSE "on" CACHE STRING "Enable INTEL_SSE optimizations:
|
||||
off: disable the optimizations")
|
||||
set_property(CACHE PNG_INTEL_SSE PROPERTY STRINGS
|
||||
${PNG_INTEL_SSE_POSSIBLE_VALUES})
|
||||
list(FIND PNG_INTEL_SSE_POSSIBLE_VALUES ${PNG_INTEL_SSE} index)
|
||||
if(index EQUAL -1)
|
||||
message(FATAL_ERROR
|
||||
"PNG_INTEL_SSE must be one of [${PNG_INTEL_SSE_POSSIBLE_VALUES}]")
|
||||
elseif(NOT ${PNG_INTEL_SSE} STREQUAL "off")
|
||||
set(libpng_intel_sources
|
||||
intel/intel_init.c
|
||||
intel/filter_sse2_intrinsics.c)
|
||||
if(${PNG_INTEL_SSE} STREQUAL "on")
|
||||
add_definitions(-DPNG_INTEL_SSE_OPT=1)
|
||||
endif()
|
||||
else()
|
||||
add_definitions(-DPNG_INTEL_SSE_OPT=0)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# set definitions and sources for MIPS
|
||||
if(CMAKE_SYSTEM_PROCESSOR MATCHES "mipsel*" OR
|
||||
CMAKE_SYSTEM_PROCESSOR MATCHES "mips64el*")
|
||||
set(PNG_MIPS_MSA_POSSIBLE_VALUES on off)
|
||||
set(PNG_MIPS_MSA "on" CACHE STRING "Enable MIPS_MSA optimizations:
|
||||
off: disable the optimizations")
|
||||
set_property(CACHE PNG_MIPS_MSA PROPERTY STRINGS
|
||||
${PNG_MIPS_MSA_POSSIBLE_VALUES})
|
||||
list(FIND PNG_MIPS_MSA_POSSIBLE_VALUES ${PNG_MIPS_MSA} index)
|
||||
if(index EQUAL -1)
|
||||
message(FATAL_ERROR
|
||||
"PNG_MIPS_MSA must be one of [${PNG_MIPS_MSA_POSSIBLE_VALUES}]")
|
||||
elseif(NOT ${PNG_MIPS_MSA} STREQUAL "off")
|
||||
set(libpng_mips_sources
|
||||
mips/mips_init.c
|
||||
mips/filter_msa_intrinsics.c)
|
||||
if(${PNG_MIPS_MSA} STREQUAL "on")
|
||||
add_definitions(-DPNG_MIPS_MSA_OPT=2)
|
||||
endif()
|
||||
else()
|
||||
add_definitions(-DPNG_MIPS_MSA_OPT=0)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
else(PNG_HARDWARE_OPTIMIZATIONS)
|
||||
|
||||
# set definitions and sources for arm
|
||||
if(CMAKE_SYSTEM_PROCESSOR MATCHES "^arm" OR
|
||||
CMAKE_SYSTEM_PROCESSOR MATCHES "^aarch64")
|
||||
add_definitions(-DPNG_ARM_NEON_OPT=0)
|
||||
endif()
|
||||
|
||||
# set definitions and sources for powerpc
|
||||
if(CMAKE_SYSTEM_PROCESSOR MATCHES "^powerpc*" OR
|
||||
CMAKE_SYSTEM_PROCESSOR MATCHES "^ppc64*")
|
||||
add_definitions(-DPNG_POWERPC_VSX_OPT=0)
|
||||
endif()
|
||||
|
||||
# set definitions and sources for intel
|
||||
if(CMAKE_SYSTEM_PROCESSOR MATCHES "^i?86" OR
|
||||
CMAKE_SYSTEM_PROCESSOR MATCHES "^x86_64*")
|
||||
add_definitions(-DPNG_INTEL_SSE_OPT=0)
|
||||
endif()
|
||||
|
||||
# set definitions and sources for MIPS
|
||||
if(CMAKE_SYSTEM_PROCESSOR MATCHES "mipsel*" OR
|
||||
CMAKE_SYSTEM_PROCESSOR MATCHES "mips64el*")
|
||||
add_definitions(-DPNG_MIPS_MSA_OPT=0)
|
||||
endif()
|
||||
|
||||
endif(PNG_HARDWARE_OPTIMIZATIONS)
|
||||
|
||||
# SET LIBNAME
|
||||
set(PNG_LIB_NAME png${PNGLIB_MAJOR}${PNGLIB_MINOR})
|
||||
|
||||
# to distinguish between debug and release lib
|
||||
set(CMAKE_DEBUG_POSTFIX "d")
|
||||
|
||||
include(CheckCSourceCompiles)
|
||||
option(ld-version-script "Enable linker version script" ON)
|
||||
if(ld-version-script AND NOT APPLE)
|
||||
# Check if LD supports linker scripts.
|
||||
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/conftest.map" "VERS_1 {
|
||||
global: sym;
|
||||
local: *;
|
||||
};
|
||||
|
||||
VERS_2 {
|
||||
global: sym2;
|
||||
main;
|
||||
} VERS_1;
|
||||
")
|
||||
set(CMAKE_REQUIRED_FLAGS_SAVE ${CMAKE_REQUIRED_FLAGS})
|
||||
set(CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS} "-Wl,--version-script='${CMAKE_CURRENT_BINARY_DIR}/conftest.map'")
|
||||
check_c_source_compiles("void sym(void) {}
|
||||
void sym2(void) {}
|
||||
int main(void) {return 0;}
|
||||
" HAVE_LD_VERSION_SCRIPT)
|
||||
if(NOT HAVE_LD_VERSION_SCRIPT)
|
||||
set(CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS_SAVE} "-Wl,-M -Wl,${CMAKE_CURRENT_BINARY_DIR}/conftest.map")
|
||||
check_c_source_compiles("void sym(void) {}
|
||||
void sym2(void) {}
|
||||
int main(void) {return 0;}
|
||||
" HAVE_SOLARIS_LD_VERSION_SCRIPT)
|
||||
endif()
|
||||
set(CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS_SAVE})
|
||||
file(REMOVE "${CMAKE_CURRENT_BINARY_DIR}/conftest.map")
|
||||
endif()
|
||||
|
||||
# Find symbol prefix. Likely obsolete and unnecessary with recent
|
||||
# toolchains (it's not done in many other projects).
|
||||
function(symbol_prefix)
|
||||
set(SYMBOL_PREFIX)
|
||||
|
||||
execute_process(COMMAND "${CMAKE_C_COMPILER}" "-E" "-"
|
||||
INPUT_FILE /dev/null
|
||||
OUTPUT_VARIABLE OUT
|
||||
RESULT_VARIABLE STATUS)
|
||||
|
||||
if(CPP_FAIL)
|
||||
message(WARNING "Failed to run the C preprocessor")
|
||||
endif()
|
||||
|
||||
string(REPLACE "\n" ";" OUT "${OUT}")
|
||||
foreach(line ${OUT})
|
||||
string(REGEX MATCH "^PREFIX=" found_match "${line}")
|
||||
if(found_match)
|
||||
string(REGEX REPLACE "^PREFIX=(.*\)" "\\1" prefix "${line}")
|
||||
string(REGEX MATCH "__USER_LABEL_PREFIX__" found_match "${prefix}")
|
||||
if(found_match)
|
||||
string(REGEX REPLACE "(.*)__USER_LABEL_PREFIX__(.*)" "\\1\\2" prefix "${prefix}")
|
||||
endif()
|
||||
set(SYMBOL_PREFIX "${prefix}")
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
message(STATUS "Symbol prefix: ${SYMBOL_PREFIX}")
|
||||
set(SYMBOL_PREFIX "${SYMBOL_PREFIX}" PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
if(UNIX)
|
||||
symbol_prefix()
|
||||
endif()
|
||||
|
||||
find_program(AWK NAMES gawk awk)
|
||||
|
||||
include_directories(${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
if(NOT AWK OR ANDROID)
|
||||
# No awk available to generate sources; use pre-built pnglibconf.h
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/scripts/pnglibconf.h.prebuilt
|
||||
${CMAKE_CURRENT_BINARY_DIR}/pnglibconf.h)
|
||||
add_custom_target(genfiles) # Dummy
|
||||
else()
|
||||
include(CMakeParseArguments)
|
||||
# Generate .chk from .out with awk
|
||||
# generate_chk(INPUT inputfile OUTPUT outputfile [DEPENDS dep1 [dep2...]])
|
||||
function(generate_chk)
|
||||
set(options)
|
||||
set(oneValueArgs INPUT OUTPUT)
|
||||
set(multiValueArgs DEPENDS)
|
||||
cmake_parse_arguments(_GC "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
|
||||
if(NOT _GC_INPUT)
|
||||
message(FATAL_ERROR "generate_chk: Missing INPUT argument")
|
||||
endif()
|
||||
if(NOT _GC_OUTPUT)
|
||||
message(FATAL_ERROR "generate_chk: Missing OUTPUT argument")
|
||||
endif()
|
||||
|
||||
add_custom_command(OUTPUT "${_GC_OUTPUT}"
|
||||
COMMAND "${CMAKE_COMMAND}"
|
||||
"-DINPUT=${_GC_INPUT}"
|
||||
"-DOUTPUT=${_GC_OUTPUT}"
|
||||
-P "${CMAKE_CURRENT_BINARY_DIR}/scripts/genchk.cmake"
|
||||
DEPENDS "${_GC_INPUT}" ${_GC_DEPENDS}
|
||||
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")
|
||||
endfunction()
|
||||
|
||||
# Generate .out from .c with awk
|
||||
# generate_out(INPUT inputfile OUTPUT outputfile [DEPENDS dep1 [dep2...]])
|
||||
function(generate_out)
|
||||
set(options)
|
||||
set(oneValueArgs INPUT OUTPUT)
|
||||
set(multiValueArgs DEPENDS)
|
||||
cmake_parse_arguments(_GO "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
|
||||
if(NOT _GO_INPUT)
|
||||
message(FATAL_ERROR "generate_out: Missing INPUT argument")
|
||||
endif()
|
||||
if(NOT _GO_OUTPUT)
|
||||
message(FATAL_ERROR "generate_out: Missing OUTPUT argument")
|
||||
endif()
|
||||
|
||||
add_custom_command(OUTPUT "${_GO_OUTPUT}"
|
||||
COMMAND "${CMAKE_COMMAND}"
|
||||
"-DINPUT=${_GO_INPUT}"
|
||||
"-DOUTPUT=${_GO_OUTPUT}"
|
||||
-P "${CMAKE_CURRENT_BINARY_DIR}/scripts/genout.cmake"
|
||||
DEPENDS "${_GO_INPUT}" ${_GO_DEPENDS}
|
||||
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")
|
||||
endfunction()
|
||||
|
||||
# Generate specific source file with awk
|
||||
# generate_source(OUTPUT outputfile [DEPENDS dep1 [dep2...]])
|
||||
function(generate_source)
|
||||
set(options)
|
||||
set(oneValueArgs OUTPUT)
|
||||
set(multiValueArgs DEPENDS)
|
||||
cmake_parse_arguments(_GSO "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
|
||||
if(NOT _GSO_OUTPUT)
|
||||
message(FATAL_ERROR "generate_source: Missing OUTPUT argument")
|
||||
endif()
|
||||
|
||||
add_custom_command(OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${_GSO_OUTPUT}"
|
||||
COMMAND "${CMAKE_COMMAND}"
|
||||
"-DOUTPUT=${_GSO_OUTPUT}"
|
||||
-P "${CMAKE_CURRENT_BINARY_DIR}/scripts/gensrc.cmake"
|
||||
DEPENDS ${_GSO_DEPENDS}
|
||||
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")
|
||||
endfunction()
|
||||
|
||||
# Copy file
|
||||
function(generate_copy source destination)
|
||||
add_custom_command(OUTPUT "${destination}"
|
||||
COMMAND "${CMAKE_COMMAND}" -E remove "${destination}"
|
||||
COMMAND "${CMAKE_COMMAND}" -E copy "${source}"
|
||||
"${destination}"
|
||||
DEPENDS "${source}")
|
||||
endfunction()
|
||||
|
||||
# Generate scripts/pnglibconf.h
|
||||
generate_source(OUTPUT "scripts/pnglibconf.c"
|
||||
DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/scripts/pnglibconf.dfa"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/scripts/options.awk"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/pngconf.h")
|
||||
|
||||
# Generate pnglibconf.c
|
||||
generate_source(OUTPUT "pnglibconf.c"
|
||||
DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/scripts/pnglibconf.dfa"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/scripts/options.awk"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/pngconf.h")
|
||||
|
||||
if(PNG_PREFIX)
|
||||
set(PNGLIBCONF_H_EXTRA_DEPENDS
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/scripts/prefix.out"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/scripts/macro.lst")
|
||||
set(PNGPREFIX_H_EXTRA_DEPENDS
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/scripts/intprefix.out")
|
||||
endif()
|
||||
|
||||
generate_out(INPUT "${CMAKE_CURRENT_BINARY_DIR}/pnglibconf.c"
|
||||
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/pnglibconf.out")
|
||||
|
||||
# Generate pnglibconf.h
|
||||
generate_source(OUTPUT "pnglibconf.h"
|
||||
DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/pnglibconf.out"
|
||||
${PNGLIBCONF_H_EXTRA_DEPENDS})
|
||||
|
||||
generate_out(INPUT "${CMAKE_CURRENT_SOURCE_DIR}/scripts/intprefix.c"
|
||||
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/scripts/intprefix.out"
|
||||
DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/pnglibconf.h")
|
||||
|
||||
generate_out(INPUT "${CMAKE_CURRENT_SOURCE_DIR}/scripts/prefix.c"
|
||||
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/scripts/prefix.out"
|
||||
DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/png.h"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/pngconf.h"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/pnglibconf.out")
|
||||
|
||||
# Generate pngprefix.h
|
||||
generate_source(OUTPUT "pngprefix.h"
|
||||
DEPENDS ${PNGPREFIX_H_EXTRA_DEPENDS})
|
||||
|
||||
generate_out(INPUT "${CMAKE_CURRENT_SOURCE_DIR}/scripts/sym.c"
|
||||
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/scripts/sym.out"
|
||||
DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/pnglibconf.h")
|
||||
|
||||
generate_out(INPUT "${CMAKE_CURRENT_SOURCE_DIR}/scripts/symbols.c"
|
||||
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/scripts/symbols.out"
|
||||
DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/png.h"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/pngconf.h"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/scripts/pnglibconf.h.prebuilt")
|
||||
|
||||
generate_out(INPUT "${CMAKE_CURRENT_SOURCE_DIR}/scripts/vers.c"
|
||||
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/scripts/vers.out"
|
||||
DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/png.h"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/pngconf.h"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/pnglibconf.h")
|
||||
|
||||
generate_chk(INPUT "${CMAKE_CURRENT_BINARY_DIR}/scripts/symbols.out"
|
||||
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/scripts/symbols.chk"
|
||||
DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/scripts/checksym.awk"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/scripts/symbols.def")
|
||||
|
||||
add_custom_target(symbol-check DEPENDS
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/scripts/symbols.chk")
|
||||
|
||||
generate_copy("${CMAKE_CURRENT_BINARY_DIR}/scripts/sym.out"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/libpng.sym")
|
||||
generate_copy("${CMAKE_CURRENT_BINARY_DIR}/scripts/vers.out"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/libpng.vers")
|
||||
|
||||
add_custom_target(genvers DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/libpng.vers")
|
||||
add_custom_target(gensym DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/libpng.sym")
|
||||
|
||||
add_custom_target("genprebuilt"
|
||||
COMMAND "${CMAKE_COMMAND}"
|
||||
"-DOUTPUT=scripts/pnglibconf.h.prebuilt"
|
||||
-P "${CMAKE_CURRENT_BINARY_DIR}/scripts/gensrc.cmake"
|
||||
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")
|
||||
|
||||
# A single target handles generation of all generated files. If
|
||||
# they are depended upon separately by multiple targets, this
|
||||
# confuses parallel make (it would require a separate top-level
|
||||
# target for each file to track the dependencies properly).
|
||||
add_custom_target(genfiles DEPENDS
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/libpng.sym"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/libpng.vers"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/pnglibconf.c"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/pnglibconf.h"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/pnglibconf.out"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/pngprefix.h"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/scripts/intprefix.out"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/scripts/pnglibconf.c"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/scripts/prefix.out"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/scripts/sym.out"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/scripts/symbols.chk"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/scripts/symbols.out"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/scripts/vers.out")
|
||||
endif(NOT AWK OR ANDROID)
|
||||
|
||||
# OUR SOURCES
|
||||
set(libpng_public_hdrs
|
||||
png.h
|
||||
pngconf.h
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/pnglibconf.h"
|
||||
)
|
||||
set(libpng_private_hdrs
|
||||
pngpriv.h
|
||||
pngdebug.h
|
||||
pnginfo.h
|
||||
pngstruct.h
|
||||
)
|
||||
if(AWK AND NOT ANDROID)
|
||||
list(APPEND libpng_private_hdrs "${CMAKE_CURRENT_BINARY_DIR}/pngprefix.h")
|
||||
endif()
|
||||
set(libpng_sources
|
||||
${libpng_public_hdrs}
|
||||
${libpng_private_hdrs}
|
||||
png.c
|
||||
pngerror.c
|
||||
pngget.c
|
||||
pngmem.c
|
||||
pngpread.c
|
||||
pngread.c
|
||||
pngrio.c
|
||||
pngrtran.c
|
||||
pngrutil.c
|
||||
pngset.c
|
||||
pngtrans.c
|
||||
pngwio.c
|
||||
pngwrite.c
|
||||
pngwtran.c
|
||||
pngwutil.c
|
||||
${libpng_arm_sources}
|
||||
${libpng_intel_sources}
|
||||
${libpng_mips_sources}
|
||||
${libpng_powerpc_sources}
|
||||
)
|
||||
set(pngtest_sources
|
||||
pngtest.c
|
||||
)
|
||||
set(pngvalid_sources
|
||||
contrib/libtests/pngvalid.c
|
||||
)
|
||||
set(pngstest_sources
|
||||
contrib/libtests/pngstest.c
|
||||
)
|
||||
set(pngunknown_sources
|
||||
contrib/libtests/pngunknown.c
|
||||
)
|
||||
set(pngimage_sources
|
||||
contrib/libtests/pngimage.c
|
||||
)
|
||||
set(pngfix_sources
|
||||
contrib/tools/pngfix.c
|
||||
)
|
||||
set(png_fix_itxt_sources
|
||||
contrib/tools/png-fix-itxt.c
|
||||
)
|
||||
|
||||
if(MSVC)
|
||||
add_definitions(-D_CRT_SECURE_NO_DEPRECATE)
|
||||
endif()
|
||||
|
||||
if(PNG_DEBUG)
|
||||
add_definitions(-DPNG_DEBUG)
|
||||
endif()
|
||||
|
||||
# NOW BUILD OUR TARGET
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${ZLIB_INCLUDE_DIR})
|
||||
|
||||
unset(PNG_LIB_TARGETS)
|
||||
|
||||
if(PNG_STATIC)
|
||||
# does not work without changing name
|
||||
set(PNG_LIB_NAME_STATIC png_static)
|
||||
add_library(png_static STATIC ${libpng_sources})
|
||||
add_dependencies(png_static genfiles)
|
||||
# MSVC doesn't use a different file extension for shared vs. static
|
||||
# libs. We are able to change OUTPUT_NAME to remove the _static
|
||||
# for all other platforms.
|
||||
if(NOT MSVC)
|
||||
set_target_properties(png_static PROPERTIES
|
||||
OUTPUT_NAME "${PNG_LIB_NAME}"
|
||||
CLEAN_DIRECT_OUTPUT 1)
|
||||
else()
|
||||
set_target_properties(png_static PROPERTIES
|
||||
OUTPUT_NAME "${PNG_LIB_NAME}_static"
|
||||
CLEAN_DIRECT_OUTPUT 1)
|
||||
endif()
|
||||
list(APPEND PNG_LIB_TARGETS png_static)
|
||||
if(MSVC)
|
||||
# msvc does not append 'lib' - do it here to have consistent name
|
||||
set_target_properties(png_static PROPERTIES PREFIX "lib")
|
||||
endif()
|
||||
target_link_libraries(png_static ${M_LIBRARY})
|
||||
endif()
|
||||
|
||||
if(NOT PNG_LIB_TARGETS)
|
||||
message(SEND_ERROR
|
||||
"No library variant selected to build. "
|
||||
"Please enable at least one of the following options: "
|
||||
"PNG_STATIC, PNG_SHARED, PNG_FRAMEWORK")
|
||||
endif()
|
||||
|
||||
# Set a variable with CMake code which:
|
||||
# Creates a symlink from src to dest (if possible) or alternatively
|
||||
# copies if different.
|
||||
include(CMakeParseArguments)
|
||||
|
||||
function(create_symlink DEST_FILE)
|
||||
|
||||
cmake_parse_arguments(S "" "FILE;TARGET" "" ${ARGN})
|
||||
|
||||
if(NOT S_TARGET AND NOT S_FILE)
|
||||
message(FATAL_ERROR "create_symlink: Missing TARGET or FILE argument")
|
||||
endif()
|
||||
|
||||
if(S_TARGET AND S_FILE)
|
||||
message(FATAL_ERROR "create_symlink: Both source file ${S_FILE} and build target ${S_TARGET} arguments are present; can only have one.")
|
||||
endif()
|
||||
|
||||
if(S_FILE)
|
||||
# If we don't need to symlink something that's coming from a build target,
|
||||
# we can go ahead and symlink/copy at configure time.
|
||||
if(CMAKE_HOST_WIN32 AND NOT CYGWIN)
|
||||
execute_process(
|
||||
COMMAND "${CMAKE_COMMAND}" -E copy_if_different ${S_FILE} ${DEST_FILE}
|
||||
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")
|
||||
else()
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_COMMAND} -E create_symlink ${S_FILE} ${DEST_FILE}
|
||||
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(S_TARGET)
|
||||
# We need to use generator expressions, which can be a bit tricky, so for
|
||||
# simplicity make the symlink a POST_BUILD step and use the TARGET
|
||||
# signature of add_custom_command.
|
||||
if(CMAKE_HOST_WIN32 AND NOT CYGWIN)
|
||||
add_custom_command(TARGET ${S_TARGET} POST_BUILD
|
||||
COMMAND "${CMAKE_COMMAND}" -E copy_if_different $<TARGET_LINKER_FILE_NAME:${S_TARGET}> $<TARGET_LINKER_FILE_DIR:${S_TARGET}>/${DEST_FILE})
|
||||
else()
|
||||
add_custom_command(TARGET ${S_TARGET} POST_BUILD
|
||||
COMMAND "${CMAKE_COMMAND}" -E create_symlink $<TARGET_LINKER_FILE_NAME:${S_TARGET}> $<TARGET_LINKER_FILE_DIR:${S_TARGET}>/${DEST_FILE})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
endfunction()
|
||||
|
||||
# Create source generation scripts.
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/scripts/genchk.cmake.in
|
||||
${CMAKE_CURRENT_BINARY_DIR}/scripts/genchk.cmake @ONLY)
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/scripts/genout.cmake.in
|
||||
${CMAKE_CURRENT_BINARY_DIR}/scripts/genout.cmake @ONLY)
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/scripts/gensrc.cmake.in
|
||||
${CMAKE_CURRENT_BINARY_DIR}/scripts/gensrc.cmake @ONLY)
|
||||
|
||||
# libpng is a library so default to 'lib'
|
||||
if(NOT DEFINED CMAKE_INSTALL_LIBDIR)
|
||||
set(CMAKE_INSTALL_LIBDIR lib)
|
||||
endif()
|
||||
|
||||
# CREATE PKGCONFIG FILES
|
||||
# We use the same files like ./configure, so we have to set its vars.
|
||||
# Only do this on Windows for Cygwin - the files don't make much sense outside
|
||||
# of a UNIX look-alike.
|
||||
if(NOT WIN32 OR CYGWIN OR MINGW)
|
||||
set(prefix ${CMAKE_INSTALL_PREFIX})
|
||||
set(exec_prefix ${CMAKE_INSTALL_PREFIX})
|
||||
set(libdir ${CMAKE_INSTALL_FULL_LIBDIR})
|
||||
set(includedir ${CMAKE_INSTALL_FULL_INCLUDEDIR})
|
||||
set(LIBS "-lz -lm")
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libpng.pc.in
|
||||
${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}.pc @ONLY)
|
||||
create_symlink(libpng.pc FILE ${PNGLIB_NAME}.pc)
|
||||
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libpng-config.in
|
||||
${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}-config @ONLY)
|
||||
create_symlink(libpng-config FILE ${PNGLIB_NAME}-config)
|
||||
endif()
|
||||
|
||||
# SET UP LINKS
|
||||
if(PNG_SHARED)
|
||||
set_target_properties(png PROPERTIES
|
||||
# VERSION 16.${PNGLIB_RELEASE}.1.6.37
|
||||
VERSION 16.${PNGLIB_RELEASE}.0
|
||||
SOVERSION 16
|
||||
CLEAN_DIRECT_OUTPUT 1)
|
||||
endif()
|
||||
|
||||
# INSTALL
|
||||
if(NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL)
|
||||
install(TARGETS ${PNG_LIB_TARGETS}
|
||||
EXPORT libpng
|
||||
RUNTIME DESTINATION bin
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
FRAMEWORK DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
|
||||
if(PNG_SHARED)
|
||||
# Create a symlink for libpng.dll.a => libpng16.dll.a on Cygwin
|
||||
if(CYGWIN OR MINGW)
|
||||
create_symlink(libpng${CMAKE_IMPORT_LIBRARY_SUFFIX} TARGET png)
|
||||
install(FILES $<TARGET_LINKER_FILE_DIR:png>/libpng${CMAKE_IMPORT_LIBRARY_SUFFIX}
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
endif()
|
||||
|
||||
if(NOT WIN32)
|
||||
create_symlink(libpng${CMAKE_SHARED_LIBRARY_SUFFIX} TARGET png)
|
||||
install(FILES $<TARGET_LINKER_FILE_DIR:png>/libpng${CMAKE_SHARED_LIBRARY_SUFFIX}
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(PNG_STATIC)
|
||||
if(NOT WIN32 OR CYGWIN OR MINGW)
|
||||
create_symlink(libpng${CMAKE_STATIC_LIBRARY_SUFFIX} TARGET png_static)
|
||||
install(FILES $<TARGET_LINKER_FILE_DIR:png_static>/libpng${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT SKIP_INSTALL_HEADERS AND NOT SKIP_INSTALL_ALL)
|
||||
install(FILES ${libpng_public_hdrs} DESTINATION include)
|
||||
install(FILES ${libpng_public_hdrs} DESTINATION include/${PNGLIB_NAME})
|
||||
endif()
|
||||
if(NOT SKIP_INSTALL_EXECUTABLES AND NOT SKIP_INSTALL_ALL)
|
||||
if(NOT WIN32 OR CYGWIN OR MINGW)
|
||||
install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/libpng-config DESTINATION bin)
|
||||
install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}-config DESTINATION bin)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT SKIP_INSTALL_PROGRAMS AND NOT SKIP_INSTALL_ALL)
|
||||
install(TARGETS ${PNG_BIN_TARGETS}
|
||||
RUNTIME DESTINATION bin)
|
||||
endif()
|
||||
|
||||
if(NOT SKIP_INSTALL_FILES AND NOT SKIP_INSTALL_ALL)
|
||||
# Install man pages
|
||||
if(NOT PNG_MAN_DIR)
|
||||
set(PNG_MAN_DIR "share/man")
|
||||
endif()
|
||||
install(FILES libpng.3 libpngpf.3 DESTINATION ${PNG_MAN_DIR}/man3)
|
||||
install(FILES png.5 DESTINATION ${PNG_MAN_DIR}/man5)
|
||||
# Install pkg-config files
|
||||
if(NOT CMAKE_HOST_WIN32 OR CYGWIN OR MINGW)
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libpng.pc
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
|
||||
install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/libpng-config
|
||||
DESTINATION bin)
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}.pc
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
|
||||
install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}-config
|
||||
DESTINATION bin)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Create an export file that CMake users can include() to import our targets.
|
||||
if(NOT SKIP_INSTALL_EXPORT AND NOT SKIP_INSTALL_ALL)
|
||||
install(EXPORT libpng DESTINATION lib/libpng FILE lib${PNG_LIB_NAME}.cmake)
|
||||
endif()
|
||||
|
||||
# what's with libpng-manual.txt and all the extra files?
|
||||
|
||||
# UNINSTALL
|
||||
# do we need this?
|
||||
|
||||
# DIST
|
||||
# do we need this?
|
||||
|
||||
# to create msvc import lib for mingw compiled shared lib
|
||||
# pexports libpng.dll > libpng.def
|
||||
# lib /def:libpng.def /machine:x86
|
||||
@ -1,3 +1,4 @@
|
||||
# -*- CMake -*- master configuration file for building LAMMPS
|
||||
########################################
|
||||
# CMake build system
|
||||
# This file is part of LAMMPS
|
||||
@ -12,11 +13,6 @@ endif()
|
||||
if(POLICY CMP0075)
|
||||
cmake_policy(SET CMP0075 NEW)
|
||||
endif()
|
||||
# set policy to silence warnings about missing executable permissions in
|
||||
# pythonx.y-config when cross-compiling. review occasionally if it may be set to NEW
|
||||
if(POLICY CMP0109)
|
||||
cmake_policy(SET CMP0109 OLD)
|
||||
endif()
|
||||
# set policy to silence warnings about timestamps of downloaded files. review occasionally if it may be set to NEW
|
||||
if(POLICY CMP0135)
|
||||
cmake_policy(SET CMP0135 OLD)
|
||||
@ -192,6 +188,7 @@ option(BUILD_SHARED_LIBS "Build shared library" OFF)
|
||||
option(CMAKE_POSITION_INDEPENDENT_CODE "Create object compatible with shared libraries" ON)
|
||||
option(BUILD_TOOLS "Build and install LAMMPS tools (msi2lmp, binary2txt, chain)" OFF)
|
||||
option(BUILD_LAMMPS_SHELL "Build and install the LAMMPS shell" OFF)
|
||||
option(BUILD_LAMMPS_GUI "Build and install the LAMMPS GUI" OFF)
|
||||
|
||||
# Support using clang-tidy for C++ files with selected options
|
||||
set(ENABLE_CLANG_TIDY OFF CACHE BOOL "Include clang-tidy processing when compiling")
|
||||
@ -257,7 +254,6 @@ set(STANDARD_PACKAGES
|
||||
KIM
|
||||
KSPACE
|
||||
LATBOLTZ
|
||||
LATTE
|
||||
LEPTON
|
||||
MACHDYN
|
||||
MANIFOLD
|
||||
@ -404,6 +400,7 @@ pkg_depends(CG-DNA MOLECULE)
|
||||
pkg_depends(CG-DNA ASPHERE)
|
||||
pkg_depends(ELECTRODE KSPACE)
|
||||
pkg_depends(EXTRA-MOLECULE MOLECULE)
|
||||
pkg_depends(MESONT MOLECULE)
|
||||
|
||||
# detect if we may enable OpenMP support by default
|
||||
set(BUILD_OMP_DEFAULT OFF)
|
||||
@ -441,7 +438,7 @@ if(BUILD_OMP)
|
||||
target_link_libraries(lmp PRIVATE OpenMP::OpenMP_CXX)
|
||||
endif()
|
||||
|
||||
if(PKG_MSCG OR PKG_ATC OR PKG_AWPMD OR PKG_ML-QUIP OR PKG_ML-POD OR PKG_LATTE OR PKG_ELECTRODE)
|
||||
if(PKG_MSCG OR PKG_ATC OR PKG_AWPMD OR PKG_ML-QUIP OR PKG_ML-POD OR PKG_ELECTRODE OR BUILD_TOOLS)
|
||||
enable_language(C)
|
||||
if (NOT USE_INTERNAL_LINALG)
|
||||
find_package(LAPACK)
|
||||
@ -521,7 +518,7 @@ else()
|
||||
endif()
|
||||
|
||||
foreach(PKG_WITH_INCL KSPACE PYTHON ML-IAP VORONOI COLVARS ML-HDNNP MDI MOLFILE NETCDF
|
||||
PLUMED QMMM ML-QUIP SCAFACOS MACHDYN VTK KIM LATTE MSCG COMPRESS ML-PACE LEPTON)
|
||||
PLUMED QMMM ML-QUIP SCAFACOS MACHDYN VTK KIM MSCG COMPRESS ML-PACE LEPTON)
|
||||
if(PKG_${PKG_WITH_INCL})
|
||||
include(Packages/${PKG_WITH_INCL})
|
||||
endif()
|
||||
@ -538,7 +535,10 @@ set(CMAKE_TUNE_FLAGS "${CMAKE_TUNE_DEFAULT}" CACHE STRING "Compiler and machine
|
||||
separate_arguments(CMAKE_TUNE_FLAGS)
|
||||
foreach(_FLAG ${CMAKE_TUNE_FLAGS})
|
||||
target_compile_options(lammps PRIVATE ${_FLAG})
|
||||
target_compile_options(lmp PRIVATE ${_FLAG})
|
||||
# skip these flags when linking the main executable
|
||||
if(NOT (("${_FLAG}" STREQUAL "-Xcudafe") OR (("${_FLAG}" STREQUAL "--diag_suppress=unrecognized_pragma"))))
|
||||
target_compile_options(lmp PRIVATE ${_FLAG})
|
||||
endif()
|
||||
endforeach()
|
||||
########################################################################
|
||||
# Basic system tests (standard libraries, headers, functions, types) #
|
||||
@ -793,9 +793,11 @@ include(Tools)
|
||||
include(Documentation)
|
||||
|
||||
###############################################################################
|
||||
# Install potential and force field files in data directory
|
||||
# Install bench, potential and force field files in data directory
|
||||
###############################################################################
|
||||
set(LAMMPS_INSTALL_DATADIR ${CMAKE_INSTALL_FULL_DATADIR}/lammps)
|
||||
set(LAMMPS_INSTALL_DATADIR ${CMAKE_INSTALL_DATADIR}/lammps)
|
||||
|
||||
install(DIRECTORY ${LAMMPS_DIR}/bench DESTINATION ${LAMMPS_INSTALL_DATADIR})
|
||||
install(DIRECTORY ${LAMMPS_POTENTIALS_DIR} DESTINATION ${LAMMPS_INSTALL_DATADIR})
|
||||
if(BUILD_TOOLS)
|
||||
install(DIRECTORY ${LAMMPS_TOOLS_DIR}/msi2lmp/frc_files DESTINATION ${LAMMPS_INSTALL_DATADIR})
|
||||
@ -838,9 +840,8 @@ if(BUILD_SHARED_LIBS)
|
||||
set(LIBLAMMPS_SHARED_BINARY ${MY_BUILD_DIR}/liblammps${LAMMPS_MACHINE}${CMAKE_SHARED_LIBRARY_SUFFIX})
|
||||
if(Python_EXECUTABLE)
|
||||
add_custom_target(
|
||||
install-python ${CMAKE_COMMAND} -E remove_directory build
|
||||
COMMAND ${Python_EXECUTABLE} ${LAMMPS_PYTHON_DIR}/install.py -p ${LAMMPS_PYTHON_DIR}/lammps
|
||||
-l ${LIBLAMMPS_SHARED_BINARY} -w ${MY_BUILD_DIR}
|
||||
install-python ${Python_EXECUTABLE} ${LAMMPS_PYTHON_DIR}/install.py -p ${LAMMPS_PYTHON_DIR}/lammps
|
||||
-l ${LIBLAMMPS_SHARED_BINARY} -w ${MY_BUILD_DIR} -v ${LAMMPS_SOURCE_DIR}/version.h
|
||||
COMMENT "Installing LAMMPS Python module")
|
||||
else()
|
||||
add_custom_target(
|
||||
@ -853,35 +854,6 @@ else()
|
||||
${CMAKE_COMMAND} -E echo "Must build LAMMPS as a shared library to use the Python module")
|
||||
endif()
|
||||
|
||||
###############################################################################
|
||||
# Add LAMMPS python module to "install" target. This is taylored for building
|
||||
# LAMMPS for package managers and with different prefix settings.
|
||||
# This requires either a shared library or that the PYTHON package is included.
|
||||
###############################################################################
|
||||
if(BUILD_SHARED_LIBS OR PKG_PYTHON)
|
||||
if(CMAKE_VERSION VERSION_LESS 3.12)
|
||||
# adjust so we find Python 3 versions before Python 2 on old systems with old CMake
|
||||
set(Python_ADDITIONAL_VERSIONS 3.12 3.11 3.10 3.9 3.8 3.7 3.6)
|
||||
find_package(PythonInterp) # Deprecated since version 3.12
|
||||
if(PYTHONINTERP_FOUND)
|
||||
set(Python_EXECUTABLE ${PYTHON_EXECUTABLE})
|
||||
endif()
|
||||
else()
|
||||
# backward compatibility
|
||||
if(PYTHON_EXECUTABLE)
|
||||
set(Python_EXECUTABLE ${PYTHON_EXECUTABLE})
|
||||
endif()
|
||||
find_package(Python COMPONENTS Interpreter)
|
||||
endif()
|
||||
if(Python_EXECUTABLE)
|
||||
file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/python/lib)
|
||||
file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/python/src)
|
||||
file(COPY ${LAMMPS_SOURCE_DIR}/version.h DESTINATION ${CMAKE_BINARY_DIR}/python/src)
|
||||
file(COPY ${LAMMPS_PYTHON_DIR}/README ${LAMMPS_PYTHON_DIR}/pyproject.toml ${LAMMPS_PYTHON_DIR}/setup.py ${LAMMPS_PYTHON_DIR}/lammps DESTINATION ${CMAKE_BINARY_DIR}/python/lib)
|
||||
install(CODE "if(\"\$ENV{DESTDIR}\" STREQUAL \"\")\n execute_process(COMMAND ${Python_EXECUTABLE} -m pip install -v ${CMAKE_BINARY_DIR}/python/lib --prefix=${CMAKE_INSTALL_PREFIX})\n else()\n execute_process(COMMAND ${Python_EXECUTABLE} -m pip install -v ${CMAKE_BINARY_DIR}/python/lib --prefix=${CMAKE_INSTALL_PREFIX} --root=\$ENV{DESTDIR})\n endif()")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
include(Testing)
|
||||
include(CodeCoverage)
|
||||
include(CodingStandard)
|
||||
@ -918,13 +890,23 @@ else()
|
||||
endif()
|
||||
include(FeatureSummary)
|
||||
feature_summary(DESCRIPTION "The following tools and libraries have been found and configured:" WHAT PACKAGES_FOUND)
|
||||
if(GIT_FOUND AND EXISTS ${LAMMPS_DIR}/.git)
|
||||
execute_process(COMMAND ${GIT_EXECUTABLE} describe --dirty=-modified --always
|
||||
OUTPUT_VARIABLE GIT_DESCRIBE
|
||||
ERROR_QUIET
|
||||
WORKING_DIRECTORY ${LAMMPS_DIR}
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
endif()
|
||||
message(STATUS "<<< Build configuration >>>
|
||||
LAMMPS Version: ${PROJECT_VERSION}
|
||||
LAMMPS Version: ${PROJECT_VERSION} ${GIT_DESCRIBE}
|
||||
Operating System: ${CMAKE_SYSTEM_NAME} ${CMAKE_LINUX_DISTRO} ${CMAKE_DISTRO_VERSION}
|
||||
CMake Version: ${CMAKE_VERSION}
|
||||
Build type: ${LAMMPS_BUILD_TYPE}
|
||||
Install path: ${CMAKE_INSTALL_PREFIX}
|
||||
Generator: ${CMAKE_GENERATOR} using ${CMAKE_MAKE_PROGRAM}")
|
||||
if(CMAKE_CROSSCOMPILING)
|
||||
message(STATUS "Cross compiling on ${CMAKE_HOST_SYSTEM}")
|
||||
endif()
|
||||
###############################################################################
|
||||
# Print package summary
|
||||
###############################################################################
|
||||
@ -1053,6 +1035,14 @@ endif()
|
||||
if(BUILD_LAMMPS_SHELL)
|
||||
message(STATUS "<<< Building LAMMPS Shell >>>")
|
||||
endif()
|
||||
if(BUILD_LAMMPS_GUI)
|
||||
message(STATUS "<<< Building LAMMPS GUI >>>")
|
||||
if(LAMMPS_GUI_USE_PLUGIN)
|
||||
message(STATUS "Loading LAMMPS library as plugin at run time")
|
||||
else()
|
||||
message(STATUS "Linking LAMMPS library at compile time")
|
||||
endif()
|
||||
endif()
|
||||
if(ENABLE_TESTING)
|
||||
message(STATUS "<<< Building Unit Tests >>>")
|
||||
if(ENABLE_COVERAGE)
|
||||
|
||||
@ -1,195 +0,0 @@
|
||||
cmake_minimum_required(VERSION 3.10)
|
||||
# When using CMake 3.4 and later, don't export symbols from executables unless
|
||||
# the CMAKE_ENABLE_EXPORTS variable is set.
|
||||
if(POLICY CMP0065)
|
||||
cmake_policy(SET CMP0065 NEW)
|
||||
endif()
|
||||
if (POLICY CMP0077)
|
||||
cmake_policy(SET CMP0077 NEW)
|
||||
endif()
|
||||
set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS ON)
|
||||
|
||||
project(zlib C)
|
||||
|
||||
set(VERSION "1.2.11")
|
||||
|
||||
option(ASM686 "Enable building i686 assembly implementation" OFF)
|
||||
option(AMD64 "Enable building amd64 assembly implementation" OFF)
|
||||
|
||||
set(INSTALL_BIN_DIR "${CMAKE_INSTALL_PREFIX}/bin" CACHE PATH "Installation directory for executables")
|
||||
set(INSTALL_LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib" CACHE PATH "Installation directory for libraries")
|
||||
set(INSTALL_INC_DIR "${CMAKE_INSTALL_PREFIX}/include" CACHE PATH "Installation directory for headers")
|
||||
set(INSTALL_MAN_DIR "${CMAKE_INSTALL_PREFIX}/share/man" CACHE PATH "Installation directory for manual pages")
|
||||
set(INSTALL_PKGCONFIG_DIR "${CMAKE_INSTALL_PREFIX}/share/pkgconfig" CACHE PATH "Installation directory for pkgconfig (.pc) files")
|
||||
|
||||
include(CheckTypeSize)
|
||||
include(CheckFunctionExists)
|
||||
include(CheckIncludeFile)
|
||||
include(CheckCSourceCompiles)
|
||||
|
||||
check_include_file(sys/types.h HAVE_SYS_TYPES_H)
|
||||
check_include_file(stdint.h HAVE_STDINT_H)
|
||||
check_include_file(stddef.h HAVE_STDDEF_H)
|
||||
|
||||
#
|
||||
# Check to see if we have large file support
|
||||
#
|
||||
set(CMAKE_REQUIRED_DEFINITIONS -D_LARGEFILE64_SOURCE=1)
|
||||
# We add these other definitions here because CheckTypeSize.cmake
|
||||
# in CMake 2.4.x does not automatically do so and we want
|
||||
# compatibility with CMake 2.4.x.
|
||||
if(HAVE_SYS_TYPES_H)
|
||||
list(APPEND CMAKE_REQUIRED_DEFINITIONS -DHAVE_SYS_TYPES_H)
|
||||
endif()
|
||||
if(HAVE_STDINT_H)
|
||||
list(APPEND CMAKE_REQUIRED_DEFINITIONS -DHAVE_STDINT_H)
|
||||
endif()
|
||||
if(HAVE_STDDEF_H)
|
||||
list(APPEND CMAKE_REQUIRED_DEFINITIONS -DHAVE_STDDEF_H)
|
||||
endif()
|
||||
check_type_size(off64_t OFF64_T)
|
||||
check_type_size(off64_t OFF64_T)
|
||||
if(HAVE_OFF64_T)
|
||||
add_definitions(-D_LARGEFILE64_SOURCE=1)
|
||||
endif()
|
||||
set(CMAKE_REQUIRED_DEFINITIONS) # clear variable
|
||||
|
||||
#
|
||||
# Check for fseeko
|
||||
#
|
||||
check_function_exists(fseeko HAVE_FSEEKO)
|
||||
if(NOT HAVE_FSEEKO)
|
||||
add_definitions(-DNO_FSEEKO)
|
||||
endif()
|
||||
|
||||
#
|
||||
# Check for unistd.h
|
||||
#
|
||||
check_include_file(unistd.h Z_HAVE_UNISTD_H)
|
||||
|
||||
if(MSVC)
|
||||
set(CMAKE_DEBUG_POSTFIX "d")
|
||||
add_definitions(-D_CRT_SECURE_NO_DEPRECATE)
|
||||
add_definitions(-D_CRT_NONSTDC_NO_DEPRECATE)
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
|
||||
endif()
|
||||
|
||||
if(NOT CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_CURRENT_BINARY_DIR)
|
||||
# If we're doing an out of source build and the user has a zconf.h
|
||||
# in their source tree...
|
||||
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/zconf.h)
|
||||
file(RENAME ${CMAKE_CURRENT_SOURCE_DIR}/zconf.h ${CMAKE_CURRENT_SOURCE_DIR}/zconf.h.included)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(ZLIB_PC ${CMAKE_CURRENT_BINARY_DIR}/zlib.pc)
|
||||
configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/zlib.pc.cmakein
|
||||
${ZLIB_PC} @ONLY)
|
||||
configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/zconf.h.cmakein
|
||||
${CMAKE_CURRENT_BINARY_DIR}/zconf.h @ONLY)
|
||||
include_directories(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_SOURCE_DIR})
|
||||
|
||||
|
||||
#============================================================================
|
||||
# zlib
|
||||
#============================================================================
|
||||
|
||||
set(ZLIB_PUBLIC_HDRS
|
||||
${CMAKE_CURRENT_BINARY_DIR}/zconf.h
|
||||
zlib.h
|
||||
)
|
||||
set(ZLIB_PRIVATE_HDRS
|
||||
crc32.h
|
||||
deflate.h
|
||||
gzguts.h
|
||||
inffast.h
|
||||
inffixed.h
|
||||
inflate.h
|
||||
inftrees.h
|
||||
trees.h
|
||||
zutil.h
|
||||
)
|
||||
set(ZLIB_SRCS
|
||||
adler32.c
|
||||
compress.c
|
||||
crc32.c
|
||||
deflate.c
|
||||
gzclose.c
|
||||
gzlib.c
|
||||
gzread.c
|
||||
gzwrite.c
|
||||
inflate.c
|
||||
infback.c
|
||||
inftrees.c
|
||||
inffast.c
|
||||
trees.c
|
||||
uncompr.c
|
||||
zutil.c
|
||||
)
|
||||
|
||||
if(NOT MINGW)
|
||||
set(ZLIB_DLL_SRCS
|
||||
win32/zlib1.rc # If present will override custom build rule below.
|
||||
)
|
||||
endif()
|
||||
|
||||
if(CMAKE_COMPILER_IS_GNUCC)
|
||||
if(ASM686)
|
||||
set(ZLIB_ASMS contrib/asm686/match.S)
|
||||
elseif (AMD64)
|
||||
set(ZLIB_ASMS contrib/amd64/amd64-match.S)
|
||||
endif ()
|
||||
|
||||
if(ZLIB_ASMS)
|
||||
add_definitions(-DASMV)
|
||||
set_source_files_properties(${ZLIB_ASMS} PROPERTIES LANGUAGE C COMPILE_FLAGS -DNO_UNDERLINE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(MSVC)
|
||||
if(ASM686)
|
||||
ENABLE_LANGUAGE(ASM_MASM)
|
||||
set(ZLIB_ASMS
|
||||
contrib/masmx86/inffas32.asm
|
||||
contrib/masmx86/match686.asm
|
||||
)
|
||||
elseif (AMD64)
|
||||
ENABLE_LANGUAGE(ASM_MASM)
|
||||
set(ZLIB_ASMS
|
||||
contrib/masmx64/gvmat64.asm
|
||||
contrib/masmx64/inffasx64.asm
|
||||
)
|
||||
endif()
|
||||
|
||||
if(ZLIB_ASMS)
|
||||
add_definitions(-DASMV -DASMINF)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# parse the full version number from zlib.h and include in ZLIB_FULL_VERSION
|
||||
file(READ ${CMAKE_CURRENT_SOURCE_DIR}/zlib.h _zlib_h_contents)
|
||||
string(REGEX REPLACE ".*#define[ \t]+ZLIB_VERSION[ \t]+\"([-0-9A-Za-z.]+)\".*"
|
||||
"\\1" ZLIB_FULL_VERSION ${_zlib_h_contents})
|
||||
|
||||
if(MINGW)
|
||||
# This gets us DLL resource information when compiling on MinGW.
|
||||
if(NOT CMAKE_RC_COMPILER)
|
||||
set(CMAKE_RC_COMPILER windres.exe)
|
||||
endif()
|
||||
|
||||
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj
|
||||
COMMAND ${CMAKE_RC_COMPILER}
|
||||
-D GCC_WINDRES
|
||||
-I ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
-I ${CMAKE_CURRENT_BINARY_DIR}
|
||||
-o ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj
|
||||
-i ${CMAKE_CURRENT_SOURCE_DIR}/win32/zlib1.rc)
|
||||
set(ZLIB_DLL_SRCS ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj)
|
||||
endif(MINGW)
|
||||
|
||||
add_library(zlibstatic STATIC ${ZLIB_SRCS} ${ZLIB_ASMS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS})
|
||||
|
||||
if(UNIX)
|
||||
# On unix-like platforms the library is almost always called libz
|
||||
set_target_properties(zlibstatic PROPERTIES OUTPUT_NAME z)
|
||||
endif()
|
||||
@ -63,6 +63,11 @@
|
||||
"name": "ENABLE_TESTING",
|
||||
"value": "True",
|
||||
"type": "BOOL"
|
||||
},
|
||||
{
|
||||
"name": "BUILD_LAMMPS_GUI",
|
||||
"value": "False",
|
||||
"type": "BOOL"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -303,6 +308,54 @@
|
||||
"type": "STRING"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "x64-GUI-MSVC",
|
||||
"generator": "Ninja",
|
||||
"configurationType": "Release",
|
||||
"buildRoot": "${workspaceRoot}\\build\\${name}",
|
||||
"installRoot": "${workspaceRoot}\\install\\${name}",
|
||||
"cmakeCommandArgs": "-C ${workspaceRoot}\\cmake\\presets\\windows.cmake -D QT_DIR=C:\\Qt\\5.15.2\\msvc2019_64\\lib\\cmake\\Qt5 -D Qt5_DIR=C:\\Qt\\5.15.2\\msvc2019_64\\lib\\cmake\\Qt5",
|
||||
"buildCommandArgs": "",
|
||||
"ctestCommandArgs": "-V",
|
||||
"inheritEnvironments": [ "msvc_x64_x64" ],
|
||||
"variables": [
|
||||
{
|
||||
"name": "BUILD_SHARED_LIBS",
|
||||
"value": "True",
|
||||
"type": "BOOL"
|
||||
},
|
||||
{
|
||||
"name": "BUILD_TOOLS",
|
||||
"value": "True",
|
||||
"type": "BOOL"
|
||||
},
|
||||
{
|
||||
"name": "LAMMPS_EXCEPTIONS",
|
||||
"value": "True",
|
||||
"type": "BOOL"
|
||||
},
|
||||
{
|
||||
"name": "ENABLE_TESTING",
|
||||
"value": "False",
|
||||
"type": "BOOL"
|
||||
},
|
||||
{
|
||||
"name": "BUILD_MPI",
|
||||
"value": "False",
|
||||
"type": "BOOL"
|
||||
},
|
||||
{
|
||||
"name": "WITH_PNG",
|
||||
"value": "False",
|
||||
"type": "BOOL"
|
||||
},
|
||||
{
|
||||
"name": "BUILD_LAMMPS_GUI",
|
||||
"value": "True",
|
||||
"type": "BOOL"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -5,6 +5,10 @@ if(CMAKE_VERSION VERSION_LESS 3.12)
|
||||
set(Python3_VERSION ${PYTHON_VERSION_STRING})
|
||||
endif()
|
||||
else()
|
||||
# use default (or custom) Python executable, if version is sufficient
|
||||
if(Python_VERSION VERSION_GREATER_EQUAL 3.5)
|
||||
set(Python3_EXECUTABLE ${Python_EXECUTABLE})
|
||||
endif()
|
||||
find_package(Python3 COMPONENTS Interpreter QUIET)
|
||||
endif()
|
||||
|
||||
|
||||
16
cmake/Modules/DetectHIPInstallation.cmake
Normal file
16
cmake/Modules/DetectHIPInstallation.cmake
Normal file
@ -0,0 +1,16 @@
|
||||
if(NOT DEFINED HIP_PATH)
|
||||
if(NOT DEFINED ENV{HIP_PATH})
|
||||
message(FATAL_ERROR "HIP support requires HIP_PATH to be defined.\n"
|
||||
"Either pass the HIP_PATH as a CMake option via -DHIP_PATH=... or set the HIP_PATH environment variable.")
|
||||
else()
|
||||
set(HIP_PATH $ENV{HIP_PATH} CACHE PATH "Path to HIP installation")
|
||||
endif()
|
||||
endif()
|
||||
if(NOT DEFINED ROCM_PATH)
|
||||
if(NOT DEFINED ENV{ROCM_PATH})
|
||||
set(ROCM_PATH "/opt/rocm" CACHE PATH "Path to ROCm installation")
|
||||
else()
|
||||
set(ROCM_PATH $ENV{ROCM_PATH} CACHE PATH "Path to ROCm installation")
|
||||
endif()
|
||||
endif()
|
||||
list(APPEND CMAKE_PREFIX_PATH ${HIP_PATH} ${ROCM_PATH})
|
||||
@ -4,14 +4,18 @@
|
||||
option(BUILD_DOC "Build LAMMPS HTML documentation" OFF)
|
||||
|
||||
if(BUILD_DOC)
|
||||
# Sphinx 3.x requires at least Python 3.5
|
||||
# Current Sphinx versions require at least Python 3.8
|
||||
if(CMAKE_VERSION VERSION_LESS 3.12)
|
||||
find_package(PythonInterp 3.5 REQUIRED)
|
||||
find_package(PythonInterp 3.8 REQUIRED)
|
||||
set(VIRTUALENV ${PYTHON_EXECUTABLE} -m venv)
|
||||
else()
|
||||
# use default (or custom) Python executable, if version is sufficient
|
||||
if(Python_VERSION VERSION_GREATER_EQUAL 3.8)
|
||||
set(Python3_EXECUTABLE ${Python_EXECUTABLE})
|
||||
endif()
|
||||
find_package(Python3 REQUIRED COMPONENTS Interpreter)
|
||||
if(Python3_VERSION VERSION_LESS 3.5)
|
||||
message(FATAL_ERROR "Python 3.5 and up is required to build the HTML documentation")
|
||||
if(Python3_VERSION VERSION_LESS 3.8)
|
||||
message(FATAL_ERROR "Python 3.8 and up is required to build the HTML documentation")
|
||||
endif()
|
||||
set(VIRTUALENV ${Python3_EXECUTABLE} -m venv)
|
||||
endif()
|
||||
|
||||
@ -1,5 +1,7 @@
|
||||
# Find clang-format
|
||||
find_program(ClangFormat_EXECUTABLE NAMES clang-format
|
||||
clang-format-17.0
|
||||
clang-format-16.0
|
||||
clang-format-15.0
|
||||
clang-format-14.0
|
||||
clang-format-13.0
|
||||
@ -19,7 +21,7 @@ if(ClangFormat_EXECUTABLE)
|
||||
OUTPUT_VARIABLE clang_format_version
|
||||
ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
|
||||
if(clang_format_version MATCHES "^(Ubuntu |)clang-format version .*")
|
||||
if(clang_format_version MATCHES "^(Ubuntu |Debian |)clang-format version .*")
|
||||
# Arch Linux output:
|
||||
# clang-format version 10.0.0
|
||||
#
|
||||
@ -32,9 +34,15 @@ if(ClangFormat_EXECUTABLE)
|
||||
# Ubuntu 22.04 LTS output:
|
||||
# Ubuntu clang-format version 14.0.0-1ubuntu1
|
||||
#
|
||||
# Debian 11 output:
|
||||
# Debian clang-format version 11.0.1-2
|
||||
#
|
||||
# Debian 12 output:
|
||||
# Debian clang-format version 14.0.6
|
||||
#
|
||||
# Fedora 36 output:
|
||||
# clang-format version 14.0.5 (Fedora 14.0.5-1.fc36)
|
||||
string(REGEX REPLACE "^(Ubuntu |)clang-format version ([0-9.]+).*"
|
||||
string(REGEX REPLACE "^(Ubuntu |Debian |)clang-format version ([0-9.]+).*"
|
||||
"\\2"
|
||||
ClangFormat_VERSION
|
||||
"${clang_format_version}")
|
||||
|
||||
@ -88,6 +88,18 @@ function(get_lammps_version version_header variable)
|
||||
set(${variable} "${date}" PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
# determine canonical URL for downloading backup copy from download.lammps.org/thirdparty
|
||||
function(GetFallbackURL input output)
|
||||
string(REPLACE "_URL" "" _tmp ${input})
|
||||
string(TOLOWER ${_tmp} libname)
|
||||
string(REGEX REPLACE "^https://.*/([^/]+gz)" "${LAMMPS_THIRDPARTY_URL}/${libname}-\\1" newurl "${${input}}")
|
||||
if ("${newurl}" STREQUAL "${${input}}")
|
||||
set(${output} "" PARENT_SCOPE)
|
||||
else()
|
||||
set(${output} ${newurl} PARENT_SCOPE)
|
||||
endif()
|
||||
endfunction(GetFallbackURL)
|
||||
|
||||
#################################################################################
|
||||
# LAMMPS C++ interface. We only need the header related parts except on windows.
|
||||
add_library(lammps INTERFACE)
|
||||
|
||||
@ -152,13 +152,14 @@ endfunction(FetchPotentials)
|
||||
# set CMAKE_LINUX_DISTRO and CMAKE_DISTRO_VERSION on Linux
|
||||
if((CMAKE_SYSTEM_NAME STREQUAL "Linux") AND (EXISTS /etc/os-release))
|
||||
file(STRINGS /etc/os-release distro REGEX "^NAME=")
|
||||
string(REGEX REPLACE "NAME=\"?([^\"]*)\"?" "\\1" distro "${distro}")
|
||||
string(REGEX REPLACE "NAME=\"?([^ ]+).*\"?" "\\1" distro "${distro}")
|
||||
file(STRINGS /etc/os-release disversion REGEX "^VERSION_ID=")
|
||||
string(REGEX REPLACE "VERSION_ID=\"?([^\"]*)\"?" "\\1" disversion "${disversion}")
|
||||
set(CMAKE_LINUX_DISTRO ${distro})
|
||||
set(CMAKE_DISTRO_VERSION ${disversion})
|
||||
endif()
|
||||
|
||||
# determine canonical URL for downloading backup copy from download.lammps.org/thirdparty
|
||||
function(GetFallbackURL input output)
|
||||
string(REPLACE "_URL" "" _tmp ${input})
|
||||
string(TOLOWER ${_tmp} libname)
|
||||
|
||||
@ -60,10 +60,12 @@ if(GPU_API STREQUAL "CUDA")
|
||||
option(CUDA_MPS_SUPPORT "Enable tweaks to support CUDA Multi-process service (MPS)" OFF)
|
||||
if(CUDA_MPS_SUPPORT)
|
||||
if(CUDPP_OPT)
|
||||
message(FATAL_ERROR "Must use -DCUDPP_OPT=OFF with -DGPU_CUDA_MPS_SUPPORT=ON")
|
||||
message(FATAL_ERROR "Must use -DCUDPP_OPT=OFF with -DCUDA_MPS_SUPPORT=ON")
|
||||
endif()
|
||||
set(GPU_CUDA_MPS_FLAGS "-DCUDA_PROXY")
|
||||
set(GPU_CUDA_MPS_FLAGS "-DCUDA_MPS_SUPPORT")
|
||||
endif()
|
||||
option(CUDA_BUILD_MULTIARCH "Enable building CUDA kernels for all supported GPU architectures" ON)
|
||||
mark_as_advanced(GPU_BUILD_MULTIARCH)
|
||||
|
||||
set(GPU_ARCH "sm_50" CACHE STRING "LAMMPS GPU CUDA SM primary architecture (e.g. sm_60)")
|
||||
|
||||
@ -93,54 +95,58 @@ if(GPU_API STREQUAL "CUDA")
|
||||
# --arch translates directly instead of JIT, so this should be for the preferred or most common architecture
|
||||
set(GPU_CUDA_GENCODE "-arch=${GPU_ARCH}")
|
||||
|
||||
# apply the following to build "fat" CUDA binaries only for known CUDA toolkits since version 8.0
|
||||
# only the Kepler achitecture and beyond is supported
|
||||
# comparison chart according to: https://en.wikipedia.org/wiki/CUDA#GPUs_supported
|
||||
if(CUDA_VERSION VERSION_LESS 8.0)
|
||||
message(FATAL_ERROR "CUDA Toolkit version 8.0 or later is required")
|
||||
elseif(CUDA_VERSION VERSION_GREATER_EQUAL "12.0")
|
||||
message(WARNING "Untested CUDA Toolkit version ${CUDA_VERSION}. Use at your own risk")
|
||||
set(GPU_CUDA_GENCODE "-arch=all")
|
||||
else()
|
||||
# Kepler (GPU Arch 3.0) is supported by CUDA 5 to CUDA 10.2
|
||||
if((CUDA_VERSION VERSION_GREATER_EQUAL "5.0") AND (CUDA_VERSION VERSION_LESS "11.0"))
|
||||
string(APPEND GPU_CUDA_GENCODE " -gencode arch=compute_30,code=[sm_30,compute_30] ")
|
||||
endif()
|
||||
# Kepler (GPU Arch 3.5) is supported by CUDA 5 to CUDA 11
|
||||
if((CUDA_VERSION VERSION_GREATER_EQUAL "5.0") AND (CUDA_VERSION VERSION_LESS "12.0"))
|
||||
string(APPEND GPU_CUDA_GENCODE " -gencode arch=compute_35,code=[sm_35,compute_35]")
|
||||
endif()
|
||||
# Maxwell (GPU Arch 5.x) is supported by CUDA 6 and later
|
||||
if(CUDA_VERSION VERSION_GREATER_EQUAL "6.0")
|
||||
string(APPEND GPU_CUDA_GENCODE " -gencode arch=compute_50,code=[sm_50,compute_50] -gencode arch=compute_52,code=[sm_52,compute_52]")
|
||||
endif()
|
||||
# Pascal (GPU Arch 6.x) is supported by CUDA 8 and later
|
||||
if(CUDA_VERSION VERSION_GREATER_EQUAL "8.0")
|
||||
string(APPEND GPU_CUDA_GENCODE " -gencode arch=compute_60,code=[sm_60,compute_60] -gencode arch=compute_61,code=[sm_61,compute_61]")
|
||||
endif()
|
||||
# Volta (GPU Arch 7.0) is supported by CUDA 9 and later
|
||||
if(CUDA_VERSION VERSION_GREATER_EQUAL "9.0")
|
||||
string(APPEND GPU_CUDA_GENCODE " -gencode arch=compute_70,code=[sm_70,compute_70]")
|
||||
endif()
|
||||
# Turing (GPU Arch 7.5) is supported by CUDA 10 and later
|
||||
if(CUDA_VERSION VERSION_GREATER_EQUAL "10.0")
|
||||
string(APPEND GPU_CUDA_GENCODE " -gencode arch=compute_75,code=[sm_75,compute_75]")
|
||||
endif()
|
||||
# Ampere (GPU Arch 8.0) is supported by CUDA 11 and later
|
||||
if(CUDA_VERSION VERSION_GREATER_EQUAL "11.0")
|
||||
string(APPEND GPU_CUDA_GENCODE " -gencode arch=compute_80,code=[sm_80,compute_80]")
|
||||
endif()
|
||||
# Ampere (GPU Arch 8.6) is supported by CUDA 11.1 and later
|
||||
if(CUDA_VERSION VERSION_GREATER_EQUAL "11.1")
|
||||
string(APPEND GPU_CUDA_GENCODE " -gencode arch=compute_86,code=[sm_86,compute_86]")
|
||||
endif()
|
||||
# Lovelace (GPU Arch 8.9) is supported by CUDA 11.8 and later
|
||||
if(CUDA_VERSION VERSION_GREATER_EQUAL "11.8")
|
||||
string(APPEND GPU_CUDA_GENCODE " -gencode arch=compute_90,code=[sm_90,compute_90]")
|
||||
endif()
|
||||
# Hopper (GPU Arch 9.0) is supported by CUDA 12.0 and later
|
||||
if(CUDA_VERSION VERSION_GREATER_EQUAL "12.0")
|
||||
string(APPEND GPU_CUDA_GENCODE " -gencode arch=compute_90,code=[sm_90,compute_90]")
|
||||
if(CUDA_BUILD_MULTIARCH)
|
||||
# apply the following to build "fat" CUDA binaries only for known CUDA toolkits since version 8.0
|
||||
# only the Kepler achitecture and beyond is supported
|
||||
# comparison chart according to: https://en.wikipedia.org/wiki/CUDA#GPUs_supported
|
||||
if(CUDA_VERSION VERSION_LESS 8.0)
|
||||
message(FATAL_ERROR "CUDA Toolkit version 8.0 or later is required")
|
||||
elseif(CUDA_VERSION VERSION_GREATER_EQUAL "13.0")
|
||||
message(WARNING "Untested CUDA Toolkit version ${CUDA_VERSION}. Use at your own risk")
|
||||
set(GPU_CUDA_GENCODE "-arch=all")
|
||||
elseif(CUDA_VERSION VERSION_GREATER_EQUAL "12.0")
|
||||
set(GPU_CUDA_GENCODE "-arch=all")
|
||||
else()
|
||||
# Kepler (GPU Arch 3.0) is supported by CUDA 5 to CUDA 10.2
|
||||
if((CUDA_VERSION VERSION_GREATER_EQUAL "5.0") AND (CUDA_VERSION VERSION_LESS "11.0"))
|
||||
string(APPEND GPU_CUDA_GENCODE " -gencode arch=compute_30,code=[sm_30,compute_30] ")
|
||||
endif()
|
||||
# Kepler (GPU Arch 3.5) is supported by CUDA 5 to CUDA 11
|
||||
if((CUDA_VERSION VERSION_GREATER_EQUAL "5.0") AND (CUDA_VERSION VERSION_LESS "12.0"))
|
||||
string(APPEND GPU_CUDA_GENCODE " -gencode arch=compute_35,code=[sm_35,compute_35]")
|
||||
endif()
|
||||
# Maxwell (GPU Arch 5.x) is supported by CUDA 6 and later
|
||||
if(CUDA_VERSION VERSION_GREATER_EQUAL "6.0")
|
||||
string(APPEND GPU_CUDA_GENCODE " -gencode arch=compute_50,code=[sm_50,compute_50] -gencode arch=compute_52,code=[sm_52,compute_52]")
|
||||
endif()
|
||||
# Pascal (GPU Arch 6.x) is supported by CUDA 8 and later
|
||||
if(CUDA_VERSION VERSION_GREATER_EQUAL "8.0")
|
||||
string(APPEND GPU_CUDA_GENCODE " -gencode arch=compute_60,code=[sm_60,compute_60] -gencode arch=compute_61,code=[sm_61,compute_61]")
|
||||
endif()
|
||||
# Volta (GPU Arch 7.0) is supported by CUDA 9 and later
|
||||
if(CUDA_VERSION VERSION_GREATER_EQUAL "9.0")
|
||||
string(APPEND GPU_CUDA_GENCODE " -gencode arch=compute_70,code=[sm_70,compute_70]")
|
||||
endif()
|
||||
# Turing (GPU Arch 7.5) is supported by CUDA 10 and later
|
||||
if(CUDA_VERSION VERSION_GREATER_EQUAL "10.0")
|
||||
string(APPEND GPU_CUDA_GENCODE " -gencode arch=compute_75,code=[sm_75,compute_75]")
|
||||
endif()
|
||||
# Ampere (GPU Arch 8.0) is supported by CUDA 11 and later
|
||||
if(CUDA_VERSION VERSION_GREATER_EQUAL "11.0")
|
||||
string(APPEND GPU_CUDA_GENCODE " -gencode arch=compute_80,code=[sm_80,compute_80]")
|
||||
endif()
|
||||
# Ampere (GPU Arch 8.6) is supported by CUDA 11.1 and later
|
||||
if(CUDA_VERSION VERSION_GREATER_EQUAL "11.1")
|
||||
string(APPEND GPU_CUDA_GENCODE " -gencode arch=compute_86,code=[sm_86,compute_86]")
|
||||
endif()
|
||||
# Lovelace (GPU Arch 8.9) is supported by CUDA 11.8 and later
|
||||
if(CUDA_VERSION VERSION_GREATER_EQUAL "11.8")
|
||||
string(APPEND GPU_CUDA_GENCODE " -gencode arch=compute_90,code=[sm_90,compute_90]")
|
||||
endif()
|
||||
# Hopper (GPU Arch 9.0) is supported by CUDA 12.0 and later
|
||||
if(CUDA_VERSION VERSION_GREATER_EQUAL "12.0")
|
||||
string(APPEND GPU_CUDA_GENCODE " -gencode arch=compute_90,code=[sm_90,compute_90]")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@ -175,8 +181,6 @@ if(GPU_API STREQUAL "CUDA")
|
||||
target_compile_definitions(gpu PRIVATE -DUSE_CUDPP)
|
||||
endif()
|
||||
|
||||
target_link_libraries(lammps PRIVATE gpu)
|
||||
|
||||
add_executable(nvc_get_devices ${LAMMPS_LIB_SOURCE_DIR}/gpu/geryon/ucl_get_devices.cpp)
|
||||
target_compile_definitions(nvc_get_devices PRIVATE -DUCL_CUDADR)
|
||||
target_link_libraries(nvc_get_devices PRIVATE ${CUDA_LIBRARIES} ${CUDA_CUDA_LIBRARY})
|
||||
@ -249,29 +253,14 @@ elseif(GPU_API STREQUAL "OPENCL")
|
||||
else()
|
||||
target_compile_definitions(gpu PRIVATE -DMPI_GERYON -DGERYON_NUMA_FISSION -DUCL_NO_EXIT)
|
||||
endif()
|
||||
target_link_libraries(lammps PRIVATE gpu)
|
||||
|
||||
add_executable(ocl_get_devices ${LAMMPS_LIB_SOURCE_DIR}/gpu/geryon/ucl_get_devices.cpp)
|
||||
target_compile_definitions(ocl_get_devices PRIVATE -DUCL_OPENCL)
|
||||
target_link_libraries(ocl_get_devices PRIVATE OpenCL::OpenCL)
|
||||
add_dependencies(ocl_get_devices OpenCL::OpenCL)
|
||||
|
||||
elseif(GPU_API STREQUAL "HIP")
|
||||
if(NOT DEFINED HIP_PATH)
|
||||
if(NOT DEFINED ENV{HIP_PATH})
|
||||
message(FATAL_ERROR "GPU_API=HIP requires HIP_PATH to be defined.\n"
|
||||
"Either pass the HIP_PATH as a CMake option via -DHIP_PATH=... or set the HIP_PATH environment variable.")
|
||||
else()
|
||||
set(HIP_PATH $ENV{HIP_PATH} CACHE PATH "Path to HIP installation")
|
||||
endif()
|
||||
endif()
|
||||
if(NOT DEFINED ROCM_PATH)
|
||||
if(NOT DEFINED ENV{ROCM_PATH})
|
||||
set(ROCM_PATH "/opt/rocm" CACHE PATH "Path to ROCm installation")
|
||||
else()
|
||||
set(ROCM_PATH $ENV{ROCM_PATH} CACHE PATH "Path to ROCm installation")
|
||||
endif()
|
||||
endif()
|
||||
list(APPEND CMAKE_PREFIX_PATH ${HIP_PATH} ${ROCM_PATH})
|
||||
include(DetectHIPInstallation)
|
||||
find_package(hip REQUIRED)
|
||||
option(HIP_USE_DEVICE_SORT "Use GPU sorting" ON)
|
||||
|
||||
@ -285,7 +274,7 @@ elseif(GPU_API STREQUAL "HIP")
|
||||
|
||||
set(ENV{HIP_PLATFORM} ${HIP_PLATFORM})
|
||||
|
||||
if(HIP_PLATFORM STREQUAL "hcc" OR HIP_PLATFORM STREQUAL "amd")
|
||||
if(HIP_PLATFORM STREQUAL "amd")
|
||||
set(HIP_ARCH "gfx906" CACHE STRING "HIP target architecture")
|
||||
elseif(HIP_PLATFORM STREQUAL "spirv")
|
||||
set(HIP_ARCH "spirv" CACHE STRING "HIP target architecture")
|
||||
@ -358,7 +347,7 @@ elseif(GPU_API STREQUAL "HIP")
|
||||
set(CUBIN_FILE "${LAMMPS_LIB_BINARY_DIR}/gpu/${CU_NAME}.cubin")
|
||||
set(CUBIN_H_FILE "${LAMMPS_LIB_BINARY_DIR}/gpu/${CU_NAME}_cubin.h")
|
||||
|
||||
if(HIP_PLATFORM STREQUAL "hcc" OR HIP_PLATFORM STREQUAL "amd")
|
||||
if(HIP_PLATFORM STREQUAL "amd")
|
||||
configure_file(${CU_FILE} ${CU_CPP_FILE} COPYONLY)
|
||||
|
||||
if(HIP_COMPILER STREQUAL "clang")
|
||||
@ -412,7 +401,8 @@ elseif(GPU_API STREQUAL "HIP")
|
||||
set_property(TARGET gpu PROPERTY CXX_STANDARD 14)
|
||||
endif()
|
||||
# add hipCUB
|
||||
target_include_directories(gpu PRIVATE ${HIP_ROOT_DIR}/../include)
|
||||
find_package(hipcub REQUIRED)
|
||||
target_link_libraries(gpu PRIVATE hip::hipcub)
|
||||
target_compile_definitions(gpu PRIVATE -DUSE_HIP_DEVICE_SORT)
|
||||
|
||||
if(HIP_PLATFORM STREQUAL "nvcc")
|
||||
@ -461,35 +451,25 @@ elseif(GPU_API STREQUAL "HIP")
|
||||
|
||||
add_executable(hip_get_devices ${LAMMPS_LIB_SOURCE_DIR}/gpu/geryon/ucl_get_devices.cpp)
|
||||
target_compile_definitions(hip_get_devices PRIVATE -DUCL_HIP)
|
||||
target_link_libraries(hip_get_devices hip::host)
|
||||
target_link_libraries(hip_get_devices PRIVATE hip::host)
|
||||
|
||||
if(HIP_PLATFORM STREQUAL "nvcc")
|
||||
target_compile_definitions(gpu PRIVATE -D__HIP_PLATFORM_NVCC__)
|
||||
target_include_directories(gpu PRIVATE ${HIP_ROOT_DIR}/../include)
|
||||
target_include_directories(gpu PRIVATE ${CUDA_INCLUDE_DIRS})
|
||||
target_link_libraries(gpu PRIVATE ${CUDA_LIBRARIES} ${CUDA_CUDA_LIBRARY})
|
||||
|
||||
target_compile_definitions(hip_get_devices PRIVATE -D__HIP_PLATFORM_NVCC__)
|
||||
target_include_directories(hip_get_devices PRIVATE ${HIP_ROOT_DIR}/include)
|
||||
target_include_directories(hip_get_devices PRIVATE ${CUDA_INCLUDE_DIRS})
|
||||
target_link_libraries(hip_get_devices PRIVATE ${CUDA_LIBRARIES} ${CUDA_CUDA_LIBRARY})
|
||||
elseif(HIP_PLATFORM STREQUAL "hcc")
|
||||
target_compile_definitions(gpu PRIVATE -D__HIP_PLATFORM_HCC__)
|
||||
target_include_directories(gpu PRIVATE ${HIP_ROOT_DIR}/../include)
|
||||
|
||||
target_compile_definitions(hip_get_devices PRIVATE -D__HIP_PLATFORM_HCC__)
|
||||
target_include_directories(hip_get_devices PRIVATE ${HIP_ROOT_DIR}/../include)
|
||||
elseif(HIP_PLATFORM STREQUAL "amd")
|
||||
target_compile_definitions(gpu PRIVATE -D__HIP_PLATFORM_AMD__)
|
||||
target_include_directories(gpu PRIVATE ${HIP_ROOT_DIR}/../include)
|
||||
|
||||
target_compile_definitions(hip_get_devices PRIVATE -D__HIP_PLATFORM_AMD__)
|
||||
target_include_directories(hip_get_devices PRIVATE ${HIP_ROOT_DIR}/../include)
|
||||
endif()
|
||||
|
||||
target_link_libraries(lammps PRIVATE gpu)
|
||||
endif()
|
||||
|
||||
if(BUILD_OMP)
|
||||
find_package(OpenMP COMPONENTS CXX REQUIRED)
|
||||
target_link_libraries(gpu PRIVATE OpenMP::OpenMP_CXX)
|
||||
endif()
|
||||
target_link_libraries(lammps PRIVATE gpu)
|
||||
|
||||
set_property(GLOBAL PROPERTY "GPU_SOURCES" "${GPU_SOURCES}")
|
||||
# detect styles which have a GPU version
|
||||
RegisterStylesExt(${GPU_SOURCES_DIR} gpu GPU_SOURCES)
|
||||
|
||||
@ -19,7 +19,7 @@ if(CURL_FOUND)
|
||||
target_compile_definitions(lammps PRIVATE -DLMP_NO_SSL_CHECK)
|
||||
endif()
|
||||
endif()
|
||||
set(KIM_EXTRA_UNITTESTS OFF CACHE STRING "Set extra unit tests verbose mode on/off. If on, extra tests are included.")
|
||||
option(KIM_EXTRA_UNITTESTS "Enable extra unit tests for the KIM package." OFF)
|
||||
mark_as_advanced(KIM_EXTRA_UNITTESTS)
|
||||
find_package(PkgConfig QUIET)
|
||||
set(DOWNLOAD_KIM_DEFAULT ON)
|
||||
|
||||
@ -16,8 +16,8 @@ if(Kokkos_ENABLE_OPENMP)
|
||||
if(NOT BUILD_OMP)
|
||||
message(FATAL_ERROR "Must enable BUILD_OMP with Kokkos_ENABLE_OPENMP")
|
||||
else()
|
||||
# NVHPC does not seem to provide a detectable OpenMP version, but is far beyond version 3.1
|
||||
if((OpenMP_CXX_VERSION VERSION_LESS 3.1) AND NOT (CMAKE_CXX_COMPILER_ID STREQUAL "NVHPC"))
|
||||
# NVHPC/(AMD)Clang does not seem to provide a detectable OpenMP version, but is far beyond version 3.1
|
||||
if((OpenMP_CXX_VERSION VERSION_LESS 3.1) AND NOT ((CMAKE_CXX_COMPILER_ID STREQUAL "NVHPC") OR (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")))
|
||||
message(FATAL_ERROR "Compiler must support OpenMP 3.1 or later with Kokkos_ENABLE_OPENMP")
|
||||
endif()
|
||||
endif()
|
||||
@ -49,8 +49,8 @@ if(DOWNLOAD_KOKKOS)
|
||||
list(APPEND KOKKOS_LIB_BUILD_ARGS "-DCMAKE_CXX_EXTENSIONS=${CMAKE_CXX_EXTENSIONS}")
|
||||
list(APPEND KOKKOS_LIB_BUILD_ARGS "-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}")
|
||||
include(ExternalProject)
|
||||
set(KOKKOS_URL "https://github.com/kokkos/kokkos/archive/3.7.01.tar.gz" CACHE STRING "URL for KOKKOS tarball")
|
||||
set(KOKKOS_MD5 "f140e02b826223b1045207d9bc10d404" CACHE STRING "MD5 checksum of KOKKOS tarball")
|
||||
set(KOKKOS_URL "https://github.com/kokkos/kokkos/archive/3.7.02.tar.gz" CACHE STRING "URL for KOKKOS tarball")
|
||||
set(KOKKOS_MD5 "34d7860d548c06a4040236d959c9f99a" CACHE STRING "MD5 checksum of KOKKOS tarball")
|
||||
mark_as_advanced(KOKKOS_URL)
|
||||
mark_as_advanced(KOKKOS_MD5)
|
||||
GetFallbackURL(KOKKOS_URL KOKKOS_FALLBACK)
|
||||
@ -72,13 +72,11 @@ if(DOWNLOAD_KOKKOS)
|
||||
set_target_properties(LAMMPS::KOKKOSCONTAINERS PROPERTIES
|
||||
IMPORTED_LOCATION "${INSTALL_DIR}/lib/libkokkoscontainers.a")
|
||||
target_link_libraries(lammps PRIVATE LAMMPS::KOKKOSCORE LAMMPS::KOKKOSCONTAINERS)
|
||||
target_link_libraries(lmp PRIVATE LAMMPS::KOKKOSCORE LAMMPS::KOKKOSCONTAINERS)
|
||||
add_dependencies(LAMMPS::KOKKOSCORE kokkos_build)
|
||||
add_dependencies(LAMMPS::KOKKOSCONTAINERS kokkos_build)
|
||||
elseif(EXTERNAL_KOKKOS)
|
||||
find_package(Kokkos 3.7.01 REQUIRED CONFIG)
|
||||
find_package(Kokkos 3.7.02 REQUIRED CONFIG)
|
||||
target_link_libraries(lammps PRIVATE Kokkos::kokkos)
|
||||
target_link_libraries(lmp PRIVATE Kokkos::kokkos)
|
||||
else()
|
||||
set(LAMMPS_LIB_KOKKOS_SRC_DIR ${LAMMPS_LIB_SOURCE_DIR}/kokkos)
|
||||
set(LAMMPS_LIB_KOKKOS_BIN_DIR ${LAMMPS_LIB_BINARY_DIR}/kokkos)
|
||||
@ -90,7 +88,7 @@ else()
|
||||
if(CMAKE_REQUEST_PIC)
|
||||
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
||||
endif()
|
||||
add_subdirectory(${LAMMPS_LIB_KOKKOS_SRC_DIR} ${LAMMPS_LIB_KOKKOS_BIN_DIR})
|
||||
add_subdirectory(${LAMMPS_LIB_KOKKOS_SRC_DIR} ${LAMMPS_LIB_KOKKOS_BIN_DIR} EXCLUDE_FROM_ALL)
|
||||
|
||||
set(Kokkos_INCLUDE_DIRS ${LAMMPS_LIB_KOKKOS_SRC_DIR}/core/src
|
||||
${LAMMPS_LIB_KOKKOS_SRC_DIR}/containers/src
|
||||
@ -98,7 +96,6 @@ else()
|
||||
${LAMMPS_LIB_KOKKOS_BIN_DIR})
|
||||
target_include_directories(lammps PRIVATE ${Kokkos_INCLUDE_DIRS})
|
||||
target_link_libraries(lammps PRIVATE kokkos)
|
||||
target_link_libraries(lmp PRIVATE kokkos)
|
||||
if(BUILD_SHARED_LIBS_WAS_ON)
|
||||
set(BUILD_SHARED_LIBS ON)
|
||||
endif()
|
||||
@ -124,6 +121,11 @@ set(KOKKOS_PKG_SOURCES ${KOKKOS_PKG_SOURCES_DIR}/kokkos.cpp
|
||||
${KOKKOS_PKG_SOURCES_DIR}/domain_kokkos.cpp
|
||||
${KOKKOS_PKG_SOURCES_DIR}/modify_kokkos.cpp)
|
||||
|
||||
# fix wall/gran has been refactored in an incompatible way. Use old version of base class for now
|
||||
if(PKG_GRANULAR)
|
||||
list(APPEND KOKKOS_PKG_SOURCES ${KOKKOS_PKG_SOURCES_DIR}/fix_wall_gran_old.cpp)
|
||||
endif()
|
||||
|
||||
if(PKG_KSPACE)
|
||||
list(APPEND KOKKOS_PKG_SOURCES ${KOKKOS_PKG_SOURCES_DIR}/fft3d_kokkos.cpp
|
||||
${KOKKOS_PKG_SOURCES_DIR}/grid3d_kokkos.cpp
|
||||
@ -135,8 +137,10 @@ if(PKG_KSPACE)
|
||||
endif()
|
||||
elseif(Kokkos_ENABLE_HIP)
|
||||
if(NOT (FFT STREQUAL "KISS"))
|
||||
include(DetectHIPInstallation)
|
||||
find_package(hipfft REQUIRED)
|
||||
target_compile_definitions(lammps PRIVATE -DFFT_HIPFFT)
|
||||
target_link_libraries(lammps PRIVATE hipfft)
|
||||
target_link_libraries(lammps PRIVATE hip::hipfft)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@ -1,54 +0,0 @@
|
||||
enable_language(Fortran)
|
||||
|
||||
# using lammps in a super-build setting
|
||||
if(TARGET LATTE::latte)
|
||||
target_link_libraries(lammps PRIVATE LATTE::latte)
|
||||
return()
|
||||
endif()
|
||||
|
||||
find_package(LATTE 1.2.2 CONFIG)
|
||||
if(LATTE_FOUND)
|
||||
set(DOWNLOAD_LATTE_DEFAULT OFF)
|
||||
else()
|
||||
set(DOWNLOAD_LATTE_DEFAULT ON)
|
||||
endif()
|
||||
option(DOWNLOAD_LATTE "Download the LATTE library instead of using an already installed one" ${DOWNLOAD_LATTE_DEFAULT})
|
||||
if(DOWNLOAD_LATTE)
|
||||
message(STATUS "LATTE download requested - we will build our own")
|
||||
set(LATTE_URL "https://github.com/lanl/LATTE/archive/v1.2.2.tar.gz" CACHE STRING "URL for LATTE tarball")
|
||||
set(LATTE_MD5 "820e73a457ced178c08c71389a385de7" CACHE STRING "MD5 checksum of LATTE tarball")
|
||||
mark_as_advanced(LATTE_URL)
|
||||
mark_as_advanced(LATTE_MD5)
|
||||
GetFallbackURL(LATTE_URL LATTE_FALLBACK)
|
||||
|
||||
# CMake cannot pass BLAS or LAPACK library variable to external project if they are a list
|
||||
list(LENGTH BLAS_LIBRARIES} NUM_BLAS)
|
||||
list(LENGTH LAPACK_LIBRARIES NUM_LAPACK)
|
||||
if((NUM_BLAS GREATER 1) OR (NUM_LAPACK GREATER 1) AND NOT USE_INTERNAL_LINALG)
|
||||
message(FATAL_ERROR "Cannot compile downloaded LATTE library due to a technical limitation. "
|
||||
"Try to configure LAMMPS with '-D USE_INTERNAL_LINALG=on' added as a workaround.")
|
||||
endif()
|
||||
|
||||
include(ExternalProject)
|
||||
ExternalProject_Add(latte_build
|
||||
URL ${LATTE_URL} ${LATTE_FALLBACK}
|
||||
URL_MD5 ${LATTE_MD5}
|
||||
SOURCE_SUBDIR cmake
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR> ${CMAKE_REQUEST_PIC} -DCMAKE_INSTALL_LIBDIR=lib
|
||||
-DBLAS_LIBRARIES=${BLAS_LIBRARIES} -DLAPACK_LIBRARIES=${LAPACK_LIBRARIES}
|
||||
-DCMAKE_Fortran_COMPILER=${CMAKE_Fortran_COMPILER} -DCMAKE_Fortran_FLAGS=${CMAKE_Fortran_FLAGS}
|
||||
-DCMAKE_Fortran_FLAGS_${BTYPE}=${CMAKE_Fortran_FLAGS_${BTYPE}} -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
|
||||
-DCMAKE_MAKE_PROGRAM=${CMAKE_MAKE_PROGRAM} -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}
|
||||
BUILD_BYPRODUCTS <INSTALL_DIR>/lib/liblatte.a
|
||||
)
|
||||
ExternalProject_get_property(latte_build INSTALL_DIR)
|
||||
add_library(LAMMPS::LATTE UNKNOWN IMPORTED)
|
||||
set_target_properties(LAMMPS::LATTE PROPERTIES
|
||||
IMPORTED_LOCATION "${INSTALL_DIR}/lib/liblatte.a"
|
||||
INTERFACE_LINK_LIBRARIES "${LAPACK_LIBRARIES}")
|
||||
target_link_libraries(lammps PRIVATE LAMMPS::LATTE)
|
||||
add_dependencies(LAMMPS::LATTE latte_build)
|
||||
else()
|
||||
find_package(LATTE 1.2.2 REQUIRED CONFIG)
|
||||
target_link_libraries(lammps PRIVATE LATTE::latte)
|
||||
endif()
|
||||
@ -8,8 +8,8 @@ option(DOWNLOAD_MDI "Download and compile the MDI library instead of using an al
|
||||
|
||||
if(DOWNLOAD_MDI)
|
||||
message(STATUS "MDI download requested - we will build our own")
|
||||
set(MDI_URL "https://github.com/MolSSI-MDI/MDI_Library/archive/v1.4.12.tar.gz" CACHE STRING "URL for MDI tarball")
|
||||
set(MDI_MD5 "7a222353ae8e03961d5365e6cd48baee" CACHE STRING "MD5 checksum for MDI tarball")
|
||||
set(MDI_URL "https://github.com/MolSSI-MDI/MDI_Library/archive/v1.4.16.tar.gz" CACHE STRING "URL for MDI tarball")
|
||||
set(MDI_MD5 "407db44e2d79447ab5c1233af1965f65" CACHE STRING "MD5 checksum for MDI tarball")
|
||||
mark_as_advanced(MDI_URL)
|
||||
mark_as_advanced(MDI_MD5)
|
||||
GetFallbackURL(MDI_URL MDI_FALLBACK)
|
||||
|
||||
@ -7,8 +7,8 @@ else()
|
||||
endif()
|
||||
option(DOWNLOAD_MSCG "Download MSCG library instead of using an already installed one)" ${DOWNLOAD_MSCG_DEFAULT})
|
||||
if(DOWNLOAD_MSCG)
|
||||
set(MSCG_URL "https://github.com/uchicago-voth/MSCG-release/archive/1.7.3.1.tar.gz" CACHE STRING "URL for MSCG tarball")
|
||||
set(MSCG_MD5 "8c45e269ee13f60b303edd7823866a91" CACHE STRING "MD5 checksum of MSCG tarball")
|
||||
set(MSCG_URL "https://github.com/uchicago-voth/MSCG-release/archive/491270a73539e3f6951e76f7dbe84e258b3ebb45.tar.gz" CACHE STRING "URL for MSCG tarball")
|
||||
set(MSCG_MD5 "7ea50748fba5c3a372e0266bd31d2f11" CACHE STRING "MD5 checksum of MSCG tarball")
|
||||
mark_as_advanced(MSCG_URL)
|
||||
mark_as_advanced(MSCG_MD5)
|
||||
|
||||
|
||||
@ -1,106 +1,169 @@
|
||||
set(PLUMED_MODE "static" CACHE STRING "Linkage mode for Plumed2 library")
|
||||
set(PLUMED_MODE_VALUES static shared runtime)
|
||||
set_property(CACHE PLUMED_MODE PROPERTY STRINGS ${PLUMED_MODE_VALUES})
|
||||
validate_option(PLUMED_MODE PLUMED_MODE_VALUES)
|
||||
string(TOUPPER ${PLUMED_MODE} PLUMED_MODE)
|
||||
# Plumed2 support for PLUMED package
|
||||
|
||||
set(PLUMED_LINK_LIBS)
|
||||
if(PLUMED_MODE STREQUAL "STATIC")
|
||||
find_package(LAPACK REQUIRED)
|
||||
find_package(BLAS REQUIRED)
|
||||
find_package(GSL REQUIRED)
|
||||
list(APPEND PLUMED_LINK_LIBS ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES} GSL::gsl)
|
||||
find_package(ZLIB QUIET)
|
||||
if(ZLIB_FOUND)
|
||||
list(APPEND PLUMED_LINK_LIBS ZLIB::ZLIB)
|
||||
endif()
|
||||
find_package(FFTW3 QUIET)
|
||||
if(FFTW3_FOUND)
|
||||
list(APPEND PLUMED_LINK_LIBS FFTW3::FFTW3)
|
||||
endif()
|
||||
if(BUILD_MPI)
|
||||
set(PLUMED_CONFIG_MPI "--enable-mpi")
|
||||
set(PLUMED_CONFIG_CC ${CMAKE_MPI_C_COMPILER})
|
||||
set(PLUMED_CONFIG_CXX ${CMAKE_MPI_CXX_COMPILER})
|
||||
set(PLUMED_CONFIG_CPP "-I ${MPI_CXX_INCLUDE_PATH}")
|
||||
set(PLUMED_CONFIG_LIB "${MPI_CXX_LIBRARIES}")
|
||||
set(PLUMED_CONFIG_DEP "mpi4win_build")
|
||||
else()
|
||||
set(PLUMED_CONFIG_MPI "--disable-mpi")
|
||||
set(PLUMED_CONFIG_CC ${CMAKE_C_COMPILER})
|
||||
set(PLUMED_CONFIG_CXX ${CMAKE_CXX_COMPILER})
|
||||
set(PLUMED_CONFIG_CPP "")
|
||||
set(PLUMED_CONFIG_LIB "")
|
||||
set(PLUMED_CONFIG_DEP "")
|
||||
endif()
|
||||
if(BUILD_OMP)
|
||||
set(PLUMED_CONFIG_OMP "--enable-openmp")
|
||||
else()
|
||||
set(PLUMED_CONFIG_OMP "--disable-openmp")
|
||||
endif()
|
||||
|
||||
find_package(PkgConfig QUIET)
|
||||
set(DOWNLOAD_PLUMED_DEFAULT ON)
|
||||
if(PKG_CONFIG_FOUND)
|
||||
pkg_check_modules(PLUMED QUIET plumed)
|
||||
if(PLUMED_FOUND)
|
||||
set(DOWNLOAD_PLUMED_DEFAULT OFF)
|
||||
endif()
|
||||
endif()
|
||||
set(PLUMED_URL "https://github.com/plumed/plumed2/releases/download/v2.8.2/plumed-src-2.8.2.tgz"
|
||||
CACHE STRING "URL for PLUMED tarball")
|
||||
set(PLUMED_MD5 "599092b6a0aa6fff992612537ad98994" CACHE STRING "MD5 checksum of PLUMED tarball")
|
||||
|
||||
option(DOWNLOAD_PLUMED "Download Plumed package instead of using an already installed one" ${DOWNLOAD_PLUMED_DEFAULT})
|
||||
if(DOWNLOAD_PLUMED)
|
||||
if(BUILD_MPI)
|
||||
set(PLUMED_CONFIG_MPI "--enable-mpi")
|
||||
set(PLUMED_CONFIG_CC ${CMAKE_MPI_C_COMPILER})
|
||||
set(PLUMED_CONFIG_CXX ${CMAKE_MPI_CXX_COMPILER})
|
||||
mark_as_advanced(PLUMED_URL)
|
||||
mark_as_advanced(PLUMED_MD5)
|
||||
GetFallbackURL(PLUMED_URL PLUMED_FALLBACK)
|
||||
|
||||
if((CMAKE_SYSTEM_NAME STREQUAL "Windows") AND (CMAKE_CROSSCOMPILING))
|
||||
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
|
||||
set(CROSS_CONFIGURE mingw64-configure)
|
||||
elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86")
|
||||
set(CROSS_CONFIGURE mingw32-configure)
|
||||
else()
|
||||
set(PLUMED_CONFIG_MPI "--disable-mpi")
|
||||
set(PLUMED_CONFIG_CC ${CMAKE_C_COMPILER})
|
||||
set(PLUMED_CONFIG_CXX ${CMAKE_CXX_COMPILER})
|
||||
message(FATAL_ERROR "Unsupported target system: ${CMAKE_SYSTEM_NAME}/${CMAKE_SYSTEM_PROCESSOR}")
|
||||
endif()
|
||||
if(BUILD_OMP)
|
||||
set(PLUMED_CONFIG_OMP "--enable-openmp")
|
||||
else()
|
||||
set(PLUMED_CONFIG_OMP "--disable-openmp")
|
||||
endif()
|
||||
message(STATUS "PLUMED download requested - we will build our own")
|
||||
if(PLUMED_MODE STREQUAL "STATIC")
|
||||
set(PLUMED_BUILD_BYPRODUCTS "<INSTALL_DIR>/lib/${CMAKE_STATIC_LIBRARY_PREFIX}plumed${CMAKE_STATIC_LIBRARY_SUFFIX}")
|
||||
elseif(PLUMED_MODE STREQUAL "SHARED")
|
||||
set(PLUMED_BUILD_BYPRODUCTS "<INSTALL_DIR>/lib/${CMAKE_SHARED_LIBRARY_PREFIX}plumed${CMAKE_SHARED_LIBRARY_SUFFIX};<INSTALL_DIR>/lib/${CMAKE_SHARED_LIBRARY_PREFIX}plumedKernel${CMAKE_SHARED_LIBRARY_SUFFIX}")
|
||||
elseif(PLUMED_MODE STREQUAL "RUNTIME")
|
||||
set(PLUMED_BUILD_BYPRODUCTS "<INSTALL_DIR>/lib/${CMAKE_STATIC_LIBRARY_PREFIX}plumedWrapper${CMAKE_STATIC_LIBRARY_PREFIX}")
|
||||
endif()
|
||||
|
||||
set(PLUMED_URL "https://github.com/plumed/plumed2/releases/download/v2.8.1/plumed-src-2.8.1.tgz" CACHE STRING "URL for PLUMED tarball")
|
||||
set(PLUMED_MD5 "6bfe72ebdae63dc38a9ca27d9b0e08f8" CACHE STRING "MD5 checksum of PLUMED tarball")
|
||||
|
||||
mark_as_advanced(PLUMED_URL)
|
||||
mark_as_advanced(PLUMED_MD5)
|
||||
GetFallbackURL(PLUMED_URL PLUMED_FALLBACK)
|
||||
|
||||
message(STATUS "Downloading and cross-compiling Plumed2 for ${CMAKE_SYSTEM_NAME}/${CMAKE_SYSTEM_PROCESSOR} with ${CROSS_CONFIGURE}")
|
||||
include(ExternalProject)
|
||||
ExternalProject_Add(plumed_build
|
||||
URL ${PLUMED_URL} ${PLUMED_FALLBACK}
|
||||
URL_MD5 ${PLUMED_MD5}
|
||||
BUILD_IN_SOURCE 1
|
||||
CONFIGURE_COMMAND <SOURCE_DIR>/configure --prefix=<INSTALL_DIR>
|
||||
CONFIGURE_COMMAND ${CROSS_CONFIGURE} --disable-shared --disable-bsymbolic
|
||||
--disable-python --enable-cxx=11
|
||||
--enable-modules=-adjmat:+crystallization:-dimred:+drr:+eds:-fisst:+funnel:+logmfd:+manyrestraints:+maze:+opes:+multicolvar:-pamm:-piv:+s2cm:-sasa:-ves
|
||||
${PLUMED_CONFIG_OMP}
|
||||
${PLUMED_CONFIG_MPI}
|
||||
CXX=${PLUMED_CONFIG_CXX}
|
||||
CC=${PLUMED_CONFIG_CC}
|
||||
CPPFLAGS=${PLUMED_CONFIG_CPP}
|
||||
LIBS=${PLUMED_CONFIG_LIB}
|
||||
INSTALL_COMMAND ""
|
||||
BUILD_BYPRODUCTS "<SOURCE_DIR>/src/lib/install/libplumed.a" "<SOURCE_DIR>/src/lib/install/plumed.exe"
|
||||
DEPENDS "${PLUMED_MPI_CONFIG_DEP}"
|
||||
)
|
||||
ExternalProject_Get_Property(plumed_build SOURCE_DIR)
|
||||
set(PLUMED_BUILD_DIR ${SOURCE_DIR})
|
||||
set(PLUMED_INSTALL_DIR ${PLUMED_BUILD_DIR}/src/lib/install)
|
||||
file(MAKE_DIRECTORY ${PLUMED_BUILD_DIR}/src/include)
|
||||
|
||||
add_library(LAMMPS::PLUMED UNKNOWN IMPORTED)
|
||||
add_dependencies(LAMMPS::PLUMED plumed_build)
|
||||
set_target_properties(LAMMPS::PLUMED PROPERTIES
|
||||
IMPORTED_LOCATION "${PLUMED_INSTALL_DIR}/libplumed.a"
|
||||
INTERFACE_LINK_LIBRARIES "-Wl,--image-base -Wl,0x10000000 -lfftw3 -lz -fstack-protector -lssp -fopenmp"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${PLUMED_BUILD_DIR}/src/include")
|
||||
|
||||
add_custom_target(plumed_copy ALL ${CMAKE_COMMAND} -E rm -rf ${CMAKE_BINARY_DIR}/plumed.exe ${CMAKE_BINARY_DIR}/plumed_patches
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${PLUMED_INSTALL_DIR}/plumed.exe ${CMAKE_BINARY_DIR}/plumed.exe
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${PLUMED_BUILD_DIR}/patches ${CMAKE_BINARY_DIR}/patches
|
||||
BYPRODUCTS ${CMAKE_BINARY_DIR}/plumed.exe ${CMAKE_BINARY_DIR}/patches
|
||||
DEPENDS plumed_build
|
||||
COMMENT "Copying Plumed files"
|
||||
)
|
||||
|
||||
else()
|
||||
|
||||
set(PLUMED_MODE "static" CACHE STRING "Linkage mode for Plumed2 library")
|
||||
set(PLUMED_MODE_VALUES static shared runtime)
|
||||
set_property(CACHE PLUMED_MODE PROPERTY STRINGS ${PLUMED_MODE_VALUES})
|
||||
validate_option(PLUMED_MODE PLUMED_MODE_VALUES)
|
||||
string(TOUPPER ${PLUMED_MODE} PLUMED_MODE)
|
||||
|
||||
set(PLUMED_LINK_LIBS)
|
||||
if(PLUMED_MODE STREQUAL "STATIC")
|
||||
find_package(LAPACK REQUIRED)
|
||||
find_package(BLAS REQUIRED)
|
||||
find_package(GSL REQUIRED)
|
||||
list(APPEND PLUMED_LINK_LIBS ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES} GSL::gsl)
|
||||
find_package(ZLIB QUIET)
|
||||
if(ZLIB_FOUND)
|
||||
list(APPEND PLUMED_LINK_LIBS ZLIB::ZLIB)
|
||||
endif()
|
||||
find_package(FFTW3 QUIET)
|
||||
if(FFTW3_FOUND)
|
||||
list(APPEND PLUMED_LINK_LIBS FFTW3::FFTW3)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
find_package(PkgConfig QUIET)
|
||||
set(DOWNLOAD_PLUMED_DEFAULT ON)
|
||||
if(PKG_CONFIG_FOUND)
|
||||
pkg_check_modules(PLUMED QUIET plumed)
|
||||
if(PLUMED_FOUND)
|
||||
set(DOWNLOAD_PLUMED_DEFAULT OFF)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
option(DOWNLOAD_PLUMED "Download Plumed package instead of using an already installed one" ${DOWNLOAD_PLUMED_DEFAULT})
|
||||
if(DOWNLOAD_PLUMED)
|
||||
message(STATUS "PLUMED download requested - we will build our own")
|
||||
if(PLUMED_MODE STREQUAL "STATIC")
|
||||
set(PLUMED_BUILD_BYPRODUCTS "<INSTALL_DIR>/lib/${CMAKE_STATIC_LIBRARY_PREFIX}plumed${CMAKE_STATIC_LIBRARY_SUFFIX}")
|
||||
elseif(PLUMED_MODE STREQUAL "SHARED")
|
||||
set(PLUMED_BUILD_BYPRODUCTS "<INSTALL_DIR>/lib/${CMAKE_SHARED_LIBRARY_PREFIX}plumed${CMAKE_SHARED_LIBRARY_SUFFIX};<INSTALL_DIR>/lib/${CMAKE_SHARED_LIBRARY_PREFIX}plumedKernel${CMAKE_SHARED_LIBRARY_SUFFIX}")
|
||||
elseif(PLUMED_MODE STREQUAL "RUNTIME")
|
||||
set(PLUMED_BUILD_BYPRODUCTS "<INSTALL_DIR>/lib/${CMAKE_STATIC_LIBRARY_PREFIX}plumedWrapper${CMAKE_STATIC_LIBRARY_PREFIX}")
|
||||
endif()
|
||||
|
||||
include(ExternalProject)
|
||||
ExternalProject_Add(plumed_build
|
||||
URL ${PLUMED_URL} ${PLUMED_FALLBACK}
|
||||
URL_MD5 ${PLUMED_MD5}
|
||||
BUILD_IN_SOURCE 1
|
||||
CONFIGURE_COMMAND <SOURCE_DIR>/configure --prefix=<INSTALL_DIR>
|
||||
${CONFIGURE_REQUEST_PIC}
|
||||
--enable-modules=all
|
||||
--enable-cxx=11
|
||||
--disable-python
|
||||
${PLUMED_CONFIG_MPI}
|
||||
${PLUMED_CONFIG_OMP}
|
||||
CXX=${PLUMED_CONFIG_CXX}
|
||||
CC=${PLUMED_CONFIG_CC}
|
||||
BUILD_BYPRODUCTS ${PLUMED_BUILD_BYPRODUCTS}
|
||||
)
|
||||
ExternalProject_get_property(plumed_build INSTALL_DIR)
|
||||
add_library(LAMMPS::PLUMED UNKNOWN IMPORTED)
|
||||
add_dependencies(LAMMPS::PLUMED plumed_build)
|
||||
if(PLUMED_MODE STREQUAL "STATIC")
|
||||
set_target_properties(LAMMPS::PLUMED PROPERTIES IMPORTED_LOCATION ${INSTALL_DIR}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}plumed${CMAKE_STATIC_LIBRARY_SUFFIX} INTERFACE_LINK_LIBRARIES "${PLUMED_LINK_LIBS};${CMAKE_DL_LIBS}")
|
||||
elseif(PLUMED_MODE STREQUAL "SHARED")
|
||||
set_target_properties(LAMMPS::PLUMED PROPERTIES IMPORTED_LOCATION ${INSTALL_DIR}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}plumed${CMAKE_SHARED_LIBRARY_SUFFIX} INTERFACE_LINK_LIBRARIES "${INSTALL_DIR}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}plumedKernel${CMAKE_SHARED_LIBRARY_SUFFIX};${CMAKE_DL_LIBS}")
|
||||
elseif(PLUMED_MODE STREQUAL "RUNTIME")
|
||||
set_target_properties(LAMMPS::PLUMED PROPERTIES INTERFACE_COMPILE_DEFINITIONS "__PLUMED_DEFAULT_KERNEL=${INSTALL_DIR}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}plumedKernel${CMAKE_SHARED_LIBRARY_SUFFIX}")
|
||||
set_target_properties(LAMMPS::PLUMED PROPERTIES IMPORTED_LOCATION ${INSTALL_DIR}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}plumedWrapper${CMAKE_STATIC_LIBRARY_SUFFIX} INTERFACE_LINK_LIBRARIES "${CMAKE_DL_LIBS}")
|
||||
BUILD_BYPRODUCTS ${PLUMED_BUILD_BYPRODUCTS}
|
||||
)
|
||||
ExternalProject_get_property(plumed_build INSTALL_DIR)
|
||||
add_library(LAMMPS::PLUMED UNKNOWN IMPORTED)
|
||||
add_dependencies(LAMMPS::PLUMED plumed_build)
|
||||
if(PLUMED_MODE STREQUAL "STATIC")
|
||||
set_target_properties(LAMMPS::PLUMED PROPERTIES IMPORTED_LOCATION ${INSTALL_DIR}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}plumed${CMAKE_STATIC_LIBRARY_SUFFIX} INTERFACE_LINK_LIBRARIES "${PLUMED_LINK_LIBS};${CMAKE_DL_LIBS}")
|
||||
elseif(PLUMED_MODE STREQUAL "SHARED")
|
||||
set_target_properties(LAMMPS::PLUMED PROPERTIES IMPORTED_LOCATION ${INSTALL_DIR}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}plumed${CMAKE_SHARED_LIBRARY_SUFFIX} INTERFACE_LINK_LIBRARIES "${INSTALL_DIR}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}plumedKernel${CMAKE_SHARED_LIBRARY_SUFFIX};${CMAKE_DL_LIBS}")
|
||||
elseif(PLUMED_MODE STREQUAL "RUNTIME")
|
||||
set_target_properties(LAMMPS::PLUMED PROPERTIES INTERFACE_COMPILE_DEFINITIONS "__PLUMED_DEFAULT_KERNEL=${INSTALL_DIR}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}plumedKernel${CMAKE_SHARED_LIBRARY_SUFFIX}")
|
||||
set_target_properties(LAMMPS::PLUMED PROPERTIES IMPORTED_LOCATION ${INSTALL_DIR}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}plumedWrapper${CMAKE_STATIC_LIBRARY_SUFFIX} INTERFACE_LINK_LIBRARIES "${CMAKE_DL_LIBS}")
|
||||
endif()
|
||||
set_target_properties(LAMMPS::PLUMED PROPERTIES INTERFACE_INCLUDE_DIRECTORIES ${INSTALL_DIR}/include)
|
||||
file(MAKE_DIRECTORY ${INSTALL_DIR}/include)
|
||||
else()
|
||||
find_package(PkgConfig REQUIRED)
|
||||
pkg_check_modules(PLUMED REQUIRED plumed)
|
||||
add_library(LAMMPS::PLUMED INTERFACE IMPORTED)
|
||||
if(PLUMED_MODE STREQUAL "STATIC")
|
||||
include(${PLUMED_LIBDIR}/plumed/src/lib/Plumed.cmake.static)
|
||||
elseif(PLUMED_MODE STREQUAL "SHARED")
|
||||
include(${PLUMED_LIBDIR}/plumed/src/lib/Plumed.cmake.shared)
|
||||
elseif(PLUMED_MODE STREQUAL "RUNTIME")
|
||||
set_target_properties(LAMMPS::PLUMED PROPERTIES INTERFACE_COMPILE_DEFINITIONS "__PLUMED_DEFAULT_KERNEL=${PLUMED_LIBDIR}/${CMAKE_SHARED_LIBRARY_PREFIX}plumedKernel${CMAKE_SHARED_LIBRARY_SUFFIX}")
|
||||
include(${PLUMED_LIBDIR}/plumed/src/lib/Plumed.cmake.runtime)
|
||||
endif()
|
||||
set_target_properties(LAMMPS::PLUMED PROPERTIES INTERFACE_LINK_LIBRARIES "${PLUMED_LOAD}")
|
||||
set_target_properties(LAMMPS::PLUMED PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${PLUMED_INCLUDE_DIRS}")
|
||||
endif()
|
||||
set_target_properties(LAMMPS::PLUMED PROPERTIES INTERFACE_INCLUDE_DIRECTORIES ${INSTALL_DIR}/include)
|
||||
file(MAKE_DIRECTORY ${INSTALL_DIR}/include)
|
||||
else()
|
||||
find_package(PkgConfig REQUIRED)
|
||||
pkg_check_modules(PLUMED REQUIRED plumed)
|
||||
add_library(LAMMPS::PLUMED INTERFACE IMPORTED)
|
||||
if(PLUMED_MODE STREQUAL "STATIC")
|
||||
include(${PLUMED_LIBDIR}/plumed/src/lib/Plumed.cmake.static)
|
||||
elseif(PLUMED_MODE STREQUAL "SHARED")
|
||||
include(${PLUMED_LIBDIR}/plumed/src/lib/Plumed.cmake.shared)
|
||||
elseif(PLUMED_MODE STREQUAL "RUNTIME")
|
||||
set_target_properties(LAMMPS::PLUMED PROPERTIES INTERFACE_COMPILE_DEFINITIONS "__PLUMED_DEFAULT_KERNEL=${PLUMED_LIBDIR}/${CMAKE_SHARED_LIBRARY_PREFIX}plumedKernel${CMAKE_SHARED_LIBRARY_SUFFIX}")
|
||||
include(${PLUMED_LIBDIR}/plumed/src/lib/Plumed.cmake.runtime)
|
||||
endif()
|
||||
set_target_properties(LAMMPS::PLUMED PROPERTIES INTERFACE_LINK_LIBRARIES "${PLUMED_LOAD}")
|
||||
set_target_properties(LAMMPS::PLUMED PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${PLUMED_INCLUDE_DIRS}")
|
||||
endif()
|
||||
|
||||
target_link_libraries(lammps PRIVATE LAMMPS::PLUMED)
|
||||
|
||||
@ -95,73 +95,76 @@ function(RegisterIntegrateStyle path)
|
||||
endfunction(RegisterIntegrateStyle)
|
||||
|
||||
function(RegisterStyles search_path)
|
||||
FindStyleHeaders(${search_path} ANGLE_CLASS angle_ ANGLE ) # angle ) # force
|
||||
FindStyleHeaders(${search_path} ATOM_CLASS atom_vec_ ATOM_VEC ) # atom ) # atom atom_vec_hybrid
|
||||
FindStyleHeaders(${search_path} BODY_CLASS body_ BODY ) # body ) # atom_vec_body
|
||||
FindStyleHeaders(${search_path} BOND_CLASS bond_ BOND ) # bond ) # force
|
||||
FindStyleHeaders(${search_path} COMMAND_CLASS "[^.]" COMMAND ) # command ) # input
|
||||
FindStyleHeaders(${search_path} COMPUTE_CLASS compute_ COMPUTE ) # compute ) # modify
|
||||
FindStyleHeaders(${search_path} DIHEDRAL_CLASS dihedral_ DIHEDRAL ) # dihedral ) # force
|
||||
FindStyleHeaders(${search_path} DUMP_CLASS dump_ DUMP ) # dump ) # output write_dump
|
||||
FindStyleHeaders(${search_path} FIX_CLASS fix_ FIX ) # fix ) # modify
|
||||
FindStyleHeaders(${search_path} IMPROPER_CLASS improper_ IMPROPER ) # improper ) # force
|
||||
FindStyleHeaders(${search_path} INTEGRATE_CLASS "[^.]" INTEGRATE ) # integrate ) # update
|
||||
FindStyleHeaders(${search_path} KSPACE_CLASS "[^.]" KSPACE ) # kspace ) # force
|
||||
FindStyleHeaders(${search_path} MINIMIZE_CLASS min_ MINIMIZE ) # minimize ) # update
|
||||
FindStyleHeaders(${search_path} NBIN_CLASS nbin_ NBIN ) # nbin ) # neighbor
|
||||
FindStyleHeaders(${search_path} NPAIR_CLASS npair_ NPAIR ) # npair ) # neighbor
|
||||
FindStyleHeaders(${search_path} NSTENCIL_CLASS nstencil_ NSTENCIL ) # nstencil ) # neighbor
|
||||
FindStyleHeaders(${search_path} NTOPO_CLASS ntopo_ NTOPO ) # ntopo ) # neighbor
|
||||
FindStyleHeaders(${search_path} PAIR_CLASS pair_ PAIR ) # pair ) # force
|
||||
FindStyleHeaders(${search_path} READER_CLASS reader_ READER ) # reader ) # read_dump
|
||||
FindStyleHeaders(${search_path} REGION_CLASS region_ REGION ) # region ) # domain
|
||||
FindStyleHeaders(${search_path} ANGLE_CLASS angle_ ANGLE ) # angle ) # force
|
||||
FindStyleHeaders(${search_path} ATOM_CLASS atom_vec_ ATOM_VEC ) # atom ) # atom atom_vec_hybrid
|
||||
FindStyleHeaders(${search_path} BODY_CLASS body_ BODY ) # body ) # atom_vec_body
|
||||
FindStyleHeaders(${search_path} BOND_CLASS bond_ BOND ) # bond ) # force
|
||||
FindStyleHeaders(${search_path} COMMAND_CLASS "[^.]" COMMAND ) # command ) # input
|
||||
FindStyleHeaders(${search_path} COMPUTE_CLASS compute_ COMPUTE ) # compute ) # modify
|
||||
FindStyleHeaders(${search_path} DIHEDRAL_CLASS dihedral_ DIHEDRAL ) # dihedral ) # force
|
||||
FindStyleHeaders(${search_path} DUMP_CLASS dump_ DUMP ) # dump ) # output write_dump
|
||||
FindStyleHeaders(${search_path} FIX_CLASS fix_ FIX ) # fix ) # modify
|
||||
FindStyleHeaders(${search_path} GRAN_SUB_MOD_CLASS gran_sub_mod_ GRAN_SUB_MOD ) # gran_sub_mod ) # granular_model
|
||||
FindStyleHeaders(${search_path} IMPROPER_CLASS improper_ IMPROPER ) # improper ) # force
|
||||
FindStyleHeaders(${search_path} INTEGRATE_CLASS "[^.]" INTEGRATE ) # integrate ) # update
|
||||
FindStyleHeaders(${search_path} KSPACE_CLASS "[^.]" KSPACE ) # kspace ) # force
|
||||
FindStyleHeaders(${search_path} MINIMIZE_CLASS min_ MINIMIZE ) # minimize ) # update
|
||||
FindStyleHeaders(${search_path} NBIN_CLASS nbin_ NBIN ) # nbin ) # neighbor
|
||||
FindStyleHeaders(${search_path} NPAIR_CLASS npair_ NPAIR ) # npair ) # neighbor
|
||||
FindStyleHeaders(${search_path} NSTENCIL_CLASS nstencil_ NSTENCIL ) # nstencil ) # neighbor
|
||||
FindStyleHeaders(${search_path} NTOPO_CLASS ntopo_ NTOPO ) # ntopo ) # neighbor
|
||||
FindStyleHeaders(${search_path} PAIR_CLASS pair_ PAIR ) # pair ) # force
|
||||
FindStyleHeaders(${search_path} READER_CLASS reader_ READER ) # reader ) # read_dump
|
||||
FindStyleHeaders(${search_path} REGION_CLASS region_ REGION ) # region ) # domain
|
||||
endfunction(RegisterStyles)
|
||||
|
||||
function(RegisterStylesExt search_path extension sources)
|
||||
FindStyleHeadersExt(${search_path} ANGLE_CLASS ${extension} ANGLE ${sources})
|
||||
FindStyleHeadersExt(${search_path} ATOM_CLASS ${extension} ATOM_VEC ${sources})
|
||||
FindStyleHeadersExt(${search_path} BODY_CLASS ${extension} BODY ${sources})
|
||||
FindStyleHeadersExt(${search_path} BOND_CLASS ${extension} BOND ${sources})
|
||||
FindStyleHeadersExt(${search_path} COMMAND_CLASS ${extension} COMMAND ${sources})
|
||||
FindStyleHeadersExt(${search_path} COMPUTE_CLASS ${extension} COMPUTE ${sources})
|
||||
FindStyleHeadersExt(${search_path} DIHEDRAL_CLASS ${extension} DIHEDRAL ${sources})
|
||||
FindStyleHeadersExt(${search_path} DUMP_CLASS ${extension} DUMP ${sources})
|
||||
FindStyleHeadersExt(${search_path} FIX_CLASS ${extension} FIX ${sources})
|
||||
FindStyleHeadersExt(${search_path} IMPROPER_CLASS ${extension} IMPROPER ${sources})
|
||||
FindStyleHeadersExt(${search_path} INTEGRATE_CLASS ${extension} INTEGRATE ${sources})
|
||||
FindStyleHeadersExt(${search_path} KSPACE_CLASS ${extension} KSPACE ${sources})
|
||||
FindStyleHeadersExt(${search_path} MINIMIZE_CLASS ${extension} MINIMIZE ${sources})
|
||||
FindStyleHeadersExt(${search_path} NBIN_CLASS ${extension} NBIN ${sources})
|
||||
FindStyleHeadersExt(${search_path} NPAIR_CLASS ${extension} NPAIR ${sources})
|
||||
FindStyleHeadersExt(${search_path} NSTENCIL_CLASS ${extension} NSTENCIL ${sources})
|
||||
FindStyleHeadersExt(${search_path} NTOPO_CLASS ${extension} NTOPO ${sources})
|
||||
FindStyleHeadersExt(${search_path} PAIR_CLASS ${extension} PAIR ${sources})
|
||||
FindStyleHeadersExt(${search_path} READER_CLASS ${extension} READER ${sources})
|
||||
FindStyleHeadersExt(${search_path} REGION_CLASS ${extension} REGION ${sources})
|
||||
FindStyleHeadersExt(${search_path} ANGLE_CLASS ${extension} ANGLE ${sources})
|
||||
FindStyleHeadersExt(${search_path} ATOM_CLASS ${extension} ATOM_VEC ${sources})
|
||||
FindStyleHeadersExt(${search_path} BODY_CLASS ${extension} BODY ${sources})
|
||||
FindStyleHeadersExt(${search_path} BOND_CLASS ${extension} BOND ${sources})
|
||||
FindStyleHeadersExt(${search_path} COMMAND_CLASS ${extension} COMMAND ${sources})
|
||||
FindStyleHeadersExt(${search_path} COMPUTE_CLASS ${extension} COMPUTE ${sources})
|
||||
FindStyleHeadersExt(${search_path} DIHEDRAL_CLASS ${extension} DIHEDRAL ${sources})
|
||||
FindStyleHeadersExt(${search_path} DUMP_CLASS ${extension} DUMP ${sources})
|
||||
FindStyleHeadersExt(${search_path} FIX_CLASS ${extension} FIX ${sources})
|
||||
FindStyleHeadersExt(${search_path} GRAN_SUB_MOD_CLASS ${extension} GRAN_SUB_MOD ${sources})
|
||||
FindStyleHeadersExt(${search_path} IMPROPER_CLASS ${extension} IMPROPER ${sources})
|
||||
FindStyleHeadersExt(${search_path} INTEGRATE_CLASS ${extension} INTEGRATE ${sources})
|
||||
FindStyleHeadersExt(${search_path} KSPACE_CLASS ${extension} KSPACE ${sources})
|
||||
FindStyleHeadersExt(${search_path} MINIMIZE_CLASS ${extension} MINIMIZE ${sources})
|
||||
FindStyleHeadersExt(${search_path} NBIN_CLASS ${extension} NBIN ${sources})
|
||||
FindStyleHeadersExt(${search_path} NPAIR_CLASS ${extension} NPAIR ${sources})
|
||||
FindStyleHeadersExt(${search_path} NSTENCIL_CLASS ${extension} NSTENCIL ${sources})
|
||||
FindStyleHeadersExt(${search_path} NTOPO_CLASS ${extension} NTOPO ${sources})
|
||||
FindStyleHeadersExt(${search_path} PAIR_CLASS ${extension} PAIR ${sources})
|
||||
FindStyleHeadersExt(${search_path} READER_CLASS ${extension} READER ${sources})
|
||||
FindStyleHeadersExt(${search_path} REGION_CLASS ${extension} REGION ${sources})
|
||||
endfunction(RegisterStylesExt)
|
||||
|
||||
function(GenerateStyleHeaders output_path)
|
||||
message(STATUS "Generating style headers...")
|
||||
GenerateStyleHeader(${output_path} ANGLE angle ) # force
|
||||
GenerateStyleHeader(${output_path} ATOM_VEC atom ) # atom atom_vec_hybrid
|
||||
GenerateStyleHeader(${output_path} BODY body ) # atom_vec_body
|
||||
GenerateStyleHeader(${output_path} BOND bond ) # force
|
||||
GenerateStyleHeader(${output_path} COMMAND command ) # input
|
||||
GenerateStyleHeader(${output_path} COMPUTE compute ) # modify
|
||||
GenerateStyleHeader(${output_path} DIHEDRAL dihedral ) # force
|
||||
GenerateStyleHeader(${output_path} DUMP dump ) # output write_dump
|
||||
GenerateStyleHeader(${output_path} FIX fix ) # modify
|
||||
GenerateStyleHeader(${output_path} IMPROPER improper ) # force
|
||||
GenerateStyleHeader(${output_path} INTEGRATE integrate ) # update
|
||||
GenerateStyleHeader(${output_path} KSPACE kspace ) # force
|
||||
GenerateStyleHeader(${output_path} MINIMIZE minimize ) # update
|
||||
GenerateStyleHeader(${output_path} NBIN nbin ) # neighbor
|
||||
GenerateStyleHeader(${output_path} NPAIR npair ) # neighbor
|
||||
GenerateStyleHeader(${output_path} NSTENCIL nstencil ) # neighbor
|
||||
GenerateStyleHeader(${output_path} NTOPO ntopo ) # neighbor
|
||||
GenerateStyleHeader(${output_path} PAIR pair ) # force
|
||||
GenerateStyleHeader(${output_path} READER reader ) # read_dump
|
||||
GenerateStyleHeader(${output_path} REGION region ) # domain
|
||||
GenerateStyleHeader(${output_path} ANGLE angle ) # force
|
||||
GenerateStyleHeader(${output_path} ATOM_VEC atom ) # atom atom_vec_hybrid
|
||||
GenerateStyleHeader(${output_path} BODY body ) # atom_vec_body
|
||||
GenerateStyleHeader(${output_path} BOND bond ) # force
|
||||
GenerateStyleHeader(${output_path} COMMAND command ) # input
|
||||
GenerateStyleHeader(${output_path} COMPUTE compute ) # modify
|
||||
GenerateStyleHeader(${output_path} DIHEDRAL dihedral ) # force
|
||||
GenerateStyleHeader(${output_path} DUMP dump ) # output write_dump
|
||||
GenerateStyleHeader(${output_path} FIX fix ) # modify
|
||||
GenerateStyleHeader(${output_path} GRAN_SUB_MOD gran_sub_mod ) # granular_model
|
||||
GenerateStyleHeader(${output_path} IMPROPER improper ) # force
|
||||
GenerateStyleHeader(${output_path} INTEGRATE integrate ) # update
|
||||
GenerateStyleHeader(${output_path} KSPACE kspace ) # force
|
||||
GenerateStyleHeader(${output_path} MINIMIZE minimize ) # update
|
||||
GenerateStyleHeader(${output_path} NBIN nbin ) # neighbor
|
||||
GenerateStyleHeader(${output_path} NPAIR npair ) # neighbor
|
||||
GenerateStyleHeader(${output_path} NSTENCIL nstencil ) # neighbor
|
||||
GenerateStyleHeader(${output_path} NTOPO ntopo ) # neighbor
|
||||
GenerateStyleHeader(${output_path} PAIR pair ) # force
|
||||
GenerateStyleHeader(${output_path} READER reader ) # read_dump
|
||||
GenerateStyleHeader(${output_path} REGION region ) # domain
|
||||
endfunction(GenerateStyleHeaders)
|
||||
|
||||
function(DetectBuildSystemConflict lammps_src_dir)
|
||||
|
||||
@ -18,29 +18,33 @@ if(ENABLE_TESTING)
|
||||
|
||||
# we need to build and link a LOT of tester executables, so it is worth checking if
|
||||
# a faster linker is available. requires GNU or Clang compiler, newer CMake.
|
||||
# also only verified with Fedora Linux > 30 and Ubuntu <= 18.04 (Ubuntu 20.04 fails)
|
||||
# also only verified with Fedora Linux > 30 and Ubuntu 18.04 or 22.04+(Ubuntu 20.04 fails)
|
||||
if((CMAKE_SYSTEM_NAME STREQUAL "Linux") AND (CMAKE_VERSION VERSION_GREATER_EQUAL 3.13)
|
||||
AND ((CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||
OR (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")))
|
||||
if(((CMAKE_LINUX_DISTRO STREQUAL "Ubuntu") AND (CMAKE_DISTRO_VERSION VERSION_LESS_EQUAL 18.04))
|
||||
AND ((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") OR (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")))
|
||||
if(((CMAKE_LINUX_DISTRO STREQUAL "Ubuntu") AND
|
||||
((CMAKE_DISTRO_VERSION VERSION_LESS_EQUAL 18.04) OR (CMAKE_DISTRO_VERSION VERSION_GREATER_EQUAL 22.04)))
|
||||
OR ((CMAKE_LINUX_DISTRO STREQUAL "Fedora") AND (CMAKE_DISTRO_VERSION VERSION_GREATER 30)))
|
||||
include(CheckCXXCompilerFlag)
|
||||
set(CMAKE_CUSTOM_LINKER_DEFAULT default)
|
||||
check_cxx_compiler_flag(-fuse-ld=mold HAVE_MOLD_LINKER_FLAG)
|
||||
check_cxx_compiler_flag(-fuse-ld=lld HAVE_LLD_LINKER_FLAG)
|
||||
check_cxx_compiler_flag(-fuse-ld=gold HAVE_GOLD_LINKER_FLAG)
|
||||
check_cxx_compiler_flag(-fuse-ld=bfd HAVE_BFD_LINKER_FLAG)
|
||||
find_program(HAVE_MOLD_LINKER_BIN ld.mold)
|
||||
find_program(HAVE_LLD_LINKER_BIN lld ld.lld)
|
||||
find_program(HAVE_GOLD_LINKER_BIN ld.gold)
|
||||
find_program(HAVE_BFD_LINKER_BIN ld.bfd)
|
||||
if(HAVE_LLD_LINKER_FLAG AND HAVE_LLD_LINKER_BIN)
|
||||
if(HAVE_MOLD_LINKER_FLAG AND HAVE_MOLD_LINKER_BIN)
|
||||
set(CMAKE_CUSTOM_LINKER_DEFAULT mold)
|
||||
elseif(HAVE_LLD_LINKER_FLAG AND HAVE_LLD_LINKER_BIN)
|
||||
set(CMAKE_CUSTOM_LINKER_DEFAULT lld)
|
||||
elseif(HAVE_GOLD_LINKER_FLAG AND HAVE_GOLD_LINKER_BIN)
|
||||
set(CMAKE_CUSTOM_LINKER_DEFAULT gold)
|
||||
elseif(HAVE_BFD_LINKER_FLAG AND HAVE_BFD_LINKER_BIN)
|
||||
set(CMAKE_CUSTOM_LINKER_DEFAULT bfd)
|
||||
endif()
|
||||
set(CMAKE_CUSTOM_LINKER_VALUES lld gold bfd default)
|
||||
set(CMAKE_CUSTOM_LINKER ${CMAKE_CUSTOM_LINKER_DEFAULT} CACHE STRING "Choose a custom linker for faster linking (lld, gold, bfd, default)")
|
||||
set(CMAKE_CUSTOM_LINKER_VALUES mold lld gold bfd default)
|
||||
set(CMAKE_CUSTOM_LINKER ${CMAKE_CUSTOM_LINKER_DEFAULT} CACHE STRING "Choose a custom linker for faster linking (mold, lld, gold, bfd, default)")
|
||||
validate_option(CMAKE_CUSTOM_LINKER CMAKE_CUSTOM_LINKER_VALUES)
|
||||
mark_as_advanced(CMAKE_CUSTOM_LINKER)
|
||||
if(NOT "${CMAKE_CUSTOM_LINKER}" STREQUAL "default")
|
||||
|
||||
@ -33,9 +33,15 @@ if(BUILD_TOOLS)
|
||||
endif()
|
||||
install(TARGETS msi2lmp DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||
install(FILES ${LAMMPS_DOC_DIR}/msi2lmp.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)
|
||||
|
||||
add_subdirectory(${LAMMPS_TOOLS_DIR}/phonon ${CMAKE_BINARY_DIR}/phana_build)
|
||||
endif()
|
||||
|
||||
find_package(PkgConfig QUIET)
|
||||
if(BUILD_LAMMPS_SHELL)
|
||||
if(NOT PkgConfig_FOUND)
|
||||
message(FATAL_ERROR "Must have pkg-config installed for building LAMMPS shell")
|
||||
endif()
|
||||
find_package(PkgConfig REQUIRED)
|
||||
pkg_check_modules(READLINE IMPORTED_TARGET REQUIRED readline)
|
||||
if(NOT LAMMPS_EXCEPTIONS)
|
||||
@ -65,4 +71,8 @@ if(BUILD_LAMMPS_SHELL)
|
||||
install(FILES ${LAMMPS_TOOLS_DIR}/lammps-shell/lammps-shell.desktop DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/applications/)
|
||||
endif()
|
||||
|
||||
|
||||
if(BUILD_LAMMPS_GUI)
|
||||
get_filename_component(LAMMPS_GUI_DIR ${LAMMPS_SOURCE_DIR}/../tools/lammps-gui ABSOLUTE)
|
||||
get_filename_component(LAMMPS_GUI_BIN ${CMAKE_BINARY_DIR}/lammps-gui-build ABSOLUTE)
|
||||
add_subdirectory(${LAMMPS_GUI_DIR} ${LAMMPS_GUI_BIN})
|
||||
endif()
|
||||
|
||||
BIN
cmake/packaging/LAMMPS_DMG_Background.png
Normal file
BIN
cmake/packaging/LAMMPS_DMG_Background.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 85 KiB |
34
cmake/packaging/MacOSXBundleInfo.plist.in
Normal file
34
cmake/packaging/MacOSXBundleInfo.plist.in
Normal file
@ -0,0 +1,34 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>en-US</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>${MACOSX_BUNDLE_EXECUTABLE_NAME}</string>
|
||||
<key>CFBundleDisplayName</key>
|
||||
<string>The LAMMPS Molecular Dynamics Software</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>lammps</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>org.lammps.gui</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleLongVersionString</key>
|
||||
<string>${MACOSX_BUNDLE_LONG_VERSION_STRING}</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>LAMMPS</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>${MACOSX_BUNDLE_SHORT_VERSION_STRING}</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>${MACOSX_BUNDLE_BUNDLE_VERSION}</string>
|
||||
<key>CSResourcesFileMapped</key>
|
||||
<true/>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>${MACOSX_BUNDLE_COPYRIGHT}</string>
|
||||
</dict>
|
||||
</plist>
|
||||
69
cmake/packaging/README.macos
Normal file
69
cmake/packaging/README.macos
Normal file
@ -0,0 +1,69 @@
|
||||
LAMMPS and LAMMPS GUI universal binaries for macOS (arm64/x86_64)
|
||||
=================================================================
|
||||
|
||||
This package provides universal binaries of LAMMPS and LAMMPS GUI that should
|
||||
run on macOS systems running running macOS version 11 (Big Sur) or newer. Note
|
||||
the binaries are compiled without MPI support and contain a compatible subset
|
||||
of the available packages.
|
||||
|
||||
The following individual commands are included:
|
||||
binary2txt lammps-gui lmp msi2lmp phana stl_bin2txt
|
||||
|
||||
After copying the lammps-gui folder into your Applications folder, please follow
|
||||
these steps:
|
||||
|
||||
1. Open the Terminal app
|
||||
|
||||
2. Type the following command and press ENTER:
|
||||
|
||||
open ~/.zprofile
|
||||
|
||||
This will open a text editor for modifying the .zprofile file in your home
|
||||
directory.
|
||||
|
||||
3. Add the following lines to the end of the file, save it, and close the editor
|
||||
|
||||
LAMMPS_INSTALL_DIR=/Applications/LAMMPS.app/Contents
|
||||
LAMMPS_POTENTIALS=${LAMMPS_INSTALL_DIR}/share/lammps/potentials
|
||||
LAMMPS_BENCH_DIR=${LAMMPS_INSTALL_DIR}/share/lammps/bench
|
||||
MSI2LMP_LIBRARY=${LAMMPS_INSTALL_DIR}/share/lammps/frc_files
|
||||
PATH=${LAMMPS_INSTALL_DIR}/bin:$PATH
|
||||
export LAMMPS_POTENTIALS LAMMPS_BENCH_DIR PATH
|
||||
|
||||
4. In your existing terminal, type the following command make the settings active
|
||||
|
||||
source ~/.zprofile
|
||||
|
||||
Note, you don't have to type this in new terminals, since they will apply
|
||||
the changes from .zprofile automatically.
|
||||
|
||||
Note: the above assumes you use the default shell (zsh) that comes with
|
||||
MacOS. If you customized MacOS to use a different shell, you'll need to modify
|
||||
that shell's init file (.cshrc, .bashrc, etc.) instead with appropiate commands
|
||||
to modify the same environment variables.
|
||||
|
||||
5. Try running LAMMPS (which might fail, see step 7)
|
||||
|
||||
lmp -in ${LAMMPS_BENCH_DIR}/in.lj
|
||||
|
||||
6. Try running the LAMMPS GUI
|
||||
|
||||
lammps-gui ${LAMMPS_BENCH_DIR}/in.rhodo
|
||||
|
||||
Depending on the size and resolution of your screen, the fonts may
|
||||
be too small to read. This can be adjusted by setting the environment
|
||||
variable QT_FONT_DPI. The default value would be 72, so to increase
|
||||
the fonts by a third one can add to the .zprofile file the line
|
||||
|
||||
export QT_FONT_DPI=96
|
||||
|
||||
and reload as shown above.
|
||||
|
||||
7. Give permission to execute the commands (lmp, lammps-gui, msi2lmp, binary2txt, phana, stl_bin2txt)
|
||||
|
||||
MacOS will likely block the initial run of the executables, since they
|
||||
were downloaded from the internet and are missing a known signature from an
|
||||
identified developer. Go to "Settings" and search for "Security settings". It
|
||||
should display a message that an executable like "lmp" was blocked. Press
|
||||
"Open anyway", which might prompt you for your admin credentials. Afterwards
|
||||
"lmp" and the other executables should work as expected.
|
||||
77
cmake/packaging/build_linux_tgz.sh
Executable file
77
cmake/packaging/build_linux_tgz.sh
Executable file
@ -0,0 +1,77 @@
|
||||
#!/bin/bash
|
||||
|
||||
APP_NAME=lammps-gui
|
||||
DESTDIR=${PWD}/../LAMMPS_GUI
|
||||
|
||||
echo "Delete old files, if they exist"
|
||||
rm -rf ${DESTDIR} ../LAMMPS-Linux-amd64.tar.gz
|
||||
|
||||
echo "Create staging area for deployment and populate"
|
||||
DESTDIR=${DESTDIR} cmake --install . --prefix "/"
|
||||
|
||||
echo "Remove debug info"
|
||||
for s in ${DESTDIR}/bin/* ${DESTDIR}/lib/liblammps*
|
||||
do \
|
||||
test -f $s && strip --strip-debug $s
|
||||
done
|
||||
|
||||
echo "Remove libc, gcc, and X11 related shared libs"
|
||||
rm -f ${DESTDIR}/lib/ld*.so ${DESTDIR}/lib/ld*.so.[0-9]
|
||||
rm -f ${DESTDIR}/lib/lib{c,dl,rt,m,pthread}.so.?
|
||||
rm -f ${DESTDIR}/lib/lib{c,dl,rt,m,pthread}-[0-9].[0-9]*.so
|
||||
rm -f ${DESTDIR}/lib/libX* ${DESTDIR}/lib/libxcb*
|
||||
rm -f ${DESTDIR}/lib/libgcc_s*
|
||||
rm -f ${DESTDIR}/lib/libstdc++*
|
||||
|
||||
# get qt dir
|
||||
QTDIR=$(ldd ${DESTDIR}/bin/lammps-gui | grep libQt5Core | sed -e 's/^.*=> *//' -e 's/libQt5Core.so.*$/qt5/')
|
||||
cat > ${DESTDIR}/bin/qt.conf <<EOF
|
||||
[Paths]
|
||||
Plugins = ../qt5plugins
|
||||
EOF
|
||||
|
||||
# platform plugin
|
||||
mkdir -p ${DESTDIR}/qt5plugins/platforms
|
||||
cp ${QTDIR}/plugins/platforms/libqxcb.so ${DESTDIR}/qt5plugins/platforms
|
||||
|
||||
# get platform plugin dependencies
|
||||
QTDEPS=$(LD_LIBRARY_PATH=${DESTDIR}/lib ldd ${QTDIR}/plugins/platforms/libqxcb.so | grep -v ${DESTDIR} | grep libQt5 | sed -e 's/^.*=> *//' -e 's/\(libQt5.*.so.*\) .*$/\1/')
|
||||
for dep in ${QTDEPS}
|
||||
do \
|
||||
cp ${dep} ${DESTDIR}/lib
|
||||
done
|
||||
|
||||
echo "Add additional plugins for Qt"
|
||||
for dir in styles imageformats
|
||||
do \
|
||||
cp -r ${QTDIR}/plugins/${dir} ${DESTDIR}/qt5plugins/
|
||||
done
|
||||
|
||||
# get imageplugin dependencies
|
||||
for s in ${DESTDIR}/qt5plugins/imageformats/*.so
|
||||
do \
|
||||
QTDEPS=$(LD_LIBRARY_PATH=${DESTDIR}/lib ldd $s | grep -v ${DESTDIR} | grep -E '(libQt5|jpeg)' | sed -e 's/^.*=> *//' -e 's/\(lib.*.so.*\) .*$/\1/')
|
||||
for dep in ${QTDEPS}
|
||||
do \
|
||||
cp ${dep} ${DESTDIR}/lib
|
||||
done
|
||||
done
|
||||
|
||||
echo "Set up wrapper script"
|
||||
MYDIR=$(dirname "$0")
|
||||
cp ${MYDIR}/linux_wrapper.sh ${DESTDIR}/bin
|
||||
for s in ${DESTDIR}/bin/*
|
||||
do \
|
||||
EXE=$(basename $s)
|
||||
test ${EXE} = linux_wrapper.sh && continue
|
||||
test ${EXE} = qt.conf && continue
|
||||
ln -s bin/linux_wrapper.sh ${DESTDIR}/${EXE}
|
||||
done
|
||||
|
||||
pushd ..
|
||||
tar -czvvf LAMMPS-Linux-amd64.tar.gz LAMMPS_GUI
|
||||
popd
|
||||
|
||||
echo "Cleanup dir"
|
||||
rm -r ${DESTDIR}
|
||||
exit 0
|
||||
111
cmake/packaging/build_macos_dmg.sh
Executable file
111
cmake/packaging/build_macos_dmg.sh
Executable file
@ -0,0 +1,111 @@
|
||||
#!/bin/bash
|
||||
|
||||
APP_NAME=lammps-gui
|
||||
|
||||
echo "Delete old files, if they exist"
|
||||
rm -f ${APP_NAME}.dmg ${APP_NAME}-rw.dmg LAMMPS-macOS-multiarch.dmg
|
||||
|
||||
echo "Create initial dmg file with macdeployqt"
|
||||
macdeployqt lammps-gui.app -dmg
|
||||
echo "Create writable dmg file"
|
||||
hdiutil convert ${APP_NAME}.dmg -format UDRW -o ${APP_NAME}-rw.dmg
|
||||
|
||||
echo "Mount writeable DMG file in read-write mode. Keep track of device and volume names"
|
||||
DEVICE=$(hdiutil attach -readwrite -noverify ${APP_NAME}-rw.dmg | grep '^/dev/' | sed 1q | awk '{print $1}')
|
||||
VOLUME=$(df | grep ${DEVICE} | sed -e 's/^.*\(\/Volumes\/\)/\1/')
|
||||
sleep 2
|
||||
|
||||
echo "Create link to Application folder and move README and background image files"
|
||||
|
||||
pushd "${VOLUME}"
|
||||
ln -s /Applications .
|
||||
mv ${APP_NAME}.app/Contents/Resources/README.txt .
|
||||
mkdir .background
|
||||
mv ${APP_NAME}.app/Contents/Resources/LAMMPS_DMG_Background.png .background/background.png
|
||||
mv ${APP_NAME}.app LAMMPS.app
|
||||
cd LAMMPS.app/Contents
|
||||
|
||||
echo "Attach icons to LAMMPS console and GUI executables"
|
||||
echo "read 'icns' (-16455) \"Resources/lammps.icns\";" > icon.rsrc
|
||||
Rez -a icon.rsrc -o bin/lmp
|
||||
SetFile -a C bin/lmp
|
||||
Rez -a icon.rsrc -o MacOS/lammps-gui
|
||||
SetFile -a C MacOS/lammps-gui
|
||||
rm icon.rsrc
|
||||
popd
|
||||
|
||||
echo 'Tell the Finder to resize the window, set the background,'
|
||||
echo 'change the icon size, place the icons in the right position, etc.'
|
||||
echo '
|
||||
tell application "Finder"
|
||||
tell disk "'${APP_NAME}'"
|
||||
|
||||
-- wait for the image to finish mounting
|
||||
set open_attempts to 0
|
||||
repeat while open_attempts < 4
|
||||
try
|
||||
open
|
||||
delay 1
|
||||
set open_attempts to 5
|
||||
close
|
||||
on error errStr number errorNumber
|
||||
set open_attempts to open_attempts + 1
|
||||
delay 10
|
||||
end try
|
||||
end repeat
|
||||
delay 5
|
||||
|
||||
-- open the image the first time and save a .DS_Store
|
||||
-- just the background and icon setup
|
||||
open
|
||||
set current view of container window to icon view
|
||||
set theViewOptions to the icon view options of container window
|
||||
set background picture of theViewOptions to file ".background:background.png"
|
||||
set arrangement of theViewOptions to not arranged
|
||||
set icon size of theViewOptions to 64
|
||||
delay 5
|
||||
close
|
||||
|
||||
-- next set up the position of the app and Applications symlink
|
||||
-- plus hide all window decorations
|
||||
open
|
||||
update without registering applications
|
||||
tell container window
|
||||
set sidebar width to 0
|
||||
set statusbar visible to false
|
||||
set toolbar visible to false
|
||||
set the bounds to { 100, 40, 868, 640 }
|
||||
set position of item "'LAMMPS'.app" to { 190, 216 }
|
||||
set position of item "Applications" to { 576, 216 }
|
||||
set position of item "README.txt" to { 190, 400 }
|
||||
end tell
|
||||
update without registering applications
|
||||
delay 5
|
||||
close
|
||||
|
||||
-- one last open and close to check the results
|
||||
open
|
||||
delay 5
|
||||
close
|
||||
end tell
|
||||
delay 1
|
||||
end tell
|
||||
' | osascript
|
||||
|
||||
sync
|
||||
|
||||
echo "Unmount modified disk image and convert to compressed read-only image"
|
||||
hdiutil detach "${DEVICE}"
|
||||
hdiutil convert "${APP_NAME}-rw.dmg" -format UDZO -o "LAMMPS-macOS-multiarch.dmg"
|
||||
|
||||
echo "Attach icon to .dmg file"
|
||||
echo "read 'icns' (-16455) \"lammps-gui.app/Contents/Resources/lammps.icns\";" > icon.rsrc
|
||||
Rez -a icon.rsrc -o LAMMPS-macOS-multiarch.dmg
|
||||
SetFile -a C LAMMPS-macOS-multiarch.dmg
|
||||
rm icon.rsrc
|
||||
|
||||
echo "Delete temporary disk images"
|
||||
rm -f "${APP_NAME}-rw.dmg"
|
||||
rm -f "${APP_NAME}.dmg"
|
||||
|
||||
exit 0
|
||||
64
cmake/packaging/build_windows_cross_zip.sh
Executable file
64
cmake/packaging/build_windows_cross_zip.sh
Executable file
@ -0,0 +1,64 @@
|
||||
#!/bin/bash
|
||||
|
||||
APP_NAME=lammps-gui
|
||||
DESTDIR=${PWD}/LAMMPS_GUI
|
||||
SYSROOT="$1"
|
||||
|
||||
echo "Delete old files, if they exist"
|
||||
rm -rvf ${DESTDIR}/LAMMPS_GUI ${DESTDIR}/LAMMPS-Win10-amd64.zip
|
||||
|
||||
echo "Create staging area for deployment and populate"
|
||||
DESTDIR=${DESTDIR} cmake --install . --prefix "/"
|
||||
|
||||
# no static libs needed
|
||||
rm -rvf ${DESTDIR}/lib
|
||||
# but the LAMMPS lib
|
||||
|
||||
echo "Copying required DLL files"
|
||||
for dll in $(objdump -p *.exe *.dll | sed -n -e '/DLL Name:/s/^.*DLL Name: *//p' | sort | uniq)
|
||||
do \
|
||||
doskip=0
|
||||
for skip in ADVAPI32 CFGMGR32 GDI32 KERNEL32 MPR NETAPI32 PSAPI SHELL32 USER32 USERENV UxTheme VERSION WS2_32 WSOCK32 d3d11 dwmapi liblammps msvcrt_ole32
|
||||
do \
|
||||
test ${dll} = ${skip}.dll && doskip=1
|
||||
done
|
||||
test ${doskip} -eq 1 && continue
|
||||
test -f ${DESTDIR}/bin/${dll} || cp -v ${SYSROOT}/bin/${dll} ${DESTDIR}/bin
|
||||
done
|
||||
|
||||
echo "Copy required Qt plugins"
|
||||
mkdir -p ${DESTDIR}/qt5plugins
|
||||
for plugin in imageformats platforms styles
|
||||
do \
|
||||
cp -r ${SYSROOT}/lib/qt5/plugins/${plugin} ${DESTDIR}/qt5plugins/
|
||||
done
|
||||
|
||||
echo "Check dependencies of DLL files"
|
||||
for dll in $(objdump -p ${DESTDIR}/bin/*.dll ${DESTDIR}/qt5plugins/*/*.dll | sed -n -e '/DLL Name:/s/^.*DLL Name: *//p' | sort | uniq)
|
||||
do \
|
||||
doskip=0
|
||||
for skip in ADVAPI32 CFGMGR32 GDI32 KERNEL32 MPR NETAPI32 PSAPI SHELL32 USER32 USERENV UxTheme VERSION WS2_32 WSOCK32 d3d11 dwmapi liblammps msvcrt_ole32
|
||||
do \
|
||||
test ${dll} = ${skip}.dll && doskip=1
|
||||
done
|
||||
test ${doskip} -eq 1 && continue
|
||||
test -f ${DESTDIR}/bin/${dll} || cp -v ${SYSROOT}/bin/${dll} ${DESTDIR}/bin
|
||||
done
|
||||
|
||||
for dll in $(objdump -p ${DESTDIR}/bin/*.dll ${DESTDIR}/qt5plugins/*/*.dll | sed -n -e '/DLL Name:/s/^.*DLL Name: *//p' | sort | uniq)
|
||||
do \
|
||||
doskip=0
|
||||
for skip in ADVAPI32 CFGMGR32 GDI32 KERNEL32 MPR NETAPI32 PSAPI SHELL32 USER32 USERENV UxTheme VERSION WS2_32 WSOCK32 d3d11 dwmapi liblammps msvcrt_ole32
|
||||
do \
|
||||
test ${dll} = ${skip}.dll && doskip=1
|
||||
done
|
||||
test ${doskip} -eq 1 && continue
|
||||
test -f ${DESTDIR}/bin/${dll} || cp -v ${SYSROOT}/bin/${dll} ${DESTDIR}/bin
|
||||
done
|
||||
|
||||
cat > ${DESTDIR}/bin/qt.conf <<EOF
|
||||
[Paths]
|
||||
Plugins = ../qt5plugins
|
||||
EOF
|
||||
zip -9rvD LAMMPS-Win10-amd64.zip LAMMPS_GUI
|
||||
|
||||
28
cmake/packaging/build_windows_vs.cmake
Normal file
28
cmake/packaging/build_windows_vs.cmake
Normal file
@ -0,0 +1,28 @@
|
||||
# CMake script to be run post installation to build zipped package
|
||||
|
||||
# clean up old zipfile and deployment tree
|
||||
file(REMOVE LAMMPS-Win10-amd64.zip)
|
||||
file(REMOVE_RECURSE LAMMPS_GUI)
|
||||
file(RENAME ${INSTNAME} LAMMPS_GUI)
|
||||
|
||||
# move all executables and dlls to main folder and delete bin folder
|
||||
file(GLOB BINFILES LIST_DIRECTORIES FALSE LAMMPS_GUI/bin/*.exe LAMMPS_GUI/bin/*.dll)
|
||||
foreach(bin ${BINFILES})
|
||||
get_filename_component(exe ${bin} NAME)
|
||||
file(RENAME ${bin} LAMMPS_GUI/${exe})
|
||||
endforeach()
|
||||
file(REMOVE_RECURSE LAMMPS_GUI/bin)
|
||||
|
||||
# create qt.conf so Qt will find its plugins
|
||||
file(WRITE LAMMPS_GUI/qt.conf "[Paths]\r\nPlugins = qt5plugins\r\n")
|
||||
|
||||
# initialize environment and then run windeployqt to populate folder with missing dependencies and Qt plugins
|
||||
file(WRITE qtdeploy.bat "@ECHO OFF\r\nset VSCMD_DEBUG=0\r\nCALL ${VC_INIT} x64\r\nset PATH=${QT5_BIN_DIR};%PATH%\r\nwindeployqt --plugindir LAMMPS_GUI/qt5plugins --release LAMMPS_GUI/lammps-gui.exe --no-quick-import --no-webkit2 --no-translations --no-system-d3d-compiler --no-angle --no-opengl-sw\r\n")
|
||||
execute_process(COMMAND cmd.exe /c qtdeploy.bat COMMAND_ECHO STDERR)
|
||||
file(REMOVE qtdeploy.bat)
|
||||
|
||||
# create zip archive
|
||||
file(WRITE makearchive.ps1 "Compress-Archive -Path LAMMPS_GUI -CompressionLevel Optimal -DestinationPath LAMMPS-Win10-amd64.zip")
|
||||
execute_process(COMMAND powershell -ExecutionPolicy Bypass -File makearchive.ps1)
|
||||
file(REMOVE makearchive.ps1)
|
||||
file(REMOVE_RECURSE LAMMPS_GUI)
|
||||
BIN
cmake/packaging/lammps-icon-1024x1024.png
Normal file
BIN
cmake/packaging/lammps-icon-1024x1024.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 598 KiB |
BIN
cmake/packaging/lammps.icns
Normal file
BIN
cmake/packaging/lammps.icns
Normal file
Binary file not shown.
18
cmake/packaging/linux_wrapper.sh
Executable file
18
cmake/packaging/linux_wrapper.sh
Executable file
@ -0,0 +1,18 @@
|
||||
#!/bin/sh
|
||||
# wrapper for bundled executables
|
||||
|
||||
# reset locale to avoid problems with decimal numbers
|
||||
export LC_ALL=C
|
||||
|
||||
BASEDIR=$(dirname "$0")
|
||||
EXENAME=$(basename "$0")
|
||||
|
||||
# append to LD_LIBRARY_PATH to prefer local (newer) libs
|
||||
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${BASEDIR}/lib
|
||||
|
||||
# set some environment variables for LAMMPS etc.
|
||||
LAMMPS_POTENTIALS=${BASEDIR}/share/lammps/potentials
|
||||
MSI2LMP_LIBRARY=${BASEDIR}/share/lammps/frc_files
|
||||
export LD_LIBRARY_PATH LAMMPS_POTENTIALS MSI2LMP_LIBRARY
|
||||
|
||||
exec "${BASEDIR}/bin/${EXENAME}" "$@"
|
||||
30
cmake/packaging/png2iconset.sh
Executable file
30
cmake/packaging/png2iconset.sh
Executable file
@ -0,0 +1,30 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ $# != 2 ]
|
||||
then
|
||||
echo "usage: $0 <pngfile> <iconset name>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
png="$1"
|
||||
ico="$2"
|
||||
|
||||
if [ ! -f ${png} ]
|
||||
then
|
||||
echo "PNG Image $1 not found"
|
||||
fi
|
||||
|
||||
rm -rf ${ico}.iconset
|
||||
mkdir ${ico}.iconset
|
||||
sips -z 16 16 ${png} --out ${ico}.iconset/icon_16x16.png
|
||||
sips -z 32 32 ${png} --out ${ico}.iconset/icon_16x16@2x.png
|
||||
sips -z 32 32 ${png} --out ${ico}.iconset/icon_32x32.png
|
||||
sips -z 64 64 ${png} --out ${ico}.iconset/icon_32x32@2x.png
|
||||
sips -z 128 128 ${png} --out ${ico}.iconset/icon_128x128.png
|
||||
sips -z 256 256 ${png} --out ${ico}.iconset/icon_128x128@2x.png
|
||||
sips -z 256 256 ${png} --out ${ico}.iconset/icon_256x256.png
|
||||
sips -z 512 512 ${png} --out ${ico}.iconset/icon_256x256@2x.png
|
||||
sips -z 512 512 ${png} --out ${ico}.iconset/icon_512x512.png
|
||||
sips -z 1024 1024 ${png} --out ${ico}.iconset/icon_512x512@2x.png
|
||||
iconutil -c icns ${ico}.iconset
|
||||
rm -rf ${ico}.iconset
|
||||
@ -43,7 +43,6 @@ set(ALL_PACKAGES
|
||||
KOKKOS
|
||||
KSPACE
|
||||
LATBOLTZ
|
||||
LATTE
|
||||
LEPTON
|
||||
MACHDYN
|
||||
MANIFOLD
|
||||
|
||||
@ -45,7 +45,6 @@ set(ALL_PACKAGES
|
||||
KOKKOS
|
||||
KSPACE
|
||||
LATBOLTZ
|
||||
LATTE
|
||||
LEPTON
|
||||
MACHDYN
|
||||
MANIFOLD
|
||||
|
||||
@ -1,14 +1,13 @@
|
||||
# Preset that turns on packages with automatic downloads of sources or potentials.
|
||||
# Compilation of libraries like Plumed or ScaFaCoS can take a considerable amount of time.
|
||||
|
||||
set(ALL_PACKAGES KIM LATTE MSCG VORONOI PLUMED SCAFACOS MACHDYN MESONT MDI ML-PACE)
|
||||
set(ALL_PACKAGES KIM MSCG VORONOI PLUMED SCAFACOS MACHDYN MESONT MDI ML-PACE)
|
||||
|
||||
foreach(PKG ${ALL_PACKAGES})
|
||||
set(PKG_${PKG} ON CACHE BOOL "" FORCE)
|
||||
endforeach()
|
||||
|
||||
set(DOWNLOAD_KIM ON CACHE BOOL "" FORCE)
|
||||
set(DOWNLOAD_LATTE ON CACHE BOOL "" FORCE)
|
||||
set(DOWNLOAD_MDI ON CACHE BOOL "" FORCE)
|
||||
set(DOWNLOAD_MSCG ON CACHE BOOL "" FORCE)
|
||||
set(DOWNLOAD_VORO ON CACHE BOOL "" FORCE)
|
||||
|
||||
14
cmake/presets/macos-multiarch.cmake
Normal file
14
cmake/presets/macos-multiarch.cmake
Normal file
@ -0,0 +1,14 @@
|
||||
# preset that will build portable multi-arch binaries on macOS without MPI
|
||||
|
||||
set(CMAKE_OSX_ARCHITECTURES "arm64;x86_64" CACHE STRING "" FORCE)
|
||||
set(CMAKE_OSX_DEPLOYMENT_TARGET 11.0 CACHE STRING "" FORCE)
|
||||
set(CMAKE_BUILD_TYPE Release CACHE STRING "" FORCE)
|
||||
|
||||
set(CMAKE_CXX_COMPILER "clang++" CACHE STRING "" FORCE)
|
||||
set(CMAKE_C_COMPILER "clang" CACHE STRING "" FORCE)
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG" CACHE STRING "" FORCE)
|
||||
set(CMAKE_C_FLAGS_RELEASE "-O3 -DNDEBUG" CACHE STRING "" FORCE)
|
||||
|
||||
set(BUILD_MPI FALSE CACHE BOOL "" FORCE)
|
||||
set(BUILD_SHARED_LIBS FALSE CACHE BOOL "" FORCE)
|
||||
set(LAMMPS_EXCEPTIONS TRUE CACHE BOOL "" FORCE)
|
||||
@ -35,7 +35,6 @@ set(WIN_PACKAGES
|
||||
INTEL
|
||||
INTERLAYER
|
||||
KSPACE
|
||||
LATTE
|
||||
LEPTON
|
||||
MACHDYN
|
||||
MANIFOLD
|
||||
|
||||
@ -12,7 +12,6 @@ set(PACKAGES_WITH_LIB
|
||||
KIM
|
||||
KOKKOS
|
||||
LATBOLTZ
|
||||
LATTE
|
||||
LEPTON
|
||||
MACHDYN
|
||||
MDI
|
||||
|
||||
@ -32,6 +32,7 @@ set(WIN_PACKAGES
|
||||
INTERLAYER
|
||||
KSPACE
|
||||
LEPTON
|
||||
MACHDYN
|
||||
MANIFOLD
|
||||
MANYBODY
|
||||
MC
|
||||
@ -45,6 +46,7 @@ set(WIN_PACKAGES
|
||||
MOLECULE
|
||||
MOLFILE
|
||||
OPENMP
|
||||
OPT
|
||||
ORIENT
|
||||
PERI
|
||||
PHONON
|
||||
|
||||
24
doc/Makefile
24
doc/Makefile
@ -94,10 +94,11 @@ html: xmlgen $(VENV) $(SPHINXCONFIG)/conf.py $(ANCHORCHECK) $(MATHJAX)
|
||||
rm -f $(BUILDDIR)/doxygen/xml/run.stamp;\
|
||||
echo "############################################" ; env PYTHONWARNINGS= PYTHONDONTWRITEBYTECODE=1 \
|
||||
rst_anchor_check src/*.rst ;\
|
||||
python $(BUILDDIR)/utils/check-packages.py -s ../src -d src ;\
|
||||
$(PYTHON) $(BUILDDIR)/utils/check-packages.py -s ../src -d src ;\
|
||||
env LC_ALL=C grep -n '[^ -~]' $(RSTDIR)/*.rst ;\
|
||||
env LC_ALL=C grep -n ' :[a-z]\+`' $(RSTDIR)/*.rst ;\
|
||||
python $(BUILDDIR)/utils/check-styles.py -s ../src -d src ;\
|
||||
env LC_ALL=C grep -n ' `[^`]\+<[a-z][^`]\+`[^_]' $(RSTDIR)/*.rst ;\
|
||||
$(PYTHON) $(BUILDDIR)/utils/check-styles.py -s ../src -d src ;\
|
||||
echo "############################################" ;\
|
||||
deactivate ;\
|
||||
)
|
||||
@ -174,10 +175,11 @@ pdf: xmlgen $(VENV) $(SPHINXCONFIG)/conf.py $(ANCHORCHECK)
|
||||
rm -f $(BUILDDIR)/doxygen/xml/run.stamp;\
|
||||
echo "############################################" ; env PYTHONWARNINGS= PYTHONDONTWRITEBYTECODE=1 \
|
||||
rst_anchor_check src/*.rst ;\
|
||||
python utils/check-packages.py -s ../src -d src ;\
|
||||
$(PYTHON) utils/check-packages.py -s ../src -d src ;\
|
||||
env LC_ALL=C grep -n '[^ -~]' $(RSTDIR)/*.rst ;\
|
||||
env LC_ALL=C grep -n ' :[a-z]\+`' $(RSTDIR)/*.rst ;\
|
||||
python utils/check-styles.py -s ../src -d src ;\
|
||||
env LC_ALL=C grep -n ' `[^`]\+<[a-z][^`]\+`[^_]' $(RSTDIR)/*.rst ;\
|
||||
$(PYTHON) utils/check-styles.py -s ../src -d src ;\
|
||||
echo "############################################" ;\
|
||||
deactivate ;\
|
||||
)
|
||||
@ -208,14 +210,14 @@ anchor_check : $(ANCHORCHECK)
|
||||
style_check : $(VENV)
|
||||
@(\
|
||||
. $(VENV)/bin/activate ; env PYTHONWARNINGS= PYTHONDONTWRITEBYTECODE=1 \
|
||||
python utils/check-styles.py -s ../src -d src ;\
|
||||
$(PYTHON) utils/check-styles.py -s ../src -d src ;\
|
||||
deactivate ;\
|
||||
)
|
||||
|
||||
package_check : $(VENV)
|
||||
@(\
|
||||
. $(VENV)/bin/activate ; env PYTHONWARNINGS= PYTHONDONTWRITEBYTECODE=1 \\
|
||||
python utils/check-packages.py -s ../src -d src ;\
|
||||
. $(VENV)/bin/activate ; env PYTHONWARNINGS= PYTHONDONTWRITEBYTECODE=1 \
|
||||
$(PYTHON) utils/check-packages.py -s ../src -d src ;\
|
||||
deactivate ;\
|
||||
)
|
||||
|
||||
@ -224,6 +226,14 @@ char_check :
|
||||
|
||||
role_check :
|
||||
@( env LC_ALL=C grep -n ' :[a-z]\+`' $(RSTDIR)/*.rst && exit 1 || : )
|
||||
@( env LC_ALL=C grep -n ' `[^`]\+<[a-z][^`]\+`[^_]' $(RSTDIR)/*.rst && exit 1 || : )
|
||||
|
||||
link_check : $(VENV) html
|
||||
@(\
|
||||
. $(VENV)/bin/activate ; env PYTHONWARNINGS= PYTHONDONTWRITEBYTECODE=1 \
|
||||
linkchecker -F html --check-extern html/Manual.html ;\
|
||||
deactivate ;\
|
||||
)
|
||||
|
||||
xmlgen : doxygen/xml/index.xml
|
||||
|
||||
|
||||
@ -1,12 +1,12 @@
|
||||
# Outline of the GitHub Development Workflow
|
||||
|
||||
This purpose of this document is to provide a point of reference for the
|
||||
The purpose of this document is to provide a point of reference for the
|
||||
core LAMMPS developers and other LAMMPS contributors to understand the
|
||||
choices the LAMMPS developers have agreed on. Git and GitHub provide the
|
||||
tools, but do not set policies, so it is up to the developers to come to
|
||||
an agreement as to how to define and interpret policies. This document
|
||||
is likely to change as our experiences and needs change and we try to
|
||||
adapt accordingly. Last change 2021-09-02.
|
||||
is likely to change as our experiences and needs change, and we try to
|
||||
adapt it accordingly. Last change 2023-02-10.
|
||||
|
||||
## Table of Contents
|
||||
|
||||
@ -22,47 +22,50 @@ adapt accordingly. Last change 2021-09-02.
|
||||
## GitHub Merge Management
|
||||
|
||||
In the interest of consistency, ONLY ONE of the core LAMMPS developers
|
||||
should doing the merging itself. This is currently
|
||||
should do the merging. This is currently
|
||||
[@akohlmey](https://github.com/akohlmey) (Axel Kohlmeyer). If this
|
||||
assignment needs to be changed, it shall be done right after a stable
|
||||
release. If the currently assigned developer cannot merge outstanding
|
||||
pull requests in a timely manner, or in other extenuating circumstances,
|
||||
other core LAMMPS developers with merge rights can merge pull requests,
|
||||
when necessary.
|
||||
other core LAMMPS developers with merge permission may merge pull
|
||||
requests.
|
||||
|
||||
## Pull Requests
|
||||
|
||||
ALL changes to the LAMMPS code and documentation, however trivial, MUST
|
||||
be submitted as a pull request to GitHub. All changes to the "develop"
|
||||
branch must be made exclusively through merging pull requests. The
|
||||
"release" and "stable" branches, respectively are only to be updated
|
||||
upon patch or stable releases with fast-forward merges based on the
|
||||
associated tags. Pull requests may also be submitted to (long-running)
|
||||
feature branches created by LAMMPS developers inside the LAMMPS project,
|
||||
if needed. Those are not subject to the merge and review restrictions
|
||||
discussed in this document, though, but get managed as needed on a
|
||||
case-by-case basis.
|
||||
*ALL* changes to the LAMMPS code and documentation, however trivial,
|
||||
MUST be submitted as a pull request to GitHub. All changes to the
|
||||
"develop" branch must be made exclusively through merging pull requests.
|
||||
The "release" and "stable" branches, respectively, are only to be
|
||||
updated upon feature or stable releases based on the associated
|
||||
tags. Updates to the stable release in between stable releases
|
||||
(for example, back-ported bug fixes) are first merged into the "maintenance"
|
||||
branch and then into the "stable" branch as update releases.
|
||||
|
||||
Pull requests may also be submitted to (long-running) feature branches
|
||||
created by LAMMPS developers inside the LAMMPS project, if needed. Those
|
||||
are not subject to the merge and review restrictions discussed in this
|
||||
document, though, but get managed as needed on a case-by-case basis.
|
||||
|
||||
### Pull Request Assignments
|
||||
|
||||
Pull requests can be "chaperoned" by one of the LAMMPS core developers.
|
||||
This is indicated by who the pull request is assigned to. LAMMPS core
|
||||
developers can self-assign or they can decide to assign a pull request
|
||||
This is indicated by whom the pull request is assigned to. LAMMPS core
|
||||
developers can self-assign, or they can decide to assign a pull request
|
||||
to a different LAMMPS developer. Being assigned to a pull request means,
|
||||
that this pull request may need some work and the assignee is tasked to
|
||||
determine whether this might be needed or not, and may either implement
|
||||
the required changes or ask the submitter of the pull request to implement
|
||||
them. Even though, all LAMMPS developers may have write access to pull
|
||||
requests (if enabled by the submitter, which is the default), only the
|
||||
submitter or the assignee of a pull request may do so. During this
|
||||
period the `work_in_progress` label may be applied to the pull
|
||||
request. The assignee gets to decide what happens to the pull request
|
||||
next, e.g. whether it should be assigned to a different developer for
|
||||
additional checks and changes, or is recommended to be merged. Removing
|
||||
the `work_in_progress` label and assigning the pull request to the
|
||||
developer tasked with merging signals that a pull request is ready to be
|
||||
merged. In addition, a `ready_for_merge` label may also be assigned
|
||||
to signal urgency to merge this pull request quickly.
|
||||
determine whether this might be needed or not. The assignee may either
|
||||
choose to implement required changes or ask the submitter of the pull
|
||||
request to implement them. Even though, all LAMMPS developers may have
|
||||
write access to pull requests (if enabled by the submitter, which is the
|
||||
default), only the submitter or the assignee of a pull request should do
|
||||
so. During this period, the `work_in_progress` label may be applied to
|
||||
the pull request. The assignee gets to decide what happens to the pull
|
||||
request next, e.g. whether it should be assigned to a different
|
||||
developer for additional checks and changes, or is recommended to be
|
||||
merged. Removing the `work_in_progress` label and assigning the pull
|
||||
request to the developer tasked with merging signals that a pull request
|
||||
is ready to be merged. In addition, a `ready_for_merge` label may also
|
||||
be assigned to signal urgency to merge this pull request quickly.
|
||||
|
||||
### Pull Request Reviews
|
||||
|
||||
@ -70,32 +73,33 @@ People can be assigned to review a pull request in two ways:
|
||||
|
||||
* They can be assigned manually to review a pull request
|
||||
by the submitter or a LAMMPS developer
|
||||
* They can be automatically assigned, because a developers matches
|
||||
a file pattern in the `.github/CODEOWNERS` file, which associates
|
||||
developers with the code they contributed and maintain.
|
||||
* They can be automatically assigned, because a developer's GitHub
|
||||
handle matches a file pattern in the `.github/CODEOWNERS` file,
|
||||
which associates developers with the code they contributed and
|
||||
maintain.
|
||||
|
||||
Reviewers are requested to state their appraisal of the proposed changes
|
||||
and either approve or request changes. People may unassign themselves
|
||||
from review, if they feel not competent about the changes proposed. At
|
||||
least two approvals from LAMMPS developers with write access are required
|
||||
before merging in addition to the automated compilation tests.
|
||||
Merging counts as implicit approval, so does submission of a pull request
|
||||
(by a LAMMPS developer). So the person doing the merge may not also submit
|
||||
an approving review. The feature, that reviews from code owners are "hard"
|
||||
reviews (i.e. they must all be approved before merging is allowed), is
|
||||
currently disabled and it is in the discretion of the merge maintainer to
|
||||
assess when a sufficient degree of approval, especially from external
|
||||
contributors, has been reached in these cases. Reviews may be
|
||||
(automatically) dismissed, when the reviewed code has been changed,
|
||||
and then approval is required a second time.
|
||||
least two approvals from LAMMPS developers with write access are
|
||||
required before merging, in addition to passing all automated
|
||||
compilation and unit tests. Merging counts as implicit approval, so
|
||||
does submission of a pull request (by a LAMMPS developer). So the person
|
||||
doing the merge may not also submit an approving review. The GitHub
|
||||
feature, that reviews from code owners are "hard" reviews (i.e. they
|
||||
must all approve before merging is allowed), is currently disabled.
|
||||
It is in the discretion of the merge maintainer to assess when a
|
||||
sufficient degree of approval has been reached, especially from external
|
||||
collaborators. Reviews may be (automatically) dismissed, when the
|
||||
reviewed code has been changed. Review may be requested a second time.
|
||||
|
||||
### Pull Request Discussions
|
||||
|
||||
All discussions about a pull request should be kept as much as possible
|
||||
on the pull request discussion page on GitHub, so that other developers
|
||||
can later review the entire discussion after the fact and understand the
|
||||
rationale behind choices made. Exceptions to this policy are technical
|
||||
discussions, that are centered on tools or policies themselves
|
||||
rationale behind choices that were made. Exceptions to this policy are
|
||||
technical discussions, that are centered on tools or policies themselves
|
||||
(git, GitHub, c++) rather than on the content of the pull request.
|
||||
|
||||
## GitHub Issues
|
||||
@ -109,39 +113,47 @@ marker in the subject. This is automatically done when using the
|
||||
corresponding template for submitting an issue. Issues may be assigned
|
||||
to one or more developers, if they are working on this feature or
|
||||
working to resolve an issue. Issues that have nobody working
|
||||
on them at the moment or in the near future, have the label
|
||||
on them at the moment, or in the near future, have the label
|
||||
`volunteer needed` attached.
|
||||
|
||||
When an issue, say `#125` is resolved by a specific pull request,
|
||||
the comment for the pull request shall contain the text `closes #125`
|
||||
or `fixes #125`, so that the issue is automatically deleted when
|
||||
the pull request is merged. The template for pull requests includes
|
||||
a header where connections between pull requests and issues can be listed
|
||||
and thus were this comment should be placed.
|
||||
When an issue, say `#125` is resolved by a specific pull request, the
|
||||
comment for the pull request shall contain the text `closes #125` or
|
||||
`fixes #125`, so that the issue is automatically deleted when the pull
|
||||
request is merged. The template for pull requests includes a header
|
||||
where connections between pull requests and issues can be listed, and
|
||||
thus where this comment should be placed.
|
||||
|
||||
## Milestones and Release Planning
|
||||
## Release Planning
|
||||
|
||||
LAMMPS uses a continuous release development model with incremental
|
||||
changes, i.e. significant effort is made - including automated pre-merge
|
||||
testing - that the code in the branch "develop" does not get easily
|
||||
changes, i.e. significant effort is made -- including automated pre-merge
|
||||
testing -- that the code in the branch "develop" does not get easily
|
||||
broken. These tests are run after every update to a pull request. More
|
||||
extensive and time consuming tests (including regression testing) are
|
||||
performed after code is merged to the "develop" branch. There are patch
|
||||
releases of LAMMPS every 3-5 weeks at a point, when the LAMMPS
|
||||
developers feel, that a sufficient amount of changes have happened, and
|
||||
the post-merge testing has been successful. These patch releases are
|
||||
extensive and time-consuming tests (including regression testing) are
|
||||
performed after code is merged to the "develop" branch. There are feature
|
||||
releases of LAMMPS made about every 4-6 weeks at a point, when the LAMMPS
|
||||
developers feel, that a sufficient number of changes have been included
|
||||
and all post-merge testing has been successful. These feature releases are
|
||||
marked with a `patch_<version date>` tag and the "release" branch
|
||||
follows only these versions (and thus is always supposed to be of
|
||||
production quality, unlike "develop", which may be temporary broken, in
|
||||
the case of larger change sets or unexpected incompatibilities or side
|
||||
effects.
|
||||
follows only these versions with fast-forward merges. While "develop" may
|
||||
be temporarily broken through issues only detected by the post-merge tests,
|
||||
The "release" branch is always supposed to be of production quality.
|
||||
|
||||
About 1-2 times each year, there are going to be "stable" releases of
|
||||
LAMMPS. These have seen additional, manual testing and review of
|
||||
results from testing with instrumented code and static code analysis.
|
||||
Also, the last 1-3 patch releases before a stable release are "release
|
||||
candidate" versions which only contain bugfixes and documentation
|
||||
updates. For release planning and the information of code contributors,
|
||||
issues and pull requests being actively worked on are assigned a
|
||||
"milestone", which corresponds to the next stable release or the stable
|
||||
release after that, with a tentative release date.
|
||||
About once each year, there is a "stable" release of LAMMPS. These have
|
||||
seen additional, manual testing and review of results from testing with
|
||||
instrumented code and static code analysis. Also, the last few feature
|
||||
releases before a stable release are "release candidate" versions which
|
||||
only contain bug fixes, feature additions to peripheral functionality,
|
||||
and documentation updates. In between stable releases, bug fixes and
|
||||
infrastructure updates are back-ported from the "develop" branch to the
|
||||
"maintenance" branch and occasionally merged into "stable" and published
|
||||
as update releases.
|
||||
|
||||
## Project Management
|
||||
|
||||
For release planning and the information of code contributors, issues
|
||||
and pull requests are being managed with GitHub Project Boards. There
|
||||
are currently three boards: LAMMPS Feature Requests, LAMMPS Bug Reports,
|
||||
and LAMMPS Pull Requests. Each board is organized in columns where
|
||||
submissions are categorized. Within each column the entries are
|
||||
(manually) sorted according their priority.
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
.TH LAMMPS "1" "8 February 2023" "2023-02-08"
|
||||
.TH LAMMPS "1" "2 August 2023" "2023-08-2"
|
||||
.SH NAME
|
||||
.B LAMMPS
|
||||
\- Molecular Dynamics Simulator. Version 8 February 2023
|
||||
\- Molecular Dynamics Simulator. Version 2 August 2023
|
||||
|
||||
.SH SYNOPSIS
|
||||
.B lmp
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
.TH MSI2LMP "1" "v3.9.9" "2018-11-05"
|
||||
.TH MSI2LMP "1" "v3.9.10" "2023-03-10"
|
||||
.SH NAME
|
||||
.B MSI2LMP
|
||||
\- Converter for Materials Studio files to LAMMPS
|
||||
|
||||
.SH SYNOPSIS
|
||||
.B msi2lmp
|
||||
<ROOTNAME> [-class <I|1|II|2|O|0>] [-frc <path to frc file>] [-print #] [-ignore] [-nocenter] [-oldstyle] [-shift <x> <y> <z>]
|
||||
[-help] <ROOTNAME> [-class <I|1|II|2|O|0>] [-frc <path to frc file>] [-print #] [-ignore] [-nocenter] [-oldstyle] [-shift <x> <y> <z>]
|
||||
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
@ -22,6 +22,9 @@ needed between .frc and .car/.mdf files are the atom types.
|
||||
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
\fB\-h\fR, \fB\-help\fR,
|
||||
Print detailed help message to the screen and stop.
|
||||
.TP
|
||||
\fB\<ROOTNAME>\fR
|
||||
This has to be the first argument and is a
|
||||
.B mandatory
|
||||
|
||||
@ -203,7 +203,7 @@ Bibliography
|
||||
A Caro, DA Crowson, M Caro; Phys Rev Lett, 95, 075702 (2005)
|
||||
|
||||
**(CasP)**
|
||||
CasP webpage: https://www.helmholtz-berlin.de/people/gregor-schiwietz/casp_en.html
|
||||
CasP webpage: http://www.casp-program.org/
|
||||
|
||||
**(Cawkwell2012)**
|
||||
A.\ M. N. Niklasson, M. J. Cawkwell, Phys. Rev. B, 86 (17), 174308 (2012).
|
||||
|
||||
@ -128,14 +128,14 @@ and adds vectorization support when compiled with compatible compilers,
|
||||
in particular the Intel compilers on top of OpenMP. Also, the ``KOKKOS``
|
||||
package can be compiled to include OpenMP threading.
|
||||
|
||||
In addition, there are a few commands in LAMMPS that have native OpenMP
|
||||
support included as well. These are commands in the ``MPIIO``,
|
||||
``ML-SNAP``, ``DIFFRACTION``, and ``DPD-REACT`` packages. Furthermore,
|
||||
some packages support OpenMP threading indirectly through the libraries
|
||||
they interface to: e.g. ``LATTE``, ``KSPACE``, and ``COLVARS``. See the
|
||||
:doc:`Packages details <Packages_details>` page for more info on these
|
||||
packages, and the pages for their respective commands for OpenMP
|
||||
threading info.
|
||||
In addition, there are a few commands in LAMMPS that have native
|
||||
OpenMP support included as well. These are commands in the ``MPIIO``,
|
||||
``ML-SNAP``, ``DIFFRACTION``, and ``DPD-REACT`` packages.
|
||||
Furthermore, some packages support OpenMP threading indirectly through
|
||||
the libraries they interface to: e.g. ``KSPACE``, and ``COLVARS``.
|
||||
See the :doc:`Packages details <Packages_details>` page for more info
|
||||
on these packages, and the pages for their respective commands for
|
||||
OpenMP threading info.
|
||||
|
||||
For CMake, if you use ``BUILD_OMP=yes``, you can use these packages
|
||||
and turn on their native OpenMP support and turn on their native OpenMP
|
||||
@ -489,8 +489,9 @@ using CMake or Make.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
-D BUILD_TOOLS=value # yes or no (default)
|
||||
-D BUILD_LAMMPS_SHELL=value # yes or no (default)
|
||||
-D BUILD_TOOLS=value # yes or no (default). Build binary2txt, chain.x, micelle2d.x, msi2lmp, phana, stl_bin2txt
|
||||
-D BUILD_LAMMPS_SHELL=value # yes or no (default). Build lammps-shell
|
||||
-D BUILD_LAMMPS_GUI=value # yes or no (default). Build lammps-gui
|
||||
|
||||
The generated binaries will also become part of the LAMMPS installation
|
||||
(see below).
|
||||
@ -504,7 +505,6 @@ using CMake or Make.
|
||||
make binary2txt # build only binary2txt tool
|
||||
make chain # build only chain tool
|
||||
make micelle2d # build only micelle2d tool
|
||||
make thermo_extract # build only thermo_extract tool
|
||||
|
||||
cd lammps/tools/lammps-shell
|
||||
make # build LAMMPS shell
|
||||
|
||||
@ -523,6 +523,8 @@ The following options are available.
|
||||
These should help to make source and documentation files conforming
|
||||
to some the coding style preferences of the LAMMPS developers.
|
||||
|
||||
.. _clang-format:
|
||||
|
||||
Clang-format support
|
||||
--------------------
|
||||
|
||||
|
||||
@ -43,7 +43,6 @@ This is the list of packages that may require additional steps.
|
||||
* :ref:`INTEL <intel>`
|
||||
* :ref:`KIM <kim>`
|
||||
* :ref:`KOKKOS <kokkos>`
|
||||
* :ref:`LATTE <latte>`
|
||||
* :ref:`LEPTON <lepton>`
|
||||
* :ref:`MACHDYN <machdyn>`
|
||||
* :ref:`MDI <mdi>`
|
||||
@ -141,6 +140,8 @@ CMake build
|
||||
# value = yes or no (default)
|
||||
-D CUDA_MPS_SUPPORT=value # enables some tweaks required to run with active nvidia-cuda-mps daemon
|
||||
# value = yes or no (default)
|
||||
-D CUDA_BUILD_MULTIARCH=value # enables building CUDA kernels for all supported GPU architectures
|
||||
# value = yes (default) or no
|
||||
-D USE_STATIC_OPENCL_LOADER=value # downloads/includes OpenCL ICD loader library, no local OpenCL headers/libs needed
|
||||
# value = yes (default) or no
|
||||
|
||||
@ -159,38 +160,49 @@ CMake build
|
||||
A more detailed list can be found, for example,
|
||||
at `Wikipedia's CUDA article <https://en.wikipedia.org/wiki/CUDA#GPUs_supported>`_
|
||||
|
||||
CMake can detect which version of the CUDA toolkit is used and thus will try
|
||||
to include support for **all** major GPU architectures supported by this toolkit.
|
||||
Thus the GPU_ARCH setting is merely an optimization, to have code for
|
||||
the preferred GPU architecture directly included rather than having to wait
|
||||
for the JIT compiler of the CUDA driver to translate it.
|
||||
CMake can detect which version of the CUDA toolkit is used and thus will
|
||||
try to include support for **all** major GPU architectures supported by
|
||||
this toolkit. Thus the GPU_ARCH setting is merely an optimization, to
|
||||
have code for the preferred GPU architecture directly included rather
|
||||
than having to wait for the JIT compiler of the CUDA driver to translate
|
||||
it. This behavior can be turned off (e.g. to speed up compilation) by
|
||||
setting :code:`CUDA_ENABLE_MULTIARCH` to :code:`no`.
|
||||
|
||||
When compiling for CUDA or HIP with CUDA, version 8.0 or later of the CUDA toolkit
|
||||
is required and a GPU architecture of Kepler or later, which must *also* be
|
||||
supported by the CUDA toolkit in use **and** the CUDA driver in use.
|
||||
When compiling for OpenCL, OpenCL version 1.2 or later is required and the
|
||||
GPU must be supported by the GPU driver and OpenCL runtime bundled with the driver.
|
||||
When compiling for CUDA or HIP with CUDA, version 8.0 or later of the
|
||||
CUDA toolkit is required and a GPU architecture of Kepler or later,
|
||||
which must *also* be supported by the CUDA toolkit in use **and** the
|
||||
CUDA driver in use. When compiling for OpenCL, OpenCL version 1.2 or
|
||||
later is required and the GPU must be supported by the GPU driver and
|
||||
OpenCL runtime bundled with the driver.
|
||||
|
||||
When building with CMake, you **must NOT** build the GPU library in ``lib/gpu``
|
||||
using the traditional build procedure. CMake will detect files generated by that
|
||||
process and will terminate with an error and a suggestion for how to remove them.
|
||||
When building with CMake, you **must NOT** build the GPU library in
|
||||
``lib/gpu`` using the traditional build procedure. CMake will detect
|
||||
files generated by that process and will terminate with an error and a
|
||||
suggestion for how to remove them.
|
||||
|
||||
If you are compiling for OpenCL, the default setting is to download, build, and
|
||||
link with a static OpenCL ICD loader library and standard OpenCL headers. This
|
||||
way no local OpenCL development headers or library needs to be present and only
|
||||
OpenCL compatible drivers need to be installed to use OpenCL. If this is not
|
||||
desired, you can set :code:`USE_STATIC_OPENCL_LOADER` to :code:`no`.
|
||||
If you are compiling for OpenCL, the default setting is to download,
|
||||
build, and link with a static OpenCL ICD loader library and standard
|
||||
OpenCL headers. This way no local OpenCL development headers or library
|
||||
needs to be present and only OpenCL compatible drivers need to be
|
||||
installed to use OpenCL. If this is not desired, you can set
|
||||
:code:`USE_STATIC_OPENCL_LOADER` to :code:`no`.
|
||||
|
||||
If you are compiling with HIP, note that before running CMake you will have to
|
||||
set appropriate environment variables. Some variables such as
|
||||
:code:`HCC_AMDGPU_TARGET` (for ROCm <= 4.0) or :code:`CUDA_PATH` are necessary for :code:`hipcc`
|
||||
and the linker to work correctly.
|
||||
The GPU library has some multi-thread support using OpenMP. If LAMMPS
|
||||
is built with ``-D BUILD_OMP=on`` this will also be enabled.
|
||||
|
||||
Using CHIP-SPV implementation of HIP is now supported. It allows one to run HIP
|
||||
code on Intel GPUs via the OpenCL or Level Zero backends. To use CHIP-SPV, you must
|
||||
set :code:`-DHIP_USE_DEVICE_SORT=OFF` in your CMake command line as CHIP-SPV does not
|
||||
yet support hipCUB. The use of HIP for Intel GPUs is still experimental so you
|
||||
should only use this option in preparations to run on Aurora system at ANL.
|
||||
If you are compiling with HIP, note that before running CMake you will
|
||||
have to set appropriate environment variables. Some variables such as
|
||||
:code:`HCC_AMDGPU_TARGET` (for ROCm <= 4.0) or :code:`CUDA_PATH` are
|
||||
necessary for :code:`hipcc` and the linker to work correctly.
|
||||
|
||||
.. versionadded:: 3Aug2022
|
||||
|
||||
Using the CHIP-SPV implementation of HIP is supported. It allows one to
|
||||
run HIP code on Intel GPUs via the OpenCL or Level Zero backends. To use
|
||||
CHIP-SPV, you must set :code:`-DHIP_USE_DEVICE_SORT=OFF` in your CMake
|
||||
command line as CHIP-SPV does not yet support hipCUB. As of Summer 2022,
|
||||
the use of HIP for Intel GPUs is experimental. You should only use this
|
||||
option in preparations to run on Aurora system at Argonne.
|
||||
|
||||
.. code:: bash
|
||||
|
||||
@ -274,10 +286,13 @@ To enable GPU binning via CUDA performance primitives set the Makefile variable
|
||||
most modern GPUs.
|
||||
|
||||
To support the CUDA multiprocessor server you can set the define
|
||||
``-DCUDA_PROXY``. Please note that in this case you must **not** use
|
||||
``-DCUDA_MPS_SUPPORT``. Please note that in this case you must **not** use
|
||||
the CUDA performance primitives and thus set the variable ``CUDPP_OPT``
|
||||
to empty.
|
||||
|
||||
The GPU library has some multi-thread support using OpenMP. You need to add
|
||||
the compiler flag that enables OpenMP to the ``CUDR_OPTS`` Makefile variable.
|
||||
|
||||
If the library build is successful, 3 files should be created:
|
||||
``lib/gpu/libgpu.a``\ , ``lib/gpu/nvc_get_devices``\ , and
|
||||
``lib/gpu/Makefile.lammps``\ . The latter has settings that enable LAMMPS
|
||||
@ -678,20 +693,11 @@ This list was last updated for version 3.7.1 of the Kokkos library.
|
||||
-D Kokkos_ARCH_GPUARCH=yes # GPUARCH = GPU from list above
|
||||
-D Kokkos_ENABLE_CUDA=yes
|
||||
-D Kokkos_ENABLE_OPENMP=yes
|
||||
-D CMAKE_CXX_COMPILER=wrapper # wrapper = full path to Cuda nvcc wrapper
|
||||
|
||||
This will also enable executing FFTs on the GPU, either via the
|
||||
internal KISSFFT library, or - by preference - with the cuFFT
|
||||
library bundled with the CUDA toolkit, depending on whether CMake
|
||||
can identify its location. The *wrapper* value for
|
||||
``CMAKE_CXX_COMPILER`` variable is the path to the CUDA nvcc
|
||||
compiler wrapper provided in the Kokkos library:
|
||||
``lib/kokkos/bin/nvcc_wrapper``\ . The setting should include the
|
||||
full path name to the wrapper, e.g.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
-D CMAKE_CXX_COMPILER=${HOME}/lammps/lib/kokkos/bin/nvcc_wrapper
|
||||
can identify its location.
|
||||
|
||||
For AMD or NVIDIA GPUs using HIP, set these variables:
|
||||
|
||||
@ -826,63 +832,6 @@ will thus always enable it.
|
||||
|
||||
----------
|
||||
|
||||
.. _latte:
|
||||
|
||||
LATTE package
|
||||
-------------------------
|
||||
|
||||
To build with this package, you must download and build the LATTE
|
||||
library.
|
||||
|
||||
.. tabs::
|
||||
|
||||
.. tab:: CMake build
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
-D DOWNLOAD_LATTE=value # download LATTE for build, value = no (default) or yes
|
||||
-D LATTE_LIBRARY=path # LATTE library file (only needed if a custom location)
|
||||
-D USE_INTERNAL_LINALG=value # Use the internal linear algebra library instead of LAPACK
|
||||
# value = no (default) or yes
|
||||
|
||||
If ``DOWNLOAD_LATTE`` is set, the LATTE library will be downloaded
|
||||
and built inside the CMake build directory. If the LATTE library
|
||||
is already on your system (in a location CMake cannot find it),
|
||||
``LATTE_LIBRARY`` is the filename (plus path) of the LATTE library
|
||||
file, not the directory the library file is in.
|
||||
|
||||
The LATTE library requires LAPACK (and BLAS) and CMake can identify
|
||||
their locations and pass that info to the LATTE build script. But
|
||||
on some systems this triggers a (current) limitation of CMake and
|
||||
the configuration will fail. Try enabling ``USE_INTERNAL_LINALG`` in
|
||||
those cases to use the bundled linear algebra library and work around
|
||||
the limitation.
|
||||
|
||||
.. tab:: Traditional make
|
||||
|
||||
You can download and build the LATTE library manually if you
|
||||
prefer; follow the instructions in ``lib/latte/README``\ . You
|
||||
can also do it in one step from the ``lammps/src`` dir, using a
|
||||
command like these, which simply invokes the
|
||||
``lib/latte/Install.py`` script with the specified args:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
make lib-latte # print help message
|
||||
make lib-latte args="-b" # download and build in lib/latte/LATTE-master
|
||||
make lib-latte args="-p $HOME/latte" # use existing LATTE installation in $HOME/latte
|
||||
make lib-latte args="-b -m gfortran" # download and build in lib/latte and
|
||||
# copy Makefile.lammps.gfortran to Makefile.lammps
|
||||
|
||||
Note that 3 symbolic (soft) links, ``includelink`` and ``liblink``
|
||||
and ``filelink.o``, are created in ``lib/latte`` to point to
|
||||
required folders and files in the LATTE home directory. When
|
||||
LAMMPS itself is built it will use these links. You should also
|
||||
check that the ``Makefile.lammps`` file you create is appropriate
|
||||
for the compiler you use on your system to build LATTE.
|
||||
|
||||
----------
|
||||
|
||||
.. _lepton:
|
||||
|
||||
LEPTON package
|
||||
@ -932,6 +881,50 @@ included in the LAMMPS source distribution in the ``lib/lepton`` folder.
|
||||
|
||||
----------
|
||||
|
||||
.. _machdyn:
|
||||
|
||||
MACHDYN package
|
||||
-------------------------------
|
||||
|
||||
To build with this package, you must download the Eigen3 library.
|
||||
Eigen3 is a template library, so you do not need to build it.
|
||||
|
||||
.. tabs::
|
||||
|
||||
.. tab:: CMake build
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
-D DOWNLOAD_EIGEN3 # download Eigen3, value = no (default) or yes
|
||||
-D EIGEN3_INCLUDE_DIR=path # path to Eigen library (only needed if a custom location)
|
||||
|
||||
If ``DOWNLOAD_EIGEN3`` is set, the Eigen3 library will be
|
||||
downloaded and inside the CMake build directory. If the Eigen3
|
||||
library is already on your system (in a location where CMake
|
||||
cannot find it), set ``EIGEN3_INCLUDE_DIR`` to the directory the
|
||||
``Eigen3`` include file is in.
|
||||
|
||||
.. tab:: Traditional make
|
||||
|
||||
You can download the Eigen3 library manually if you prefer; follow
|
||||
the instructions in ``lib/machdyn/README``. You can also do it in one
|
||||
step from the ``lammps/src`` dir, using a command like these,
|
||||
which simply invokes the ``lib/machdyn/Install.py`` script with the
|
||||
specified args:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
make lib-machdyn # print help message
|
||||
make lib-machdyn args="-b" # download to lib/machdyn/eigen3
|
||||
make lib-machdyn args="-p /usr/include/eigen3" # use existing Eigen installation in /usr/include/eigen3
|
||||
|
||||
Note that a symbolic (soft) link named ``includelink`` is created
|
||||
in ``lib/machdyn`` to point to the Eigen dir. When LAMMPS builds it
|
||||
will use this link. You should not need to edit the
|
||||
``lib/machdyn/Makefile.lammps`` file.
|
||||
|
||||
----------
|
||||
|
||||
.. _mliap:
|
||||
|
||||
ML-IAP package
|
||||
@ -1135,7 +1128,7 @@ VORONOI package
|
||||
-----------------------------
|
||||
|
||||
To build with this package, you must download and build the
|
||||
`Voro++ library <https://math.lbl.gov/voro++>`_ or install a
|
||||
`Voro++ library <https://math.lbl.gov/voro++/>`_ or install a
|
||||
binary package provided by your operating system.
|
||||
|
||||
.. tabs::
|
||||
@ -1407,9 +1400,9 @@ This package depends on the KSPACE package.
|
||||
KSPACE package so the latter one *must* be enabled.
|
||||
|
||||
The ELECTRODE package also requires LAPACK (and BLAS) and CMake
|
||||
can identify their locations and pass that info to the LATTE build
|
||||
script. But on some systems this may cause problems when linking
|
||||
or the dependency is not desired. Try enabling
|
||||
can identify their locations and pass that info to the ELECTRODE
|
||||
build script. But on some systems this may cause problems when
|
||||
linking or the dependency is not desired. Try enabling
|
||||
``USE_INTERNAL_LINALG`` in those cases to use the bundled linear
|
||||
algebra library and work around the limitation.
|
||||
|
||||
@ -1530,6 +1523,55 @@ ML-POD package
|
||||
|
||||
----------
|
||||
|
||||
.. _ml-quip:
|
||||
|
||||
ML-QUIP package
|
||||
---------------------------------
|
||||
|
||||
To build with this package, you must download and build the QUIP
|
||||
library. It can be obtained from GitHub. For support of GAP
|
||||
potentials, additional files with specific licensing conditions need
|
||||
to be downloaded and configured. The automatic download will from
|
||||
within CMake will download the non-commercial use version.
|
||||
|
||||
.. tabs::
|
||||
|
||||
.. tab:: CMake build
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
-D DOWNLOAD_QUIP=value # download QUIP library for build, value = no (default) or yes
|
||||
-D QUIP_LIBRARY=path # path to libquip.a (only needed if a custom location)
|
||||
-D USE_INTERNAL_LINALG=value # Use the internal linear algebra library instead of LAPACK
|
||||
# value = no (default) or yes
|
||||
|
||||
CMake will try to download and build the QUIP library from GitHub,
|
||||
if it is not found on the local machine. This requires to have git
|
||||
installed. It will use the same compilers and flags as used for
|
||||
compiling LAMMPS. Currently this is only supported for the GNU
|
||||
and the Intel compilers. Set the ``QUIP_LIBRARY`` variable if you
|
||||
want to use a previously compiled and installed QUIP library and
|
||||
CMake cannot find it.
|
||||
|
||||
The QUIP library requires LAPACK (and BLAS) and CMake can identify
|
||||
their locations and pass that info to the QUIP build script. But
|
||||
on some systems this triggers a (current) limitation of CMake and
|
||||
the configuration will fail. Try enabling ``USE_INTERNAL_LINALG`` in
|
||||
those cases to use the bundled linear algebra library and work around
|
||||
the limitation.
|
||||
|
||||
.. tab:: Traditional make
|
||||
|
||||
The download/build procedure for the QUIP library, described in
|
||||
``lib/quip/README`` file requires setting two environment
|
||||
variables, ``QUIP_ROOT`` and ``QUIP_ARCH``. These are accessed by
|
||||
the ``lib/quip/Makefile.lammps`` file which is used when you
|
||||
compile and link LAMMPS with this package. You should only need
|
||||
to edit ``Makefile.lammps`` if the LAMMPS build can not use its
|
||||
settings to successfully build on your system.
|
||||
|
||||
----------
|
||||
|
||||
.. _plumed:
|
||||
|
||||
PLUMED package
|
||||
@ -1964,10 +2006,10 @@ OPENMP package
|
||||
Apple offers the `Xcode package and IDE
|
||||
<https://developer.apple.com/xcode/>`_ for compiling software on
|
||||
macOS, so you have likely installed it to compile LAMMPS. Their
|
||||
compiler is based on `Clang <https://clang.llvm.org/>`, but while it
|
||||
compiler is based on `Clang <https://clang.llvm.org/>`_, but while it
|
||||
is capable of processing OpenMP directives, the necessary header
|
||||
files and OpenMP runtime library are missing. The `R developers
|
||||
<https://www.r-project.org/>` have figured out a way to build those
|
||||
<https://www.r-project.org/>`_ have figured out a way to build those
|
||||
in a compatible fashion. One can download them from
|
||||
`https://mac.r-project.org/openmp/
|
||||
<https://mac.r-project.org/openmp/>`_. Simply adding those files as
|
||||
@ -2051,55 +2093,6 @@ verified to work in February 2020 with Quantum Espresso versions 6.3 to
|
||||
|
||||
----------
|
||||
|
||||
.. _ml-quip:
|
||||
|
||||
ML-QUIP package
|
||||
---------------------------------
|
||||
|
||||
To build with this package, you must download and build the QUIP
|
||||
library. It can be obtained from GitHub. For support of GAP
|
||||
potentials, additional files with specific licensing conditions need
|
||||
to be downloaded and configured. The automatic download will from
|
||||
within CMake will download the non-commercial use version.
|
||||
|
||||
.. tabs::
|
||||
|
||||
.. tab:: CMake build
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
-D DOWNLOAD_QUIP=value # download QUIP library for build, value = no (default) or yes
|
||||
-D QUIP_LIBRARY=path # path to libquip.a (only needed if a custom location)
|
||||
-D USE_INTERNAL_LINALG=value # Use the internal linear algebra library instead of LAPACK
|
||||
# value = no (default) or yes
|
||||
|
||||
CMake will try to download and build the QUIP library from GitHub,
|
||||
if it is not found on the local machine. This requires to have git
|
||||
installed. It will use the same compilers and flags as used for
|
||||
compiling LAMMPS. Currently this is only supported for the GNU
|
||||
and the Intel compilers. Set the ``QUIP_LIBRARY`` variable if you
|
||||
want to use a previously compiled and installed QUIP library and
|
||||
CMake cannot find it.
|
||||
|
||||
The QUIP library requires LAPACK (and BLAS) and CMake can identify
|
||||
their locations and pass that info to the QUIP build script. But
|
||||
on some systems this triggers a (current) limitation of CMake and
|
||||
the configuration will fail. Try enabling ``USE_INTERNAL_LINALG`` in
|
||||
those cases to use the bundled linear algebra library and work around
|
||||
the limitation.
|
||||
|
||||
.. tab:: Traditional make
|
||||
|
||||
The download/build procedure for the QUIP library, described in
|
||||
``lib/quip/README`` file requires setting two environment
|
||||
variables, ``QUIP_ROOT`` and ``QUIP_ARCH``. These are accessed by
|
||||
the ``lib/quip/Makefile.lammps`` file which is used when you
|
||||
compile and link LAMMPS with this package. You should only need
|
||||
to edit ``Makefile.lammps`` if the LAMMPS build can not use its
|
||||
settings to successfully build on your system.
|
||||
|
||||
----------
|
||||
|
||||
.. _scafacos:
|
||||
|
||||
SCAFACOS package
|
||||
@ -2147,50 +2140,6 @@ To build with this package, you must download and build the
|
||||
|
||||
----------
|
||||
|
||||
.. _machdyn:
|
||||
|
||||
MACHDYN package
|
||||
-------------------------------
|
||||
|
||||
To build with this package, you must download the Eigen3 library.
|
||||
Eigen3 is a template library, so you do not need to build it.
|
||||
|
||||
.. tabs::
|
||||
|
||||
.. tab:: CMake build
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
-D DOWNLOAD_EIGEN3 # download Eigen3, value = no (default) or yes
|
||||
-D EIGEN3_INCLUDE_DIR=path # path to Eigen library (only needed if a custom location)
|
||||
|
||||
If ``DOWNLOAD_EIGEN3`` is set, the Eigen3 library will be
|
||||
downloaded and inside the CMake build directory. If the Eigen3
|
||||
library is already on your system (in a location where CMake
|
||||
cannot find it), set ``EIGEN3_INCLUDE_DIR`` to the directory the
|
||||
``Eigen3`` include file is in.
|
||||
|
||||
.. tab:: Traditional make
|
||||
|
||||
You can download the Eigen3 library manually if you prefer; follow
|
||||
the instructions in ``lib/smd/README``. You can also do it in one
|
||||
step from the ``lammps/src`` dir, using a command like these,
|
||||
which simply invokes the ``lib/smd/Install.py`` script with the
|
||||
specified args:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
make lib-smd # print help message
|
||||
make lib-smd args="-b" # download to lib/smd/eigen3
|
||||
make lib-smd args="-p /usr/include/eigen3" # use existing Eigen installation in /usr/include/eigen3
|
||||
|
||||
Note that a symbolic (soft) link named ``includelink`` is created
|
||||
in ``lib/smd`` to point to the Eigen dir. When LAMMPS builds it
|
||||
will use this link. You should not need to edit the
|
||||
``lib/smd/Makefile.lammps`` file.
|
||||
|
||||
----------
|
||||
|
||||
.. _vtk:
|
||||
|
||||
VTK package
|
||||
|
||||
@ -117,8 +117,8 @@ their settings may become outdated, too:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
make mac # build serial LAMMPS on a Mac
|
||||
make mac_mpi # build parallel LAMMPS on a Mac
|
||||
make mac # build serial LAMMPS on macOS
|
||||
make mac_mpi # build parallel LAMMPS on macOS
|
||||
make intel_cpu # build with the INTEL package optimized for CPUs
|
||||
make knl # build with the INTEL package optimized for KNLs
|
||||
make opt # build with the OPT package optimized for CPUs
|
||||
|
||||
@ -33,7 +33,7 @@ various tools and files. Some of them have to be installed (see below). For
|
||||
the rest the build process will attempt to download and install them into
|
||||
a python virtual environment and local folders.
|
||||
|
||||
A current version of the manual (latest patch release, that is the state
|
||||
A current version of the manual (latest feature release, that is the state
|
||||
of the *release* branch) is is available online at:
|
||||
`https://docs.lammps.org/ <https://docs.lammps.org/>`_.
|
||||
A version of the manual corresponding to the ongoing development (that is
|
||||
@ -48,15 +48,15 @@ Build using GNU make
|
||||
|
||||
The LAMMPS manual is written in `reStructuredText <rst_>`_ format which
|
||||
can be translated to different output format using the `Sphinx
|
||||
<https://sphinx-doc.org>`_ document generator tool. It also
|
||||
<https://www.sphinx-doc.org/>`_ document generator tool. It also
|
||||
incorporates programmer documentation extracted from the LAMMPS C++
|
||||
sources through the `Doxygen <https://doxygen.nl>`_ program. Currently
|
||||
sources through the `Doxygen <https://doxygen.nl/>`_ program. Currently
|
||||
the translation to HTML, PDF (via LaTeX), ePUB (for many e-book readers)
|
||||
and MOBI (for Amazon Kindle readers) are supported. For that to work a
|
||||
Python 3 interpreter, the ``doxygen`` tools and internet access to
|
||||
download additional files and tools are required. This download is
|
||||
usually only required once or after the documentation folder is returned
|
||||
to a pristine state with ``make clean-all``.
|
||||
Python interpreter version 3.8 or later, the ``doxygen`` tools and
|
||||
internet access to download additional files and tools are required.
|
||||
This download is usually only required once or after the documentation
|
||||
folder is returned to a pristine state with ``make clean-all``.
|
||||
|
||||
For the documentation build a python virtual environment is set up in
|
||||
the folder ``doc/docenv`` and various python packages are installed into
|
||||
@ -87,6 +87,7 @@ folder. The following ``make`` commands are available:
|
||||
make anchor_check # check for duplicate anchor labels
|
||||
make style_check # check for complete and consistent style lists
|
||||
make package_check # check for complete and consistent package lists
|
||||
make link_check # check for broken or outdated URLs
|
||||
make spelling # spell-check the manual
|
||||
|
||||
----------
|
||||
|
||||
@ -46,7 +46,6 @@ packages:
|
||||
* :ref:`INTEL <intel>`
|
||||
* :ref:`KIM <kim>`
|
||||
* :ref:`KOKKOS <kokkos>`
|
||||
* :ref:`LATTE <latte>`
|
||||
* :ref:`LEPTON <lepton>`
|
||||
* :ref:`MACHDYN <machdyn>`
|
||||
* :ref:`MDI <mdi>`
|
||||
|
||||
@ -42,6 +42,7 @@ OPT.
|
||||
* :doc:`gaussian <bond_gaussian>`
|
||||
* :doc:`gromos (o) <bond_gromos>`
|
||||
* :doc:`harmonic (iko) <bond_harmonic>`
|
||||
* :doc:`harmonic/restrain <bond_harmonic_restrain>`
|
||||
* :doc:`harmonic/shift (o) <bond_harmonic_shift>`
|
||||
* :doc:`harmonic/shift/cut (o) <bond_harmonic_shift_cut>`
|
||||
* :doc:`lepton (o) <bond_lepton>`
|
||||
|
||||
@ -46,12 +46,15 @@ KOKKOS, o = OPENMP, t = OPT.
|
||||
* :doc:`com/chunk <compute_com_chunk>`
|
||||
* :doc:`contact/atom <compute_contact_atom>`
|
||||
* :doc:`coord/atom (k) <compute_coord_atom>`
|
||||
* :doc:`count/type <compute_count_type>`
|
||||
* :doc:`damage/atom <compute_damage_atom>`
|
||||
* :doc:`dihedral <compute_dihedral>`
|
||||
* :doc:`dihedral/local <compute_dihedral_local>`
|
||||
* :doc:`dilatation/atom <compute_dilatation_atom>`
|
||||
* :doc:`dipole <compute_dipole>`
|
||||
* :doc:`dipole/chunk <compute_dipole_chunk>`
|
||||
* :doc:`dipole/tip4p <compute_dipole>`
|
||||
* :doc:`dipole/tip4p/chunk <compute_dipole_chunk>`
|
||||
* :doc:`displace/atom <compute_displace_atom>`
|
||||
* :doc:`dpd <compute_dpd>`
|
||||
* :doc:`dpd/atom <compute_dpd_atom>`
|
||||
@ -61,7 +64,7 @@ KOKKOS, o = OPENMP, t = OPT.
|
||||
* :doc:`entropy/atom <compute_entropy_atom>`
|
||||
* :doc:`erotate/asphere <compute_erotate_asphere>`
|
||||
* :doc:`erotate/rigid <compute_erotate_rigid>`
|
||||
* :doc:`erotate/sphere <compute_erotate_sphere>`
|
||||
* :doc:`erotate/sphere (k) <compute_erotate_sphere>`
|
||||
* :doc:`erotate/sphere/atom <compute_erotate_sphere_atom>`
|
||||
* :doc:`event/displace <compute_event_displace>`
|
||||
* :doc:`fabric <compute_fabric>`
|
||||
@ -104,6 +107,7 @@ KOKKOS, o = OPENMP, t = OPT.
|
||||
* :doc:`pe/tally <compute_tally>`
|
||||
* :doc:`plasticity/atom <compute_plasticity_atom>`
|
||||
* :doc:`pressure <compute_pressure>`
|
||||
* :doc:`pressure/alchemy <compute_pressure_alchemy>`
|
||||
* :doc:`pressure/uef <compute_pressure_uef>`
|
||||
* :doc:`property/atom <compute_property_atom>`
|
||||
* :doc:`property/chunk <compute_property_chunk>`
|
||||
@ -149,11 +153,11 @@ KOKKOS, o = OPENMP, t = OPT.
|
||||
* :doc:`sph/t/atom <compute_sph_t_atom>`
|
||||
* :doc:`spin <compute_spin>`
|
||||
* :doc:`stress/atom <compute_stress_atom>`
|
||||
* :doc:`stress/cartesian <compute_stress_profile>`
|
||||
* :doc:`stress/cylinder <compute_stress_profile>`
|
||||
* :doc:`stress/cartesian <compute_stress_cartesian>`
|
||||
* :doc:`stress/cylinder <compute_stress_curvilinear>`
|
||||
* :doc:`stress/mop <compute_stress_mop>`
|
||||
* :doc:`stress/mop/profile <compute_stress_mop>`
|
||||
* :doc:`stress/spherical <compute_stress_profile>`
|
||||
* :doc:`stress/spherical <compute_stress_curvilinear>`
|
||||
* :doc:`stress/tally <compute_tally>`
|
||||
* :doc:`tdpd/cc/atom <compute_tdpd_cc_atom>`
|
||||
* :doc:`temp (k) <compute_temp>`
|
||||
|
||||
@ -29,6 +29,7 @@ OPT.
|
||||
* :doc:`adapt/fep <fix_adapt_fep>`
|
||||
* :doc:`addforce <fix_addforce>`
|
||||
* :doc:`addtorque <fix_addtorque>`
|
||||
* :doc:`alchemy <fix_alchemy>`
|
||||
* :doc:`amoeba/bitorsion <fix_amoeba_bitorsion>`
|
||||
* :doc:`amoeba/pitorsion <fix_amoeba_pitorsion>`
|
||||
* :doc:`append/atoms <fix_append_atoms>`
|
||||
@ -69,6 +70,7 @@ OPT.
|
||||
* :doc:`dt/reset (k) <fix_dt_reset>`
|
||||
* :doc:`edpd/source <fix_dpd_source>`
|
||||
* :doc:`efield <fix_efield>`
|
||||
* :doc:`efield/tip4p <fix_efield>`
|
||||
* :doc:`ehex <fix_ehex>`
|
||||
* :doc:`electrode/conp (i) <fix_electrode>`
|
||||
* :doc:`electrode/conq (i) <fix_electrode>`
|
||||
@ -92,6 +94,7 @@ OPT.
|
||||
* :doc:`grem <fix_grem>`
|
||||
* :doc:`halt <fix_halt>`
|
||||
* :doc:`heat <fix_heat>`
|
||||
* :doc:`heat/flow <fix_heat_flow>`
|
||||
* :doc:`hyper/global <fix_hyper_global>`
|
||||
* :doc:`hyper/local <fix_hyper_local>`
|
||||
* :doc:`imd <fix_imd>`
|
||||
@ -101,13 +104,13 @@ OPT.
|
||||
* :doc:`langevin/drude <fix_langevin_drude>`
|
||||
* :doc:`langevin/eff <fix_langevin_eff>`
|
||||
* :doc:`langevin/spin <fix_langevin_spin>`
|
||||
* :doc:`latte <fix_latte>`
|
||||
* :doc:`lb/fluid <fix_lb_fluid>`
|
||||
* :doc:`lb/momentum <fix_lb_momentum>`
|
||||
* :doc:`lb/viscous <fix_lb_viscous>`
|
||||
* :doc:`lineforce <fix_lineforce>`
|
||||
* :doc:`manifoldforce <fix_manifoldforce>`
|
||||
* :doc:`mdi/qm <fix_mdi_qm>`
|
||||
* :doc:`mdi/qmmm <fix_mdi_qmmm>`
|
||||
* :doc:`meso/move <fix_meso_move>`
|
||||
* :doc:`mol/swap <fix_mol_swap>`
|
||||
* :doc:`momentum (k) <fix_momentum>`
|
||||
@ -168,7 +171,8 @@ OPT.
|
||||
* :doc:`pafi <fix_pafi>`
|
||||
* :doc:`pair <fix_pair>`
|
||||
* :doc:`phonon <fix_phonon>`
|
||||
* :doc:`pimd <fix_pimd>`
|
||||
* :doc:`pimd/langevin <fix_pimd>`
|
||||
* :doc:`pimd/nvt <fix_pimd>`
|
||||
* :doc:`planeforce <fix_planeforce>`
|
||||
* :doc:`plumed <fix_plumed>`
|
||||
* :doc:`poems <fix_poems>`
|
||||
@ -257,12 +261,13 @@ OPT.
|
||||
* :doc:`wall/body/polyhedron <fix_wall_body_polyhedron>`
|
||||
* :doc:`wall/colloid <fix_wall>`
|
||||
* :doc:`wall/ees <fix_wall_ees>`
|
||||
* :doc:`wall/gran <fix_wall_gran>`
|
||||
* :doc:`wall/gran (k) <fix_wall_gran>`
|
||||
* :doc:`wall/gran/region <fix_wall_gran_region>`
|
||||
* :doc:`wall/harmonic <fix_wall>`
|
||||
* :doc:`wall/lj1043 <fix_wall>`
|
||||
* :doc:`wall/lj126 <fix_wall>`
|
||||
* :doc:`wall/lj93 (k) <fix_wall>`
|
||||
* :doc:`wall/lepton <fix_wall>`
|
||||
* :doc:`wall/morse <fix_wall>`
|
||||
* :doc:`wall/piston <fix_wall_piston>`
|
||||
* :doc:`wall/reflect (k) <fix_wall_reflect>`
|
||||
@ -270,4 +275,5 @@ OPT.
|
||||
* :doc:`wall/region <fix_wall_region>`
|
||||
* :doc:`wall/region/ees <fix_wall_ees>`
|
||||
* :doc:`wall/srd <fix_wall_srd>`
|
||||
* :doc:`wall/table <fix_wall>`
|
||||
* :doc:`widom <fix_widom>`
|
||||
|
||||
@ -37,6 +37,7 @@ OPT.
|
||||
*
|
||||
* :doc:`adp (ko) <pair_adp>`
|
||||
* :doc:`agni (o) <pair_agni>`
|
||||
* :doc:`aip/water/2dm (t) <pair_aip_water_2dm>`
|
||||
* :doc:`airebo (io) <pair_airebo>`
|
||||
* :doc:`airebo/morse (io) <pair_airebo>`
|
||||
* :doc:`amoeba (g) <pair_amoeba>`
|
||||
@ -55,6 +56,7 @@ OPT.
|
||||
* :doc:`born/coul/msm (o) <pair_born>`
|
||||
* :doc:`born/coul/wolf (go) <pair_born>`
|
||||
* :doc:`born/coul/wolf/cs (g) <pair_cs>`
|
||||
* :doc:`born/gauss <pair_born_gauss>`
|
||||
* :doc:`bpm/spring <pair_bpm_spring>`
|
||||
* :doc:`brownian (o) <pair_brownian>`
|
||||
* :doc:`brownian/poly (o) <pair_brownian>`
|
||||
@ -136,6 +138,7 @@ OPT.
|
||||
* :doc:`lennard/mdf <pair_mdf>`
|
||||
* :doc:`lepton (o) <pair_lepton>`
|
||||
* :doc:`lepton/coul (o) <pair_lepton>`
|
||||
* :doc:`lepton/sphere (o) <pair_lepton>`
|
||||
* :doc:`line/lj <pair_line_lj>`
|
||||
* :doc:`lj/charmm/coul/charmm (giko) <pair_charmm>`
|
||||
* :doc:`lj/charmm/coul/charmm/implicit (ko) <pair_charmm>`
|
||||
@ -170,12 +173,14 @@ OPT.
|
||||
* :doc:`lj/cut/dipole/long (g) <pair_dipole>`
|
||||
* :doc:`lj/cut/dipole/sf (go) <pair_dipole>`
|
||||
* :doc:`lj/cut/soft (o) <pair_fep_soft>`
|
||||
* :doc:`lj/cut/sphere (o) <pair_lj_cut_sphere>`
|
||||
* :doc:`lj/cut/thole/long (o) <pair_thole>`
|
||||
* :doc:`lj/cut/tip4p/cut (o) <pair_lj_cut_tip4p>`
|
||||
* :doc:`lj/cut/tip4p/long (got) <pair_lj_cut_tip4p>`
|
||||
* :doc:`lj/cut/tip4p/long/soft (o) <pair_fep_soft>`
|
||||
* :doc:`lj/expand (gko) <pair_lj_expand>`
|
||||
* :doc:`lj/expand/coul/long (gk) <pair_lj_expand>`
|
||||
* :doc:`lj/expand/sphere (o) <pair_lj_expand_sphere>`
|
||||
* :doc:`lj/gromacs (gko) <pair_gromacs>`
|
||||
* :doc:`lj/gromacs/coul/gromacs (ko) <pair_gromacs>`
|
||||
* :doc:`lj/long/coul/long (iot) <pair_lj_long>`
|
||||
|
||||
@ -38,6 +38,20 @@ been folded into the :doc:`reset_atoms <reset_atoms>` command. If
|
||||
present, LAMMPS will replace the commands accordingly and print a
|
||||
warning.
|
||||
|
||||
LATTE package
|
||||
-------------
|
||||
|
||||
.. deprecated:: 15Jun2023
|
||||
|
||||
The LATTE package with the fix latte command was removed from LAMMPS.
|
||||
This functionality has been superseded by :doc:`fix mdi/qm <fix_mdi_qm>`
|
||||
and :doc:`fix mdi/qmmm <fix_mdi_qmmm>` from the :ref:`MDI package
|
||||
<PKG-MDI>`. These fixes are compatible with several quantum software
|
||||
packages, including LATTE. See the ``examples/QUANTUM`` dir and the
|
||||
:doc:`MDI coupling HOWTO <Howto_mdi>` page. MDI supports running LAMMPS
|
||||
with LATTE as a plugin library (similar to the way fix latte worked), as
|
||||
well as on a different set of MPI processors.
|
||||
|
||||
MEAM package
|
||||
------------
|
||||
|
||||
|
||||
@ -13,6 +13,7 @@ of time and requests from the LAMMPS user community.
|
||||
Developer_org
|
||||
Developer_code_design
|
||||
Developer_parallel
|
||||
Developer_atom
|
||||
Developer_comm_ops
|
||||
Developer_flow
|
||||
Developer_write
|
||||
|
||||
88
doc/src/Developer_atom.rst
Normal file
88
doc/src/Developer_atom.rst
Normal file
@ -0,0 +1,88 @@
|
||||
Accessing per-atom data
|
||||
-----------------------
|
||||
|
||||
This page discusses how per-atom data is managed in LAMMPS, how it can
|
||||
be accessed, what communication patters apply, and some of the utility
|
||||
functions that exist for a variety of purposes.
|
||||
|
||||
|
||||
Owned and ghost atoms
|
||||
^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
As described on the :doc:`parallel partitioning algorithms
|
||||
<Developer_par_part>` page, LAMMPS uses a domain decomposition of the
|
||||
simulation domain, either in a *brick* or *tiled* manner. Each MPI
|
||||
process *owns* exactly one subdomain and the atoms within it. To compute
|
||||
forces for tuples of atoms that are spread across sub-domain boundaries,
|
||||
also a "halo" of *ghost* atoms are maintained within a the communication
|
||||
cutoff distance of its subdomain.
|
||||
|
||||
The total number of atoms is stored in `Atom::natoms` (within any
|
||||
typical class this can be referred to at `atom->natoms`. The number of
|
||||
*owned* (or "local" atoms) are stored in `Atom::nlocal`; the number of
|
||||
*ghost* atoms is stored in `Atom::nghost`. The sum of `Atom::nlocal`
|
||||
over all MPI processes should be `Atom::natoms`. This is by default
|
||||
regularly checked by the Thermo class, and if the sum does not match,
|
||||
LAMMPS stops with a "lost atoms" error. For convenience also the
|
||||
property `Atom::nmax` is available, this is the maximum of
|
||||
`Atom::nlocal + Atom::nghost` across all MPI processes.
|
||||
|
||||
Per-atom properties are either managed by the atom style, or individual
|
||||
classes. or as custom arrays by the individual classes. If only access
|
||||
to *owned* atoms is needed, they are usually allocated to be of size
|
||||
`Atom::nlocal`, otherwise of size `Atom::nmax`. Please note that not all
|
||||
per-atom properties are available or updated on *ghost* atoms. For
|
||||
example, per-atom velocities are only updated with :doc:`comm_modify vel
|
||||
yes <comm_modify>`.
|
||||
|
||||
|
||||
Atom indexing
|
||||
^^^^^^^^^^^^^
|
||||
|
||||
When referring to individual atoms, they may be indexed by their local
|
||||
*index*, their index in their `Atom::x` array. This is densely populated
|
||||
containing first all *owned* atoms (index < `Atom::nlocal`) and then all
|
||||
*ghost* atoms. The order of atoms in these arrays can change due to
|
||||
atoms migrating between between subdomains, atoms being added or
|
||||
deleted, or atoms being sorted for better cache efficiency. Atoms are
|
||||
globally uniquely identified by their *atom ID*. There may be multiple
|
||||
atoms with the same atom ID present, but only one of them may be an
|
||||
*owned* atom.
|
||||
|
||||
To find the local *index* of an atom, when the *atom ID* is known, the
|
||||
`Atom::map()` function may be used. It will return the local atom index
|
||||
or -1. If the returned value is between 0 (inclusive) and `Atom::nlocal`
|
||||
(exclusive) it is an *owned* or "local" atom; for larger values the atom
|
||||
is present as a ghost atom; for a value of -1, the atom is not present
|
||||
on the current subdomain at all.
|
||||
|
||||
If multiple atoms with the same tag exist in the same subdomain, they
|
||||
can be found via the `Atom::sametag` array. It points to the next atom
|
||||
index with the same tag or -1 if there are no more atoms with the same
|
||||
tag. The list will be exhaustive when starting with an index of an
|
||||
*owned* atom, since the atom IDs are unique, so there can only be one
|
||||
such atom. Example code to count atoms with same atom ID in subdomain:
|
||||
|
||||
.. code-block:: c++
|
||||
|
||||
for (int i = 0; i < atom->nlocal; ++i) {
|
||||
int count = 0;
|
||||
while (sametag[i] >= 0) {
|
||||
i = sametag[i];
|
||||
++count;
|
||||
}
|
||||
printf("Atom ID: %ld is present %d times\n", atom->tag[i], count);
|
||||
}
|
||||
|
||||
Atom class versus AtomVec classes
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
The `Atom` class contains all kinds of flags and counters about atoms in
|
||||
the system and that includes pointers to **all** per-atom properties
|
||||
available for atoms. However, only a subset of these pointers are
|
||||
non-NULL and which those are depends on the atom style. For each atom
|
||||
style there is a corresponding `AtomVecXXX` class derived from the
|
||||
`AtomVec` base class, where the XXX indicates the atom style. This
|
||||
`AtomVecXXX` class will update the counters and per-atom pointers if
|
||||
atoms are added or removed to the system or migrate between subdomains.
|
||||
|
||||
@ -77,7 +77,7 @@ buffer, and they will be communicated together to minimize
|
||||
communication overhead. The communication buffers are defined vectors
|
||||
containing ``double`` values. To correctly store integers that may be
|
||||
64-bit (bigint, tagint, imageint) in the buffer, you need to use the
|
||||
`ubuf union <Communication buffer coding with ubuf>`_ construct.
|
||||
:ref:`ubuf union <communication_buffer_coding_with_ubuf>` construct.
|
||||
|
||||
The *Fix*, *Compute*, and *Dump* classes can also invoke the same kind
|
||||
of forward and reverse communication operations using the same *Comm*
|
||||
|
||||
@ -92,8 +92,8 @@ Arguments for these methods can be values returned by the
|
||||
*setup_grid()* method (described below), which define the extent of
|
||||
the grid cells (owned+ghost) the processor owns. These 4 methods
|
||||
allocate memory for 2d (first two) and 3d (second two) grid data. The
|
||||
two methods that end in "_one" allocate an array which stores a single
|
||||
value per grid cell. The two that end in "_multi" allocate an array
|
||||
two methods that end in "_offset" allocate an array which stores a single
|
||||
value per grid cell. The two that end in "_last" allocate an array
|
||||
which stores *Nvalues* per grid cell.
|
||||
|
||||
.. code-block:: c++
|
||||
|
||||
@ -11,6 +11,7 @@ Available topics are:
|
||||
|
||||
- `Reading and parsing of text and text files`_
|
||||
- `Requesting and accessing neighbor lists`_
|
||||
- `Choosing between a custom atom style, fix property/atom, and fix STORE/ATOM`_
|
||||
- `Fix contributions to instantaneous energy, virial, and cumulative energy`_
|
||||
- `KSpace PPPM FFT grids`_
|
||||
|
||||
@ -73,6 +74,8 @@ when converting "12.5", while the ValueTokenizer class will throw an
|
||||
:cpp:func:`ValueTokenizer::next_int()
|
||||
<LAMMPS_NS::ValueTokenizer::next_int>` is called on the same string.
|
||||
|
||||
.. _request-neighbor-list:
|
||||
|
||||
Requesting and accessing neighbor lists
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
@ -216,6 +219,30 @@ command:
|
||||
|
||||
neighbor->add_request(this, "delete_atoms", NeighConst::REQ_FULL);
|
||||
|
||||
Choosing between a custom atom style, fix property/atom, and fix STORE/ATOM
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
There are multiple ways to manage per-atom data within LAMMPS. Often
|
||||
the per-atom storage is only used locally and managed by the class that
|
||||
uses it. If the data has to persist between multiple time steps and
|
||||
migrate with atoms when they move from sub-domain to sub-domain or
|
||||
across periodic boundaries, then using a custom atom style, or :doc:`fix
|
||||
property/atom <fix_property_atom>`, or the internal fix STORE/ATOM are
|
||||
possible options.
|
||||
|
||||
- Using the atom style is usually the most programming effort and mostly
|
||||
needed when the per-atom data is an integral part of the model like a
|
||||
per-atom charge or diameter and thus should be part of the Atoms
|
||||
section of a :doc:`data file <read_data>`.
|
||||
|
||||
- Fix property/atom is useful if the data is optional or should be
|
||||
entered by the user, or accessed as a (named) custom property. In this
|
||||
case the fix should be entered as part of the input (and not
|
||||
internally) which allows to enter and store its content with data files.
|
||||
|
||||
- Fix STORE/ATOM should be used when the data should be accessed internally
|
||||
only and thus the fix can be created internally.
|
||||
|
||||
Fix contributions to instantaneous energy, virial, and cumulative energy
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
|
||||
@ -24,6 +24,7 @@ Available topics in mostly chronological order are:
|
||||
- `Use of "override" instead of "virtual"`_
|
||||
- `Simplified and more compact neighbor list requests`_
|
||||
- `Split of fix STORE into fix STORE/GLOBAL and fix STORE/PERATOM`_
|
||||
- `Rename of fix STORE/PERATOM to fix STORE/ATOM and change of arguments`_
|
||||
- `Use Output::get_dump_by_id() instead of Output::find_dump()`_
|
||||
- `Refactored grid communication using Grid3d/Grid2d classes instead of GridComm`_
|
||||
|
||||
@ -385,6 +386,34 @@ New:
|
||||
|
||||
This change is **required** or else the code will not compile.
|
||||
|
||||
Rename of fix STORE/PERATOM to fix STORE/ATOM and change of arguments
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. versionchanged:: 28Mar2023
|
||||
|
||||
The available functionality of the internal fix to store per-atom
|
||||
properties was expanded to enable storing data with ghost atoms and to
|
||||
support binary restart files. With those changes, the fix was renamed
|
||||
to fix STORE/ATOM and the number and order of (required) arguments has
|
||||
changed.
|
||||
|
||||
Old syntax: ``ID group-ID STORE/PERATOM rflag n1 n2 [n3]``
|
||||
|
||||
- *rflag* = 0/1, *no*/*yes* store per-atom values in restart file
|
||||
- :math:`n1 = 1, n2 = 1, \mathrm{no}\;n3 \to` per-atom vector, single value per atom
|
||||
- :math:`n1 = 1, n2 > 1, \mathrm{no}\;n3 \to` per-atom array, *n2* values per atom
|
||||
- :math:`n1 = 1, n2 > 0, n3 > 0 \to` per-atom tensor, *n2* x *n3* values per atom
|
||||
|
||||
New syntax: ``ID group-ID STORE/ATOM n1 n2 gflag rflag``
|
||||
|
||||
- :math:`n1 = 1, n2 = 0 \to` per-atom vector, single value per atom
|
||||
- :math:`n1 > 1, n2 = 0 \to` per-atom array, *n1* values per atom
|
||||
- :math:`n1 > 0, n2 > 0 \to` per-atom tensor, *n1* x *n2* values per atom
|
||||
- *gflag* = 0/1, *no*/*yes* communicate per-atom values with ghost atoms
|
||||
- *rflag* = 0/1, *no*/*yes* store per-atom values in restart file
|
||||
|
||||
Since this is an internal fix, there is no user visible change.
|
||||
|
||||
Use Output::get_dump_by_id() instead of Output::find_dump()
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
|
||||
@ -643,6 +643,8 @@ Tohoku University (under MIT license)
|
||||
|
||||
---------------------------
|
||||
|
||||
.. _communication_buffer_coding_with_ubuf:
|
||||
|
||||
Communication buffer coding with *ubuf*
|
||||
---------------------------------------
|
||||
|
||||
|
||||
@ -6,250 +6,9 @@ be extended by writing new classes that derive from existing
|
||||
parent classes in LAMMPS. Here, some specific coding
|
||||
details are provided for writing code for LAMMPS.
|
||||
|
||||
Writing a new fix style
|
||||
^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Writing fixes is a flexible way of extending LAMMPS. Users can
|
||||
implement many things using fixes:
|
||||
|
||||
- changing particles attributes (positions, velocities, forces, etc.). Examples: FixNVE, FixFreeze.
|
||||
- reading/writing data. Example: FixRestart.
|
||||
- adding or modifying properties due to geometry. Example: FixWall.
|
||||
- interacting with other subsystems or external code: Examples: FixTTM, FixExternal, FixLATTE
|
||||
- saving information for analysis or future use (previous positions,
|
||||
for instance). Examples: Fix AveTime, FixStoreState.
|
||||
|
||||
|
||||
All fixes are derived from the Fix base class and must have a
|
||||
constructor with the signature: ``FixPrintVel(class LAMMPS *, int, char **)``.
|
||||
|
||||
Every fix must be registered in LAMMPS by writing the following lines
|
||||
of code in the header before include guards:
|
||||
|
||||
.. code-block:: c++
|
||||
|
||||
#ifdef FIX_CLASS
|
||||
// clang-format off
|
||||
FixStyle(print/vel,FixPrintVel);
|
||||
// clang-format on
|
||||
#else
|
||||
/* the definition of the FixPrintVel class comes here */
|
||||
...
|
||||
#endif
|
||||
|
||||
Where ``print/vel`` is the style name of your fix in the input script and
|
||||
``FixPrintVel`` is the name of the class. The header file would be called
|
||||
``fix_print_vel.h`` and the implementation file ``fix_print_vel.cpp``.
|
||||
These conventions allow LAMMPS to automatically integrate it into the
|
||||
executable when compiling and associate your new fix class with the designated
|
||||
keyword when it parses the input script.
|
||||
|
||||
Let's write a simple fix which will print the average velocity at the end
|
||||
of each timestep. First of all, implement a constructor:
|
||||
|
||||
.. code-block:: c++
|
||||
|
||||
FixPrintVel::FixPrintVel(LAMMPS *lmp, int narg, char **arg)
|
||||
: Fix(lmp, narg, arg)
|
||||
{
|
||||
if (narg < 4)
|
||||
error->all(FLERR,"Illegal fix print/vel command");
|
||||
|
||||
nevery = utils::inumeric(FLERR,arg[3],false,lmp);
|
||||
if (nevery <= 0)
|
||||
error->all(FLERR,"Illegal fix print/vel command");
|
||||
}
|
||||
|
||||
In the constructor you should parse your fix arguments which are
|
||||
specified in the script. All fixes have pretty much the same syntax:
|
||||
``fix <fix-ID> <fix group> <fix name> <fix arguments ...>``. The
|
||||
first 3 parameters are parsed by Fix base class constructor, while
|
||||
``<fix arguments>`` should be parsed by you. In our case, we need to
|
||||
specify how often we want to print an average velocity. For instance,
|
||||
once in 50 timesteps: ``fix 1 print/vel 50``. There is a special variable
|
||||
in the Fix class called ``nevery`` which specifies how often the method
|
||||
``end_of_step()`` is called. Thus all we need to do is just set it up.
|
||||
|
||||
The next method we need to implement is ``setmask()``:
|
||||
|
||||
.. code-block:: c++
|
||||
|
||||
int FixPrintVel::setmask()
|
||||
{
|
||||
int mask = 0;
|
||||
mask |= FixConst::END_OF_STEP;
|
||||
return mask;
|
||||
}
|
||||
|
||||
Here the user specifies which methods of your fix should be called
|
||||
during execution. The constant ``END_OF_STEP`` corresponds to the
|
||||
``end_of_step()`` method. The most important available methods that
|
||||
are called during a timestep and the order in which they are called
|
||||
are shown in the previous section.
|
||||
|
||||
.. code-block:: c++
|
||||
|
||||
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
|
||||
memset(localAvgVel, 0, 4 * sizeof(double));
|
||||
for (int particleInd = 0; particleInd < nlocal; ++particleInd) {
|
||||
add3(localAvgVel, v[particleInd], localAvgVel);
|
||||
}
|
||||
localAvgVel[3] = nlocal;
|
||||
double globalAvgVel[4];
|
||||
memset(globalAvgVel, 0, 4 * sizeof(double));
|
||||
MPI_Allreduce(localAvgVel, globalAvgVel, 4, MPI_DOUBLE, MPI_SUM, world);
|
||||
scale3(1.0 / globalAvgVel[3], globalAvgVel);
|
||||
if ((comm->me == 0) && screen) {
|
||||
fmt::print(screen,"{}, {}, {}\n",
|
||||
globalAvgVel[0], globalAvgVel[1], globalAvgVel[2]);
|
||||
}
|
||||
}
|
||||
|
||||
In the code above, we use MathExtra routines defined in
|
||||
``math_extra.h``. There are bunch of math functions to work with
|
||||
arrays of doubles as with math vectors. It is also important to note
|
||||
that LAMMPS code should always assume to be run in parallel and that
|
||||
atom data is thus distributed across the MPI ranks. Thus you can
|
||||
only process data from local atoms directly and need to use MPI library
|
||||
calls to combine or exchange data. For serial execution, LAMMPS
|
||||
comes bundled with the MPI STUBS library that contains the MPI library
|
||||
function calls in dummy versions that only work for a single MPI rank.
|
||||
|
||||
In this code we use an instance of Atom class. This object is stored
|
||||
in the Pointers class (see ``pointers.h``) which is the base class of
|
||||
the Fix base class. This object contains references to various class
|
||||
instances (the original instances are created and held by the LAMMPS
|
||||
class) with all global information about the simulation system.
|
||||
Data from the Pointers class is available to all classes inherited from
|
||||
it using protected inheritance. Hence when you write you own class,
|
||||
which is going to use LAMMPS data, don't forget to inherit from Pointers
|
||||
or pass an Pointer to it to all functions that need access. When writing
|
||||
fixes we inherit from class Fix which is inherited from Pointers so
|
||||
there is no need to inherit from it directly.
|
||||
|
||||
The code above computes average velocity for all particles in the
|
||||
simulation. Yet you have one unused parameter in fix call from the
|
||||
script: ``group_name``. This parameter specifies the group of atoms
|
||||
used in the fix. So we should compute average for all particles in the
|
||||
simulation only if ``group_name == "all"``, but it can be any group.
|
||||
The group membership information of an atom is contained in the *mask*
|
||||
property of and atom and the bit corresponding to a given group is
|
||||
stored in the groupbit variable which is defined in Fix base class:
|
||||
|
||||
.. code-block:: c++
|
||||
|
||||
for (int i = 0; i < nlocal; ++i) {
|
||||
if (atom->mask[i] & groupbit) {
|
||||
// Do all job here
|
||||
}
|
||||
}
|
||||
|
||||
Class Atom encapsulates atoms positions, velocities, forces, etc. User
|
||||
can access them using particle index. Note, that particle indexes are
|
||||
usually changed every few timesteps because of neighbor list rebuilds
|
||||
and spatial sorting (to improve cache efficiency).
|
||||
|
||||
Let us consider another Fix example: We want to have a fix which stores
|
||||
atoms position from previous time step in your fix. The local atoms
|
||||
indexes may not be valid on the next iteration. In order to handle
|
||||
this situation there are several methods which should be implemented:
|
||||
|
||||
- ``double memory_usage()``: return how much memory the fix uses (optional)
|
||||
- ``void grow_arrays(int)``: do reallocation of the per particle arrays in your fix
|
||||
- ``void copy_arrays(int i, int j, int delflag)``: copy i-th per-particle
|
||||
information to j-th. Used when atom sorting is performed. if delflag is set
|
||||
and atom j owns a body, move the body information to atom i.
|
||||
- ``void set_arrays(int i)``: sets i-th particle related information to zero
|
||||
|
||||
Note, that if your class implements these methods, it must call add calls of
|
||||
add_callback and delete_callback to constructor and destructor. Since we want
|
||||
to store positions of atoms from previous timestep, we need to add
|
||||
``double** xold`` to the header file. Than add allocation code
|
||||
to the constructor:
|
||||
|
||||
.. code-block:: c++
|
||||
|
||||
FixSavePos::FixSavePos(LAMMPS *lmp, int narg, char **arg), xold(nullptr)
|
||||
{
|
||||
//...
|
||||
memory->create(xold, atom->nmax, 3, "FixSavePos:x");
|
||||
atom->add_callback(0);
|
||||
}
|
||||
|
||||
FixSavePos::~FixSavePos() {
|
||||
atom->delete_callback(id, 0);
|
||||
memory->destroy(xold);
|
||||
}
|
||||
|
||||
Implement the aforementioned methods:
|
||||
|
||||
.. code-block:: c++
|
||||
|
||||
double FixSavePos::memory_usage()
|
||||
{
|
||||
int nmax = atom->nmax;
|
||||
double bytes = 0.0;
|
||||
bytes += nmax * 3 * sizeof(double);
|
||||
return bytes;
|
||||
}
|
||||
|
||||
void FixSavePos::grow_arrays(int nmax)
|
||||
{
|
||||
memory->grow(xold, nmax, 3, "FixSavePos:xold");
|
||||
}
|
||||
|
||||
void FixSavePos::copy_arrays(int i, int j, int delflag)
|
||||
{
|
||||
memcpy(xold[j], xold[i], sizeof(double) * 3);
|
||||
}
|
||||
|
||||
void FixSavePos::set_arrays(int i)
|
||||
{
|
||||
memset(xold[i], 0, sizeof(double) * 3);
|
||||
}
|
||||
|
||||
int FixSavePos::pack_exchange(int i, double *buf)
|
||||
{
|
||||
int m = 0;
|
||||
buf[m++] = xold[i][0];
|
||||
buf[m++] = xold[i][1];
|
||||
buf[m++] = xold[i][2];
|
||||
|
||||
return m;
|
||||
}
|
||||
|
||||
int FixSavePos::unpack_exchange(int nlocal, double *buf)
|
||||
{
|
||||
int m = 0;
|
||||
xold[nlocal][0] = buf[m++];
|
||||
xold[nlocal][1] = buf[m++];
|
||||
xold[nlocal][2] = buf[m++];
|
||||
|
||||
return m;
|
||||
}
|
||||
|
||||
Now, a little bit about memory allocation. We use the Memory class which
|
||||
is just a bunch of template functions for allocating 1D and 2D
|
||||
arrays. So you need to add include ``memory.h`` to have access to them.
|
||||
|
||||
Finally, if you need to write/read some global information used in
|
||||
your fix to the restart file, you might do it by setting flag
|
||||
``restart_global = 1`` in the constructor and implementing methods void
|
||||
``write_restart(FILE *fp)`` and ``void restart(char *buf)``.
|
||||
If, in addition, you want to write the per-atom property to restart
|
||||
files additional settings and functions are needed:
|
||||
|
||||
- a fix flag indicating this needs to be set ``restart_peratom = 1;``
|
||||
- ``atom->add_callback()`` and ``atom->delete_callback()`` must be called
|
||||
a second time with the final argument set to 1 instead of 0 (indicating
|
||||
restart processing instead of per-atom data memory management).
|
||||
- the functions ``void pack_restart(int i, double *buf)`` and
|
||||
``void unpack_restart(int nlocal, int nth)`` need to be implemented
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
Developer_write_pair
|
||||
Developer_write_fix
|
||||
|
||||
245
doc/src/Developer_write_fix.rst
Normal file
245
doc/src/Developer_write_fix.rst
Normal file
@ -0,0 +1,245 @@
|
||||
Writing a new fix style
|
||||
^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Writing fix styles is a flexible way of extending LAMMPS. Users can
|
||||
implement many things using fixes. Some fix styles are only used
|
||||
internally to support compute styles or pair styles:
|
||||
|
||||
- change particles attributes (positions, velocities, forces, etc.). Examples: ``FixNVE``, ``FixFreeze``.
|
||||
- read or write data. Example: ``FixRestart``.
|
||||
- adding or modifying properties due to geometry. Example: ``FixWall``.
|
||||
- interacting with other subsystems or external code: Examples: ``FixTTM``, ``FixExternal``, ``FixMDI``
|
||||
- saving information for analysis or future use (previous positions,
|
||||
for instance). Examples: ``FixAveTime``, ``FixStoreState``.
|
||||
|
||||
All fixes are derived from the ``Fix`` base class and must have a
|
||||
constructor with the signature: ``FixPrintVel(class LAMMPS *, int, char **)``.
|
||||
|
||||
Every fix must be registered in LAMMPS by writing the following lines
|
||||
of code in the header before include guards:
|
||||
|
||||
.. code-block:: c++
|
||||
|
||||
#ifdef FIX_CLASS
|
||||
// clang-format off
|
||||
FixStyle(print/vel,FixPrintVel);
|
||||
// clang-format on
|
||||
#else
|
||||
/* the definition of the FixPrintVel class comes here */
|
||||
...
|
||||
#endif
|
||||
|
||||
Where ``print/vel`` is the style name of your fix in the input script and
|
||||
``FixPrintVel`` is the name of the class. The header file would be called
|
||||
``fix_print_vel.h`` and the implementation file ``fix_print_vel.cpp``.
|
||||
These conventions allow LAMMPS to automatically integrate it into the
|
||||
executable when compiling and associate your new fix class with the designated
|
||||
keyword when it parses the input script.
|
||||
|
||||
Let's write a simple fix which will print the average velocity at the end
|
||||
of each timestep. First of all, implement a constructor:
|
||||
|
||||
.. code-block:: c++
|
||||
|
||||
FixPrintVel::FixPrintVel(LAMMPS *lmp, int narg, char **arg)
|
||||
: Fix(lmp, narg, arg)
|
||||
{
|
||||
if (narg < 4) utils::missing_cmd_args(FLERR, "fix print/vel", error);
|
||||
|
||||
nevery = utils::inumeric(FLERR,arg[3],false,lmp);
|
||||
if (nevery <= 0)
|
||||
error->all(FLERR,"Illegal fix print/vel nevery value: {}", nevery);
|
||||
}
|
||||
|
||||
In the constructor you should parse the fix arguments which are
|
||||
specified in the script. All fixes have pretty much the same syntax:
|
||||
``fix <fix-ID> <fix group> <fix name> <fix arguments ...>``. The first 3
|
||||
parameters are parsed by Fix base class constructor, while ``<fix
|
||||
arguments>`` should be parsed by you. In our case, we need to specify
|
||||
how often we want to print an average velocity. For instance, once in 50
|
||||
timesteps: ``fix 1 print/vel 50``. There is a special variable in the
|
||||
Fix class called ``nevery`` which specifies how often the method
|
||||
``end_of_step()`` is called. Thus all we need to do is just set it up.
|
||||
|
||||
The next method we need to implement is ``setmask()``:
|
||||
|
||||
.. code-block:: c++
|
||||
|
||||
int FixPrintVel::setmask()
|
||||
{
|
||||
int mask = 0;
|
||||
mask |= FixConst::END_OF_STEP;
|
||||
return mask;
|
||||
}
|
||||
|
||||
Here the we specify which methods of the fix should be called during
|
||||
:doc:`execution of a timestep <Developer_flow>`. The constant
|
||||
``END_OF_STEP`` corresponds to the ``end_of_step()`` method. The most
|
||||
important available methods that are called during a timestep.
|
||||
|
||||
.. code-block:: c++
|
||||
|
||||
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
|
||||
memset(localAvgVel, 0, 4 * sizeof(double));
|
||||
for (int particleInd = 0; particleInd < nlocal; ++particleInd) {
|
||||
add3(localAvgVel, v[particleInd], localAvgVel);
|
||||
}
|
||||
localAvgVel[3] = nlocal;
|
||||
double globalAvgVel[4];
|
||||
memset(globalAvgVel, 0, 4 * sizeof(double));
|
||||
MPI_Allreduce(localAvgVel, globalAvgVel, 4, MPI_DOUBLE, MPI_SUM, world);
|
||||
scale3(1.0 / globalAvgVel[3], globalAvgVel);
|
||||
if ((comm->me == 0) && screen) {
|
||||
fmt::print(screen,"{}, {}, {}\n",
|
||||
globalAvgVel[0], globalAvgVel[1], globalAvgVel[2]);
|
||||
}
|
||||
}
|
||||
|
||||
In the code above, we use MathExtra routines defined in
|
||||
``math_extra.h``. There are bunch of math functions to work with
|
||||
arrays of doubles as with math vectors. It is also important to note
|
||||
that LAMMPS code should always assume to be run in parallel and that
|
||||
atom data is thus distributed across the MPI ranks. Thus you can
|
||||
only process data from local atoms directly and need to use MPI library
|
||||
calls to combine or exchange data. For serial execution, LAMMPS
|
||||
comes bundled with the MPI STUBS library that contains the MPI library
|
||||
function calls in dummy versions that only work for a single MPI rank.
|
||||
|
||||
In this code we use an instance of Atom class. This object is stored
|
||||
in the Pointers class (see ``pointers.h``) which is the base class of
|
||||
the Fix base class. This object contains references to various class
|
||||
instances (the original instances are created and held by the LAMMPS
|
||||
class) with all global information about the simulation system.
|
||||
Data from the Pointers class is available to all classes inherited from
|
||||
it using protected inheritance. Hence when you write you own class,
|
||||
which is going to use LAMMPS data, don't forget to inherit from Pointers
|
||||
or pass a Pointer to it to all functions that need access. When writing
|
||||
fixes we inherit from class Fix which is inherited from Pointers so
|
||||
there is no need to inherit from it directly.
|
||||
|
||||
The code above computes average velocity for all particles in the
|
||||
simulation. Yet you have one unused parameter in fix call from the
|
||||
script: ``group_name``. This parameter specifies the group of atoms
|
||||
used in the fix. So we should compute average for all particles in the
|
||||
simulation only if ``group_name == "all"``, but it can be any group.
|
||||
The group membership information of an atom is contained in the *mask*
|
||||
property of an atom and the bit corresponding to a given group is
|
||||
stored in the groupbit variable which is defined in Fix base class:
|
||||
|
||||
.. code-block:: c++
|
||||
|
||||
for (int i = 0; i < nlocal; ++i) {
|
||||
if (atom->mask[i] & groupbit) {
|
||||
// Do all job here
|
||||
}
|
||||
}
|
||||
|
||||
Class Atom encapsulates atoms positions, velocities, forces, etc. Users
|
||||
can access them using particle index. Note, that particle indexes are
|
||||
usually changed every few timesteps because of neighbor list rebuilds
|
||||
and spatial sorting (to improve cache efficiency).
|
||||
|
||||
Let us consider another Fix example: We want to have a fix which stores
|
||||
atoms position from the previous time step in your fix. The local atoms
|
||||
indexes may not be valid on the next iteration. In order to handle
|
||||
this situation there are several methods which should be implemented:
|
||||
|
||||
- ``double memory_usage()``: return how much memory the fix uses (optional)
|
||||
- ``void grow_arrays(int)``: do reallocation of the per-particle arrays in your fix
|
||||
- ``void copy_arrays(int i, int j, int delflag)``: copy i-th per-particle
|
||||
information to j-th. Used when atom sorting is performed. if delflag is set
|
||||
and atom j owns a body, move the body information to atom i.
|
||||
- ``void set_arrays(int i)``: sets i-th particle related information to zero
|
||||
|
||||
Note, that if your class implements these methods, it must add calls of
|
||||
add_callback and delete_callback to the constructor and destructor. Since we want
|
||||
to store positions of atoms from the previous timestep, we need to add
|
||||
``double** xold`` to the header file. Than add allocation code
|
||||
to the constructor:
|
||||
|
||||
.. code-block:: c++
|
||||
|
||||
FixSavePos::FixSavePos(LAMMPS *lmp, int narg, char **arg), xold(nullptr)
|
||||
{
|
||||
//...
|
||||
memory->create(xold, atom->nmax, 3, "FixSavePos:x");
|
||||
atom->add_callback(0);
|
||||
}
|
||||
|
||||
FixSavePos::~FixSavePos() {
|
||||
atom->delete_callback(id, 0);
|
||||
memory->destroy(xold);
|
||||
}
|
||||
|
||||
Implement the aforementioned methods:
|
||||
|
||||
.. code-block:: c++
|
||||
|
||||
double FixSavePos::memory_usage()
|
||||
{
|
||||
int nmax = atom->nmax;
|
||||
double bytes = 0.0;
|
||||
bytes += nmax * 3 * sizeof(double);
|
||||
return bytes;
|
||||
}
|
||||
|
||||
void FixSavePos::grow_arrays(int nmax)
|
||||
{
|
||||
memory->grow(xold, nmax, 3, "FixSavePos:xold");
|
||||
}
|
||||
|
||||
void FixSavePos::copy_arrays(int i, int j, int delflag)
|
||||
{
|
||||
memcpy(xold[j], xold[i], sizeof(double) * 3);
|
||||
}
|
||||
|
||||
void FixSavePos::set_arrays(int i)
|
||||
{
|
||||
memset(xold[i], 0, sizeof(double) * 3);
|
||||
}
|
||||
|
||||
int FixSavePos::pack_exchange(int i, double *buf)
|
||||
{
|
||||
int m = 0;
|
||||
buf[m++] = xold[i][0];
|
||||
buf[m++] = xold[i][1];
|
||||
buf[m++] = xold[i][2];
|
||||
|
||||
return m;
|
||||
}
|
||||
|
||||
int FixSavePos::unpack_exchange(int nlocal, double *buf)
|
||||
{
|
||||
int m = 0;
|
||||
xold[nlocal][0] = buf[m++];
|
||||
xold[nlocal][1] = buf[m++];
|
||||
xold[nlocal][2] = buf[m++];
|
||||
|
||||
return m;
|
||||
}
|
||||
|
||||
Now, a little bit about memory allocation. We use the Memory class which
|
||||
is just a bunch of template functions for allocating 1D and 2D
|
||||
arrays. So you need to add include ``memory.h`` to have access to them.
|
||||
|
||||
Finally, if you need to write/read some global information used in
|
||||
your fix to the restart file, you might do it by setting flag
|
||||
``restart_global = 1`` in the constructor and implementing methods void
|
||||
``write_restart(FILE *fp)`` and ``void restart(char *buf)``.
|
||||
If, in addition, you want to write the per-atom property to restart
|
||||
files additional settings and functions are needed:
|
||||
|
||||
- a fix flag indicating this needs to be set ``restart_peratom = 1;``
|
||||
- ``atom->add_callback()`` and ``atom->delete_callback()`` must be called
|
||||
a second time with the final argument set to 1 instead of 0 (indicating
|
||||
restart processing instead of per-atom data memory management).
|
||||
- the functions ``void pack_restart(int i, double *buf)`` and
|
||||
``void unpack_restart(int nlocal, int nth)`` need to be implemented
|
||||
|
||||
1354
doc/src/Developer_write_pair.rst
Normal file
1354
doc/src/Developer_write_pair.rst
Normal file
File diff suppressed because it is too large
Load Diff
@ -75,7 +75,7 @@ Using the GDB debugger to get a stack trace
|
||||
There are two options to use the GDB debugger for identifying the origin
|
||||
of the segmentation fault or similar crash. The GDB debugger has many
|
||||
more features and options, as can be seen for example its `online
|
||||
documentation <https://sourceware.org/gdb/current/onlinedocs/gdb/>`_.
|
||||
documentation <https://www.sourceware.org/gdb/documentation/>`_.
|
||||
|
||||
Run LAMMPS from within the debugger
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
@ -94,8 +94,6 @@ Lowercase directories
|
||||
+-------------+------------------------------------------------------------------+
|
||||
| kim | use of potentials from the `OpenKIM Repository <openkim_>`_ |
|
||||
+-------------+------------------------------------------------------------------+
|
||||
| latte | examples for using fix latte for DFTB via the LATTE library |
|
||||
+-------------+------------------------------------------------------------------+
|
||||
| mdi | use of the MDI package and MolSSI MDI code coupling library |
|
||||
+-------------+------------------------------------------------------------------+
|
||||
| meam | MEAM test for SiC and shear (same as shear examples) |
|
||||
|
||||
@ -56,17 +56,6 @@ C++ in the ``examples/COUPLE/simple`` folder of the LAMMPS distribution.
|
||||
and Ubuntu 18.04 LTS and not compatible. Either newer compilers
|
||||
need to be installed or the Linux updated.
|
||||
|
||||
.. versionchanged:: 8Feb2023
|
||||
|
||||
.. note::
|
||||
|
||||
A contributed Fortran interface is available in the
|
||||
``examples/COUPLE/fortran2`` folder. However, since the completion
|
||||
of the :f:mod:`LIBLAMMPS` module, this interface is now deprecated,
|
||||
no longer actively maintained and will likely be removed in the
|
||||
future. Please see the ``README`` file in that folder for more
|
||||
information about it and how to contact its author and maintainer.
|
||||
|
||||
----------
|
||||
|
||||
Creating or deleting a LAMMPS object
|
||||
@ -203,40 +192,62 @@ Below is an example demonstrating some of the possible uses.
|
||||
|
||||
.. code-block:: fortran
|
||||
|
||||
PROGRAM testprop
|
||||
USE LIBLAMMPS
|
||||
USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_double, c_int64_t
|
||||
USE, INTRINSIC :: ISO_FORTRAN_ENV, ONLY : OUTPUT_UNIT
|
||||
TYPE(lammps) :: lmp
|
||||
INTEGER(KIND=c_int64_t), POINTER :: natoms
|
||||
REAL(KIND=c_double), POINTER :: dt
|
||||
INTEGER(KIND=c_int64_t), POINTER :: ntimestep
|
||||
REAL(KIND=c_double) :: pe, ke
|
||||
PROGRAM testprop
|
||||
USE LIBLAMMPS
|
||||
USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_double, c_int64_t, c_int
|
||||
USE, INTRINSIC :: ISO_FORTRAN_ENV, ONLY : OUTPUT_UNIT
|
||||
TYPE(lammps) :: lmp
|
||||
INTEGER(KIND=c_int64_t), POINTER :: natoms, ntimestep, bval
|
||||
REAL(KIND=c_double), POINTER :: dt, dval
|
||||
INTEGER(KIND=c_int), POINTER :: nfield, typ, ival
|
||||
INTEGER(KIND=c_int) :: i
|
||||
CHARACTER(LEN=11) :: key
|
||||
REAL(KIND=c_double) :: pe, ke
|
||||
|
||||
lmp = lammps()
|
||||
CALL lmp%file('in.sysinit')
|
||||
natoms = lmp%extract_global('natoms')
|
||||
WRITE(OUTPUT_UNIT,'(A,I0,A)') 'Running a simulation with ', natoms, ' atoms'
|
||||
WRITE(OUTPUT_UNIT,'(I0,A,I0,A,I0,A)') lmp%extract_setting('nlocal'), &
|
||||
' local and ', lmp%extract_setting('nghost'), ' ghost atoms. ', &
|
||||
lmp%extract_setting('ntypes'), ' atom types'
|
||||
lmp = lammps()
|
||||
CALL lmp%file('in.sysinit')
|
||||
natoms = lmp%extract_global('natoms')
|
||||
WRITE(OUTPUT_UNIT,'(A,I0,A)') 'Running a simulation with ', natoms, ' atoms'
|
||||
WRITE(OUTPUT_UNIT,'(I0,A,I0,A,I0,A)') lmp%extract_setting('nlocal'), &
|
||||
' local and ', lmp%extract_setting('nghost'), ' ghost atoms. ', &
|
||||
lmp%extract_setting('ntypes'), ' atom types'
|
||||
|
||||
CALL lmp%command('run 2 post no')
|
||||
dt = lmp%extract_global('dt')
|
||||
ntimestep = lmp%extract_global('ntimestep')
|
||||
WRITE(OUTPUT_UNIT,'(A,I0,A,F4.1,A)') 'At step: ', ntimestep, &
|
||||
' Changing timestep from', dt, ' to 0.5'
|
||||
dt = 0.5_c_double
|
||||
CALL lmp%command('run 2 post no')
|
||||
CALL lmp%command('run 2 post no')
|
||||
|
||||
WRITE(OUTPUT_UNIT,'(A,I0)') 'At step: ', ntimestep
|
||||
pe = lmp%get_thermo('pe')
|
||||
ke = lmp%get_thermo('ke')
|
||||
PRINT*, 'PE = ', pe
|
||||
PRINT*, 'KE = ', ke
|
||||
ntimestep = lmp%last_thermo('step', 0)
|
||||
nfield = lmp%last_thermo('num', 0)
|
||||
WRITE(OUTPUT_UNIT,'(A,I0,A,I0)') 'Last thermo output on step: ', ntimestep, &
|
||||
', number of fields: ', nfield
|
||||
DO i=1, nfield
|
||||
key = lmp%last_thermo('keyword',i)
|
||||
typ = lmp%last_thermo('type',i)
|
||||
IF (typ == lmp%dtype%i32) THEN
|
||||
ival = lmp%last_thermo('data',i)
|
||||
WRITE(OUTPUT_UNIT,*) key, ':', ival
|
||||
ELSE IF (typ == lmp%dtype%i64) THEN
|
||||
bval = lmp%last_thermo('data',i)
|
||||
WRITE(OUTPUT_UNIT,*) key, ':', bval
|
||||
ELSE IF (typ == lmp%dtype%r64) THEN
|
||||
dval = lmp%last_thermo('data',i)
|
||||
WRITE(OUTPUT_UNIT,*) key, ':', dval
|
||||
END IF
|
||||
END DO
|
||||
|
||||
CALL lmp%close(.TRUE.)
|
||||
END PROGRAM testprop
|
||||
dt = lmp%extract_global('dt')
|
||||
ntimestep = lmp%extract_global('ntimestep')
|
||||
WRITE(OUTPUT_UNIT,'(A,I0,A,F4.1,A)') 'At step: ', ntimestep, &
|
||||
' Changing timestep from', dt, ' to 0.5'
|
||||
dt = 0.5_c_double
|
||||
CALL lmp%command('run 2 post no')
|
||||
|
||||
WRITE(OUTPUT_UNIT,'(A,I0)') 'At step: ', ntimestep
|
||||
pe = lmp%get_thermo('pe')
|
||||
ke = lmp%get_thermo('ke')
|
||||
WRITE(OUTPUT_UNIT,*) 'PE = ', pe
|
||||
WRITE(OUTPUT_UNIT,*) 'KE = ', ke
|
||||
|
||||
CALL lmp%close(.TRUE.)
|
||||
END PROGRAM testprop
|
||||
|
||||
---------------
|
||||
|
||||
@ -262,6 +273,8 @@ of the contents of the :f:mod:`LIBLAMMPS` Fortran interface to LAMMPS.
|
||||
:ftype style: type(lammps_style)
|
||||
:f type: derived type to access lammps type constants
|
||||
:ftype type: type(lammps_type)
|
||||
:f dtype: derived type to access lammps data type constants
|
||||
:ftype dtype: type(lammps_dtype)
|
||||
:f close: :f:subr:`close`
|
||||
:ftype close: subroutine
|
||||
:f subroutine error: :f:subr:`error`
|
||||
@ -278,6 +291,8 @@ of the contents of the :f:mod:`LIBLAMMPS` Fortran interface to LAMMPS.
|
||||
:ftype get_natoms: function
|
||||
:f get_thermo: :f:func:`get_thermo`
|
||||
:ftype get_thermo: function
|
||||
:f last_thermo: :f:func:`last_thermo`
|
||||
:ftype last_thermo: function
|
||||
:f extract_box: :f:subr:`extract_box`
|
||||
:ftype extract_box: subroutine
|
||||
:f reset_box: :f:subr:`reset_box`
|
||||
@ -587,6 +602,96 @@ Procedures Bound to the :f:type:`lammps` Derived Type
|
||||
|
||||
--------
|
||||
|
||||
.. f:function:: last_thermo(what, index)
|
||||
|
||||
This function will call :cpp:func:`lammps_last_thermo` and returns
|
||||
either a string or a pointer to a cached copy of LAMMPS last thermodynamic
|
||||
output, depending on the data requested through *what*. Note that *index*
|
||||
uses 1-based indexing to access thermo output columns.
|
||||
|
||||
.. versionadded:: 15Jun2023
|
||||
|
||||
Note that this function actually does not return a value, but rather
|
||||
associates the pointer on the left side of the assignment to point to
|
||||
internal LAMMPS data (with the exception of string data, which are
|
||||
copied and returned as ordinary Fortran strings). Pointers must be
|
||||
of the correct data type to point to said data (typically
|
||||
``INTEGER(c_int)``, ``INTEGER(c_int64_t)``, or ``REAL(c_double)``).
|
||||
The pointer being associated with LAMMPS data is type-checked at
|
||||
run-time via an overloaded assignment operator. The pointers
|
||||
returned by this function point to temporary, read-only data that may
|
||||
be overwritten at any time, so their target values need to be copied
|
||||
to local storage if they are supposed to persist.
|
||||
|
||||
For example,
|
||||
|
||||
.. code-block:: fortran
|
||||
|
||||
PROGRAM thermo
|
||||
USE LIBLAMMPS
|
||||
USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_double, c_int64_t, c_int
|
||||
TYPE(lammps) :: lmp
|
||||
INTEGER(KIND=c_int64_t), POINTER :: ntimestep, bval
|
||||
REAL(KIND=c_double), POINTER :: dval
|
||||
INTEGER(KIND=c_int), POINTER :: nfield, typ, ival
|
||||
INTEGER(KIND=c_int) :: i
|
||||
CHARACTER(LEN=11) :: key
|
||||
|
||||
lmp = lammps()
|
||||
CALL lmp%file('in.sysinit')
|
||||
|
||||
ntimestep = lmp%last_thermo('step', 0)
|
||||
nfield = lmp%last_thermo('num', 0)
|
||||
PRINT*, 'Last thermo output on step: ', ntimestep, ' Number of fields: ', nfield
|
||||
DO i=1, nfield
|
||||
key = lmp%last_thermo('keyword',i)
|
||||
typ = lmp%last_thermo('type',i)
|
||||
IF (typ == lmp%dtype%i32) THEN
|
||||
ival = lmp%last_thermo('data',i)
|
||||
PRINT*, key, ':', ival
|
||||
ELSE IF (typ == lmp%dtype%i64) THEN
|
||||
bval = lmp%last_thermo('data',i)
|
||||
PRINT*, key, ':', bval
|
||||
ELSE IF (typ == lmp%dtype%r64) THEN
|
||||
dval = lmp%last_thermo('data',i)
|
||||
PRINT*, key, ':', dval
|
||||
END IF
|
||||
END DO
|
||||
CALL lmp%close(.TRUE.)
|
||||
END PROGRAM thermo
|
||||
|
||||
would extract the last timestep where thermo output was done and the number
|
||||
of columns it printed. Then it loops over the columns to print out column
|
||||
header keywords and the corresponding data.
|
||||
|
||||
.. note::
|
||||
|
||||
If :f:func:`last_thermo` returns a string, the string must have a length
|
||||
greater than or equal to the length of the string (not including the
|
||||
terminal ``NULL`` character) that LAMMPS returns. If the variable's
|
||||
length is too short, the string will be truncated. As usual in Fortran,
|
||||
strings are padded with spaces at the end. If you use an allocatable
|
||||
string, the string **must be allocated** prior to calling this function.
|
||||
|
||||
:p character(len=\*) what: string with the name of the thermo keyword
|
||||
:p integer(c_int) index: 1-based column index
|
||||
:to: :cpp:func:`lammps_last_thermo`
|
||||
:r pointer [polymorphic]: pointer to LAMMPS data. The left-hand side of the
|
||||
assignment should be either a string (if expecting string data) or a
|
||||
C-compatible pointer (e.g., ``INTEGER(c_int), POINTER :: nlocal``) to the
|
||||
extracted property.
|
||||
|
||||
.. warning::
|
||||
|
||||
Modifying the data in the location pointed to by the returned pointer
|
||||
may lead to inconsistent internal data and thus may cause failures,
|
||||
crashes, or bogus simulations. In general, it is much better
|
||||
to use a LAMMPS input command that sets or changes these parameters.
|
||||
Using an input command will take care of all side effects and necessary
|
||||
updates of settings derived from such settings.
|
||||
|
||||
--------
|
||||
|
||||
.. f:subroutine:: extract_box([boxlo][, boxhi][, xy][, yz][, xz][, pflags][, boxflag])
|
||||
|
||||
This subroutine will call :cpp:func:`lammps_extract_box`. All
|
||||
@ -764,13 +869,14 @@ Procedures Bound to the :f:type:`lammps` Derived Type
|
||||
|
||||
.. note::
|
||||
|
||||
If :f:func:`extract_global` returns a string, the string must have length
|
||||
greater than or equal to the length of the string (not including the
|
||||
terminal ``NULL`` character) that LAMMPS returns. If the variable's
|
||||
length is too short, the string will be truncated. As usual in Fortran,
|
||||
strings are padded with spaces at the end. If you use an allocatable
|
||||
string, the string **must be allocated** prior to calling this function,
|
||||
but you can automatically reallocate it to the correct length after the
|
||||
If :f:func:`extract_global` returns a string, the string must have
|
||||
a length greater than or equal to the length of the string (not
|
||||
including the terminal ``NULL`` character) that LAMMPS returns. If
|
||||
the variable's length is too short, the string will be
|
||||
truncated. As usual in Fortran, strings are padded with spaces at
|
||||
the end. If you use an allocatable string, the string **must be
|
||||
allocated** prior to calling this function, but you can
|
||||
automatically reallocate it to the correct length after the
|
||||
function returns, viz.,
|
||||
|
||||
.. code-block :: fortran
|
||||
@ -2155,7 +2261,7 @@ Procedures Bound to the :f:type:`lammps` Derived Type
|
||||
|
||||
The LAMMPS :doc:`dump style movie <dump_image>` supports generating movies
|
||||
from images on-the-fly via creating a pipe to the
|
||||
`ffmpeg <https://ffmpeg.org/ffmpeg/>`_ program.
|
||||
`ffmpeg <https://ffmpeg.org/>`_ program.
|
||||
This function checks whether this feature was
|
||||
:ref:`enabled at compile time <graphics>`.
|
||||
It does **not** check whether the ``ffmpeg`` itself is installed and usable.
|
||||
|
||||
@ -23,7 +23,6 @@ General howto
|
||||
Howto_library
|
||||
Howto_couple
|
||||
Howto_mdi
|
||||
Howto_bpm
|
||||
Howto_broken_bonds
|
||||
|
||||
Settings howto
|
||||
@ -70,6 +69,7 @@ Force fields howto
|
||||
Howto_amoeba
|
||||
Howto_tip3p
|
||||
Howto_tip4p
|
||||
Howto_tip5p
|
||||
Howto_spc
|
||||
|
||||
Packages howto
|
||||
@ -82,6 +82,7 @@ Packages howto
|
||||
Howto_spherical
|
||||
Howto_granular
|
||||
Howto_body
|
||||
Howto_bpm
|
||||
Howto_polarizable
|
||||
Howto_coreshell
|
||||
Howto_drude
|
||||
@ -99,6 +100,7 @@ Tutorials howto
|
||||
|
||||
Howto_cmake
|
||||
Howto_github
|
||||
Howto_lammps_gui
|
||||
Howto_pylammps
|
||||
Howto_wsl
|
||||
|
||||
|
||||
@ -13,9 +13,9 @@ box with a single z plane of atoms - e.g.
|
||||
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
create box 1 -10 10 -10 10 -0.25 0.25
|
||||
create_box 1 -10 10 -10 10 -0.25 0.25
|
||||
|
||||
If using the :doc:`read data <read_data>` command to read in a file of
|
||||
If using the :doc:`read_data <read_data>` command to read in a file of
|
||||
atom coordinates, set the "zlo zhi" values to be finite but narrow,
|
||||
similar to the create_box command settings just described. For each
|
||||
atom in the file, assign a z coordinate so it falls inside the
|
||||
|
||||
@ -79,9 +79,9 @@ As bonds can be broken between neighbor list builds, the
|
||||
bond styles. There are two possible settings which determine how pair
|
||||
interactions work between bonded particles. First, one can overlay
|
||||
pair forces with bond forces such that all bonded particles also
|
||||
feel pair interactions. This can be accomplished by using the *overlay/pair*
|
||||
keyword present in all bpm bond styles and by using the following special
|
||||
bond settings
|
||||
feel pair interactions. This can be accomplished by setting the *overlay/pair*
|
||||
keyword present in all bpm bond styles to *yes* and requires using the
|
||||
following special bond settings
|
||||
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
@ -107,7 +107,17 @@ bond lists is expensive. By setting the lj weight for 1-2 bonds to
|
||||
zero, this turns off pairwise interactions. Even though there are no
|
||||
charges in BPM models, setting a nonzero coul weight for 1-2 bonds
|
||||
ensures all bonded neighbors are still included in the neighbor list
|
||||
in case bonds break between neighbor list builds.
|
||||
in case bonds break between neighbor list builds. If bond breakage is
|
||||
disabled during a simulation run by setting the *break* keyword to *no*,
|
||||
a zero coul weight for 1-2 bonds can be used to exclude bonded atoms
|
||||
from the neighbor list builds
|
||||
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
special_bonds lj 0 1 1 coul 0 1 1
|
||||
|
||||
This can be useful for post-processing, or to determine pair interaction
|
||||
properties between distinct bonded particles.
|
||||
|
||||
To monitor the fracture of bonds in the system, all BPM bond styles
|
||||
have the ability to record instances of bond breakage to output using
|
||||
|
||||
@ -1,48 +1,56 @@
|
||||
Broken Bonds
|
||||
============
|
||||
|
||||
Typically, bond interactions persist for the duration of a simulation in
|
||||
LAMMPS. However, there are some exceptions that allow for bonds to
|
||||
break, including the :doc:`quartic bond style <bond_quartic>` and the
|
||||
bond styles in the :doc:`BPM package <Howto_bpm>` which contains the
|
||||
:doc:`bpm/spring <bond_bpm_spring>` and :doc:`bpm/rotational
|
||||
<bond_bpm_rotational>` bond styles. In these cases, a bond can be broken
|
||||
if it is stretched beyond a user-defined threshold. LAMMPS accomplishes
|
||||
this by setting the bond type to 0, such that the bond force is no
|
||||
longer computed.
|
||||
Typically, molecular bond interactions persist for the duration of a
|
||||
simulation in LAMMPS. However, some commands break bonds dynamically,
|
||||
including the following:
|
||||
|
||||
Users are normally able to weight the contribution of pair forces to atoms
|
||||
that are bonded using the :doc:`special_bonds command <special_bonds>`.
|
||||
When bonds break, this is not always the case. For the quartic bond style,
|
||||
pair forces are always turned off between bonded particles. LAMMPS does
|
||||
this via a computational sleight-of-hand. It subtracts the pairwise
|
||||
interaction as part of the bond computation. When the bond breaks, the
|
||||
subtraction stops. For this to work, the pairwise interaction must always
|
||||
be computed by the :doc:`pair_style <pair_style>` command, whether the bond
|
||||
is broken or not. This means that :doc:`special_bonds <special_bonds>` must
|
||||
be set to 1,1,1. After the bond breaks, the pairwise interaction between the
|
||||
two atoms is turned on, since they are no longer bonded.
|
||||
* :doc:`bond_style quartic <bond_quartic>`
|
||||
* :doc:`fix bond/break <fix_bond_break>`
|
||||
* :doc:`fix bond/react <fix_bond_react>`
|
||||
* :doc:`BPM package <Howto_bpm>` bond styles
|
||||
|
||||
In the BPM package, one can either turn off all pair interactions between
|
||||
bonded particles or leave them on, overlaying pair forces on top of bond
|
||||
forces. To remove pair forces, the special bond list is dynamically
|
||||
updated. More details can be found on the :doc:`Howto BPM <Howto_bpm>`
|
||||
page.
|
||||
A bond can break if it is stretched beyond a user-defined threshold or
|
||||
more generally if other criteria are met.
|
||||
|
||||
Bonds can also be broken by fixes which change bond topology, including
|
||||
:doc:`fix bond/break <fix_bond_break>` and
|
||||
:doc:`fix bond/react <fix_bond_react>`. These fixes will automatically
|
||||
trigger a rebuild of the neighbor list and update special bond data structures
|
||||
when bonds are broken.
|
||||
For the quartic bond style, when a bond is broken its bond type is set
|
||||
to 0 to effectively break it and pairwise forces between the two atoms
|
||||
in the broken bond are "turned on". Angles, dihedrals, etc cannot be
|
||||
defined for a system when :doc:`bond_style quartic <bond_quartic>` is
|
||||
used.
|
||||
|
||||
Note that when bonds are dumped to a file via the :doc:`dump local <dump>` command, bonds with type 0 are not included. The
|
||||
:doc:`delete_bonds <delete_bonds>` command can also be used to query the
|
||||
status of broken bonds or permanently delete them, e.g.:
|
||||
Similarly, bond styles in the BPM package are also incompatible with
|
||||
angles, dihedrals, etc. and when a bond breaks its type is set to zero.
|
||||
However, in the BPM package one can either turn off all pair interactions
|
||||
between bonded particles or leave them on, overlaying pair forces on
|
||||
top of bond forces. To remove pair forces, the special bond list is
|
||||
dynamically updated. More details can be found on the :doc:`Howto BPM
|
||||
<Howto_bpm>` page.
|
||||
|
||||
The :doc:`fix bond/break <fix_bond_break>` and :doc:`fix bond/react
|
||||
<fix_bond_react>` commands allow breaking of bonds within a molecular
|
||||
topology with may also define angles, dihedrals, etc. These commands
|
||||
update internal topology data structures to remove broken bonds, as
|
||||
well as the appropriate angle, dihedral, etc interactions which
|
||||
include the bond. They also trigger a rebuild of the neighbor list
|
||||
when this occurs, to turn on the appropriate pairwise forces.
|
||||
|
||||
Note that when bonds are dumped to a file via the :doc:`dump local
|
||||
<dump>` command, bonds with type 0 are not included.
|
||||
|
||||
The :doc:`delete_bonds <delete_bonds>` command can be used to query
|
||||
the status of broken bonds with type = 0 or permanently delete them,
|
||||
e.g.:
|
||||
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
delete_bonds all stats
|
||||
delete_bonds all bond 0 remove
|
||||
|
||||
The compute :doc:`nbond/atom <compute_nbond_atom>` can also be used
|
||||
to tally the current number of bonds per atom, excluding broken bonds.
|
||||
The compute :doc:`count/type <compute_count_type>` command tallies the
|
||||
current number of bonds (or angles, etc) for each bond (angle, etc)
|
||||
type. It also tallies broken bonds with type = 0.
|
||||
|
||||
The compute :doc:`nbond/atom <compute_nbond_atom>` command tallies the
|
||||
current number of bonds each atom is part of, excluding broken bonds
|
||||
with type = 0.
|
||||
|
||||
@ -12,16 +12,16 @@ LAMMPS can be coupled to other codes in at least 4 different ways. Each
|
||||
has advantages and disadvantages, which you will have to think about in
|
||||
the context of your application.
|
||||
|
||||
1. Define a new :doc:`fix <fix>` command that calls the other code. In
|
||||
this scenario, LAMMPS is the driver code. During timestepping, the
|
||||
fix is invoked, and can make library calls to the other code, which
|
||||
has been linked to LAMMPS as a library. This is the way the
|
||||
:ref:`LATTE <PKG-LATTE>` package, which performs density-functional
|
||||
tight-binding calculations using the `LATTE software
|
||||
<https://github.com/lanl/LATTE>`_ to compute forces, is interfaced to
|
||||
LAMMPS. See the :doc:`fix latte <fix_latte>` command for more
|
||||
1. Define a new :doc:`fix <fix>` or :doc:`compute <compute>` command
|
||||
that calls the other code. In this scenario, LAMMPS is the driver
|
||||
code. During timestepping, the fix or compute is invoked, and can
|
||||
make library calls to the other code, which has been linked to LAMMPS
|
||||
as a library. This is the way the :ref:`VORONOI <PKG-VORONOI>`
|
||||
package, which computes Voronoi tesselations using the `Voro++
|
||||
library <http://math.lbl.gov/voro++>`_, is interfaced to LAMMPS. See
|
||||
the :doc:`compute voronoi <compute_voronoi_atom>` command for more
|
||||
details. Also see the :doc:`Modify <Modify>` pages for information
|
||||
on how to add a new fix to LAMMPS.
|
||||
on how to add a new fix or compute to LAMMPS.
|
||||
|
||||
.. spacer
|
||||
|
||||
|
||||
@ -476,16 +476,25 @@ to your remote(s) as well:
|
||||
|
||||
**Recent changes in the workflow**
|
||||
|
||||
Some changes to the workflow are not captured in this tutorial. For
|
||||
example, in addition to the *develop* branch, to which all new features
|
||||
should be submitted, there is also a *release* and a *stable* branch;
|
||||
these have the same content as *develop*, but are only updated after a
|
||||
patch release or stable release was made. Furthermore, the naming of
|
||||
the patches now follow the pattern "patch_<Day><Month><Year>" to
|
||||
simplify comparisons between releases. Finally, all patches and
|
||||
submissions are subject to automatic testing and code checks to make
|
||||
sure they at the very least compile.
|
||||
Some recent changes to the workflow are not captured in this tutorial.
|
||||
For example, in addition to the *develop* branch, to which all new
|
||||
features should be submitted, there is also a *release*, a *stable*, and
|
||||
a *maintenance* branch; the *release* branch is updated from the
|
||||
*develop* as part of a feature release, and *stable* (together with
|
||||
*release*) are updated from *develop* when a stable release is made. In
|
||||
between stable releases, selected bug fixes and infrastructure updates
|
||||
are back-ported from the *develop* branch to the *maintenance* branch
|
||||
and occasionally merged to *stable* as an update release.
|
||||
|
||||
A discussion of the LAMMPS developer GitHub workflow can be found in the
|
||||
file `doc/github-development-workflow.md
|
||||
Furthermore, the naming of the release tags now follow the pattern
|
||||
"patch_<Day><Month><Year>" to simplify comparisons between releases.
|
||||
For stable releases additional "stable_<Day><Month><Year>" tags are
|
||||
applied and update releases are tagged with
|
||||
"stable_<Day><Month><Year>_update<Number>", Finally, all releases and
|
||||
submissions are subject to automatic testing and code checks to make
|
||||
sure they compile with a variety of compilers and popular operating
|
||||
systems. Some unit and regression testing is applied as well.
|
||||
|
||||
A detailed discussion of the LAMMPS developer GitHub workflow can be
|
||||
found in the file `doc/github-development-workflow.md
|
||||
<https://github.com/lammps/lammps/blob/develop/doc/github-development-workflow.md>`_
|
||||
|
||||
@ -43,6 +43,15 @@ The fix style *freeze* zeroes both the force and torque of frozen
|
||||
atoms, and should be used for granular system instead of the fix style
|
||||
*setforce*\ .
|
||||
|
||||
To model heat conduction, one must add the temperature and heatflow
|
||||
atom variables with:
|
||||
* :doc:`fix property/atom <fix_property_atom>`
|
||||
a temperature integration fix
|
||||
* :doc:`fix heat/flow <fix_heat_flow>`
|
||||
and a heat conduction option defined in both
|
||||
* :doc:`pair_style granular <pair_granular>`
|
||||
* :doc:`fix wall/gran <fix_wall_gran>`
|
||||
|
||||
For computational efficiency, you can eliminate needless pairwise
|
||||
computations between frozen atoms by using this command:
|
||||
|
||||
@ -55,3 +64,6 @@ computations between frozen atoms by using this command:
|
||||
will be the same as in 3d. If you wish to model granular particles in
|
||||
2d as 2d discs, see the note on this topic on the :doc:`Howto 2d <Howto_2d>`
|
||||
doc page, where 2d simulations are discussed.
|
||||
|
||||
To add custom granular contact models, see the
|
||||
:doc:`modifying granular sub-models page <Modify_gran_sub_mod>`.
|
||||
|
||||
402
doc/src/Howto_lammps_gui.rst
Normal file
402
doc/src/Howto_lammps_gui.rst
Normal file
@ -0,0 +1,402 @@
|
||||
Using the LAMMPS GUI
|
||||
====================
|
||||
|
||||
LAMMPS GUI is a simple graphical text editor that is linked to the
|
||||
:ref:`LAMMPS C-library interface <lammps_c_api>` and thus can run LAMMPS
|
||||
directly using the contents of the editor's text buffer as input.
|
||||
|
||||
This is similar to what people traditionally would do to run LAMMPS:
|
||||
using a regular text editor to edit the input and run the necessary
|
||||
commands, possibly including the text editor, too, from a command line
|
||||
terminal window. That is quite effective when running LAMMPS on
|
||||
high-performance computing facilities and when you are very proficient
|
||||
in using the command line. The main benefit of a GUI application is
|
||||
that this integrates well with graphical desktop environments and many
|
||||
basic tasks can be done directly from within the GUI without switching
|
||||
to a text console or requiring external programs or scripts to extract
|
||||
data from the generated output. This makes it easier for beginners to
|
||||
get started running simple LAMMPS simulations and thus very suitable for
|
||||
tutorials on LAMMPS. But also makes it easier to switch to a full
|
||||
featured text editor and more sophisticated visualization and analysis
|
||||
tools.
|
||||
|
||||
-----
|
||||
|
||||
The following text provides a detailed tour of the features and
|
||||
functionality of the LAMMPS GUI. This document describes LAMMPS GUI
|
||||
version 1.2.
|
||||
|
||||
Main window
|
||||
-----------
|
||||
|
||||
When LAMMPS GUI starts, it will show the main window with either an
|
||||
empty buffer, or have a file loaded. In the latter case it may look like
|
||||
the following:
|
||||
|
||||
.. image:: JPG/lammps-gui-main.png
|
||||
:align: center
|
||||
:scale: 50%
|
||||
|
||||
There is the menu bar at the top, then the main editor buffer with the
|
||||
input file contents in the center with line numbers on the left and the
|
||||
input colored according to the LAMMPS input file syntax. At the bottom
|
||||
is the status bar, which shows the status of LAMMPS execution on the
|
||||
left ("Ready." when idle) and the current working directory on the
|
||||
right. The size of the main window will be stored when exiting and
|
||||
restored when starting again. The name of the current file in the
|
||||
buffer is shown in the window title and the text `*modified*` is added
|
||||
in case the buffer has modifications that are not yet saved to a file.
|
||||
|
||||
Opening Files
|
||||
^^^^^^^^^^^^^
|
||||
|
||||
The LAMMPS GUI application will try to open the first command line
|
||||
argument as input file, further arguments are ignored. When no
|
||||
argument is given LAMMPS GUI will start with an empty buffer.
|
||||
Files can also be opened via the ``File`` menu or by drag-and-drop
|
||||
of a file from a file manager to the editor window. Only one
|
||||
file can be open at a time, so opening a new file with a filled
|
||||
buffer will close this buffer and in case the buffer has unsaved
|
||||
modifications will ask to either cancel the load, discard the
|
||||
changes or save them.
|
||||
|
||||
|
||||
Running LAMMPS
|
||||
^^^^^^^^^^^^^^
|
||||
|
||||
From within the LAMMPS GUI main window LAMMPS can be started either from
|
||||
the ``Run`` menu, by the hotkey `Ctrl-Enter` (`Command-Enter` on macOS),
|
||||
or by clicking on the green button in the status bar. LAMMPS runs in a
|
||||
separate thread, so the GUI stays responsive and thus it is able to
|
||||
interact with the calculation and access its data. It is important to
|
||||
note, that LAMMPS is using the contents of the input buffer for the run,
|
||||
**not** the file it was read from. If there are unsaved changes in the
|
||||
buffer, they *will* be used.
|
||||
|
||||
.. image:: JPG/lammps-gui-running.png
|
||||
:align: center
|
||||
:scale: 75%
|
||||
|
||||
While LAMMPS is running, the contents of the status bar change: on the
|
||||
left side there is a text indicating that LAMMPS is running, which will
|
||||
contain the selected number of threads, if thread-parallel acceleration
|
||||
was selected in the ``Preferences`` dialog. On the right side, a
|
||||
progress bar is shown that displays the estimated progress on the
|
||||
current :doc:`run command <run>`. Additionally, two windows will open:
|
||||
the log window with the captured screen output and the chart window with
|
||||
a line graph created from the thermodynamic output of the run.
|
||||
|
||||
The run can be stopped cleanly by using either the ``Stop LAMMPS`` entry
|
||||
in the ``Run`` menu, the hotkey `Ctrl-/` (`Command-/` on macOS), or
|
||||
clicking on the red button in the status bar. This will cause that the
|
||||
running LAMMPS process will complete the current iteration and then
|
||||
stop. This is equivalent to the command `timer timeout 0 <timer>` and
|
||||
implemented by calling the :cpp:func:`lammps_force_timeout()` function
|
||||
of the LAMMPS C-library interface.
|
||||
|
||||
|
||||
Viewing Snapshot Images
|
||||
^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
By selecting the ``View Image`` entry in the ``Run`` menu, by hitting
|
||||
the `Ctrl-I` (`Command-I` on macOS) hotkey or by clicking on the
|
||||
"palette" button in the status bar, LAMMPS GUI will issue a
|
||||
:doc:`write_dump image <dump_image>` command and read the resulting
|
||||
snapshot image into an image viewer window. When possible, LAMMPS
|
||||
GUI will try to detect which elements the atoms correspond to (via
|
||||
their mass) and then colorize them accordingly. Otherwise just some
|
||||
predefined sequence of colors are assigned to different atom types.
|
||||
|
||||
.. image:: JPG/lammps-gui-image.png
|
||||
:align: center
|
||||
:scale: 50%
|
||||
|
||||
The default image size, some default image quality settings, the view
|
||||
style and some colors can be changed in the ``Preferences`` dialog
|
||||
window. From the image viewer window further adjustments can be made:
|
||||
actual image size, high-quality rendering, anti-aliasing, view style,
|
||||
display of box or axes, zoom factor. The the image can be rotated
|
||||
horizontally and vertically and it is possible to only display the atoms
|
||||
within a predefined group (default is "all"). After each change, the
|
||||
image is rendered again and the display updated. The small palette icon
|
||||
on the top left will be colored while LAMMPS is running to render the
|
||||
image and it will be grayed out again, when it is done. When there are
|
||||
many items to show and high quality images with anti-aliasing are
|
||||
requested, re-rendering can take several seconds. From the ``File``
|
||||
menu, the shown image can be saved to a file permanently or copied into
|
||||
the cut-n-paste buffer for pasting into another application.
|
||||
|
||||
|
||||
Editor Functions
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
||||
The editor has most the usual functionality that similar programs have:
|
||||
text selection via mouse or with cursor moves while holding the Shift
|
||||
key, Cut, Copy, Paste, Undo, Redo. All of these editing functions are
|
||||
available via hotkeys. When trying to exit the editor with a modified
|
||||
buffer, a dialog will pop up asking whether to cancel the quit, or don't
|
||||
save or save the buffer's contents to a file.
|
||||
|
||||
Context Specific Help
|
||||
^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. image:: JPG/lammps-gui-popup-help.png
|
||||
:align: center
|
||||
:scale: 50%
|
||||
|
||||
A unique feature of the LAMMPS GUI is the option to look up the
|
||||
documentation for the command in the current line. This can be achieved
|
||||
by either clicking the right mouse button or by using the `Ctrl-?`
|
||||
hotkey. When clicking the mouse there are additional entries in the
|
||||
context menu that will open the corresponding documentation page in the
|
||||
online LAMMPS documentation. When using the hotkey, the first of those
|
||||
entries will be chosen directly.
|
||||
|
||||
Menu
|
||||
----
|
||||
|
||||
The menu bar the entries ``File``, ``Edit``, ``Run``, ``View``, and ``About``.
|
||||
Instead of using the mouse to click on them, the individual menus can also
|
||||
be activated by hitting the `Alt` key together with the corresponding underlined
|
||||
letter, that is `Alt-f` will activate the ``File`` menu. For the corresponding
|
||||
activated sub-menus, also the underlined letter, together with the `Alt` key can
|
||||
be used to select instead of the mouse.
|
||||
|
||||
File
|
||||
^^^^
|
||||
|
||||
The ``File`` menu offers the usual options:
|
||||
|
||||
- ``New`` will clear the current buffer and reset the file name to ``*unknown*``
|
||||
- ``Open`` will open a dialog to select a new file
|
||||
- ``Save`` will save the current file; if the file name is ``*unknown*``
|
||||
a dialog will open to select a new file name
|
||||
- ``Save As`` will open a dialog to select and new file name and save
|
||||
the buffer to it
|
||||
- ``Quit`` will exit LAMMPS GUI. If there are unsaved changes, a dialog
|
||||
will appear to either cancel the quit, save or don't save the file.
|
||||
|
||||
In addition, up to 5 recent file names will be listed after the ``Open``
|
||||
entry that allows to re-open recent files. This list is stored when
|
||||
quitting and recovered when starting again.
|
||||
|
||||
Edit
|
||||
^^^^
|
||||
|
||||
The ``Edit`` menu offers the usual editor functions like ``Undo``,
|
||||
``Redo``, ``Cut``, ``Copy``, ``Paste``, but also offers to open the
|
||||
``Preferences`` dialog and to delete all stored preferences so they
|
||||
will be reset to their defaults.
|
||||
|
||||
Run
|
||||
^^^
|
||||
|
||||
The ``Run`` menu allows to start and stop a LAMMPS process. Rather than
|
||||
calling the LAMMPS executable as a separate executable, the LAMMPS GUI
|
||||
is linked to the LAMMPS library and thus can run LAMMPS internally
|
||||
through the :ref:`LAMMPS C-library interface <lammps_c_api>`.
|
||||
Specifically, a LAMMPS instance will be created by calling
|
||||
:cpp:func:`lammps_open_no_mpi` and then the buffer contents run by
|
||||
calling :cpp:func:`lammps_commands_string`. Certain commands and
|
||||
features are only available, after a LAMMPS instance is created. Its
|
||||
presence is indicated by a small LAMMPS ``L`` logo in the status bar at
|
||||
the bottom left of the main window.
|
||||
|
||||
The LAMMPS calculation will be run in a concurrent thread so that the
|
||||
GUI will stay responsive and will be updated during the run. This can
|
||||
be used to tell the running LAMMPS instance to stop at the next
|
||||
timestep. The ``Stop LAMMPS`` entry will do this by calling
|
||||
:cpp:func:`lammps_force_timeout`, which is equivalent to a :doc:`timer
|
||||
timeout 0 <timer>` command.
|
||||
|
||||
The ``Set Variables`` entry will open a dialog box where :doc:`index style variables <variable>`
|
||||
can be set. Those variables will be passed to the LAMMPS instance when
|
||||
it is created and are thus set *before* a run is started.
|
||||
|
||||
.. image:: JPG/lammps-gui-variables.png
|
||||
:align: center
|
||||
:scale: 75%
|
||||
|
||||
The ``Set Variables`` dialog will be pre-populated with entries that are
|
||||
set as index variables in the input and any variables that are used but
|
||||
not defined as far as the built-in parser can detect them. New rows for
|
||||
additional variables can be added through the ``Add Row`` button and
|
||||
existing rows deleted by clicking on the ``X`` icons on the right.
|
||||
|
||||
The ``View Image`` entry will send a :doc:`dump image <dump_image>`
|
||||
command to the LAMMPS instance, read the resulting file, and show it in
|
||||
an ``Image Viewer`` window.
|
||||
|
||||
The ``View in OVITO`` entry will launch `OVITO <https://ovito.org>`_
|
||||
with a :doc:`data file <write_data>` of the current state of the system.
|
||||
This option is only available, if the LAMMPS GUI can find the OVITO
|
||||
executable in the system path.
|
||||
|
||||
The ``View in VMD`` entry will instead launch VMD, also to load a
|
||||
:doc:`data file <write_data>` of the current state of the system. This
|
||||
option is only available, if the LAMMPS GUI can find the VMD executable
|
||||
in the system path.
|
||||
|
||||
View
|
||||
^^^^
|
||||
|
||||
The ``View`` menu offers to show or hide the three optional windows
|
||||
with log output, graphs, or images. The default settings for those
|
||||
can be changed in the ``Preferences dialog``.
|
||||
|
||||
About
|
||||
^^^^^
|
||||
|
||||
The ``About`` menu finally offers a couple of dialog windows and an
|
||||
option to launch the LAMMPS online documentation in a web browser. The
|
||||
``About LAMMPS GUI`` entry displays a dialog with a summary of the
|
||||
configuration settings of the LAMMPS library in use and the version
|
||||
number of LAMMPS GUI itself. The ``Quick Help`` displays a dialog with
|
||||
a minimal description of LAMMPS GUI. And ``LAMMPS Manual`` will open
|
||||
the main page of this LAMMPS documentation at https://docs.lammps.org/.
|
||||
|
||||
Preferences
|
||||
-----------
|
||||
|
||||
The ``Preferences`` dialog allows to customize some of the behavior
|
||||
and looks of the LAMMPS GUI application. The settings are grouped
|
||||
and each group is displayed within a tab.
|
||||
|
||||
.. |guiprefs1| image:: JPG/lammps-gui-prefs-general.png
|
||||
:width: 25%
|
||||
|
||||
.. |guiprefs2| image:: JPG/lammps-gui-prefs-accel.png
|
||||
:width: 25%
|
||||
|
||||
.. |guiprefs3| image:: JPG/lammps-gui-prefs-image.png
|
||||
:width: 25%
|
||||
|
||||
|guiprefs1| |guiprefs2| |guiprefs3|
|
||||
|
||||
General Settings:
|
||||
^^^^^^^^^^^^^^^^^
|
||||
|
||||
- *Echo input to log:* when checked, all input commands, including
|
||||
variable expansions, will be echoed to the log window. This is
|
||||
equivalent to using `-echo screen` at the command line. There is no
|
||||
log *file* produced since it always uses `-log none`.
|
||||
- *Include citation details:* when checked full citation info will be
|
||||
included to the log window. This is equivalent to using `-cite
|
||||
screen` on the command line.
|
||||
- *Show log window by default:* when checked, the screen output of a
|
||||
LAMMPS run will be collected in a log window during the run
|
||||
- *Show chart window by default:* when checked, the thermodynamic
|
||||
output of a LAMMPS run will be collected and displayed in a chart
|
||||
window as line graphs.
|
||||
- *Replace log window on new run:* when checked, an existing log
|
||||
window will be replaced on a new LAMMPS run, otherwise each run will
|
||||
create a new log window.
|
||||
- *Replace chart window on new run:* when checked, an existing chart
|
||||
window will be replaced on a new LAMMPS run, otherwise each run will
|
||||
create a new chart window.
|
||||
- *Replace image window on new render:* when checked, an existing
|
||||
chart window will be replaced when a new snapshot image is requested,
|
||||
otherwise each command will create a new image window.
|
||||
- *Path to LAMMPS Shared Library File:* this options is only available
|
||||
when LAMMPS GUI was compiled to load the LAMMPS library at run time
|
||||
instead of being linked to it directly. With the ``Browse..`` button
|
||||
or by changing the text, a different shared library file with a
|
||||
different compilation of LAMMPS with different settings or from a
|
||||
different version can be loaded. After this setting was changed,
|
||||
LAMMPS GUI needs to be re-launched.
|
||||
- *Select Default Font:* Opens a font selection dialog where the type
|
||||
and size for the default font (used for everything but the editor and
|
||||
log) of the application can be set.
|
||||
- *Select Text Font:* Opens a font selection dialog where the type and
|
||||
size for the text editor and log font of the application can be set.
|
||||
|
||||
Accelerators:
|
||||
^^^^^^^^^^^^^
|
||||
|
||||
This tab enables to select which accelerator package is used and is
|
||||
equivalent to using the `-suffix` and `-package` flags on the command
|
||||
line. Only settings supported by the LAMMPS library and local hardware
|
||||
are available. The `Number of threads` field allows to set the maximum
|
||||
number of threads for the accelerator packages that use threads.
|
||||
|
||||
Snapshot Image:
|
||||
^^^^^^^^^^^^^^^
|
||||
|
||||
This tab allows to set some defaults for the snapshot images displayed
|
||||
in the ``Image Viewer`` window, like its dimensions and the zoom factor
|
||||
applied. The *Antialias* switch requests to render images with twice
|
||||
the number of pixels for width and height and then smoothly scales the
|
||||
image back to the requested size. This produces higher quality images
|
||||
with smoother edges at the expense of requiring more CPU time to render
|
||||
the image. The *HQ Image mode* option turns on using a screen space
|
||||
ambient occlusion mode (SSAO) when rendering images. This is also more
|
||||
time consuming, but produces a more 'spatial' representation of the
|
||||
system. The *VDW Style* checkbox selects whether atoms are represented
|
||||
by space filling spheres when checked or by smaller spheres and stick.
|
||||
Finally there are a couple of drop down lists to select the background
|
||||
and box color.
|
||||
|
||||
|
||||
Hotkeys
|
||||
-------
|
||||
|
||||
Almost all functionality is accessible from the menu or via hotkeys.
|
||||
The following hotkeys are available (On macOS use the Command key
|
||||
instead of Ctrl/Control).
|
||||
|
||||
.. list-table::
|
||||
:header-rows: 1
|
||||
:widths: auto
|
||||
|
||||
* - Hotkey
|
||||
- Function
|
||||
- Hotkey
|
||||
- Function
|
||||
- Hotkey
|
||||
- Function
|
||||
- Hotkey
|
||||
- Function
|
||||
* - Ctrl+N
|
||||
- New File
|
||||
- Ctrl+Z
|
||||
- Undo edit
|
||||
- Ctrl+Enter
|
||||
- Run LAMMPS
|
||||
- Ctrl+Shift+A
|
||||
- About LAMMPS GUI
|
||||
* - Ctrl+O
|
||||
- Open File
|
||||
- Ctrl+Shift+Z
|
||||
- Redo edit
|
||||
- Ctrl+/
|
||||
- Stop Active Run
|
||||
- Ctrl+Shift+H
|
||||
- Quick Help
|
||||
* - CTRL+S
|
||||
- Save File
|
||||
- Ctrl+C
|
||||
- Copy text
|
||||
- Ctrl+Shift+V
|
||||
- Set Variables
|
||||
- Ctrl+Shift+G
|
||||
- LAMMPS GUI Howto
|
||||
* - Ctrl+Shift+S
|
||||
- Save File As
|
||||
- Ctrl+X
|
||||
- Cut text
|
||||
- Ctrl+I
|
||||
- Create Snapshot Image
|
||||
- Ctrl+Shift+M
|
||||
- LAMMPS Manual
|
||||
* - Ctrl+Q
|
||||
- Quit
|
||||
- Ctrl+V
|
||||
- Paste text
|
||||
- Ctrl+P
|
||||
- Preferences
|
||||
- Ctrl+?
|
||||
- Context Help
|
||||
|
||||
Further editing keybindings `are documented with the Qt documentation
|
||||
<https://doc.qt.io/qt-5/qplaintextedit.html#editing-key-bindings>`_. In
|
||||
case of conflicts the list above takes precedence.
|
||||
@ -63,22 +63,29 @@ The package also provides a :doc:`mdi plugin <mdi>` command, which
|
||||
enables LAMMPS to operate as an MDI driver and load an MDI engine as a
|
||||
plugin library.
|
||||
|
||||
The package furthermore includes a `fix mdi/qm <fix_mdi_qm>` command, in
|
||||
which LAMMPS operates as an MDI driver in conjunction with a quantum
|
||||
mechanics code as an MDI engine. The post_force() method of the
|
||||
``fix_mdi_qm.cpp`` file shows how a driver issues MDI commands to another
|
||||
code. This command can be used to couple to an MDI engine, which is
|
||||
either a stand-alone code or a plugin library.
|
||||
The package furthermore includes a :doc:`fix mdi/qm <fix_mdi_qm>`
|
||||
command, in which LAMMPS operates as an MDI driver in conjunction with a
|
||||
quantum mechanics code as an MDI engine. The post_force() method of the
|
||||
``fix_mdi_qm.cpp`` file shows how a driver issues MDI commands to
|
||||
another code. This command can be used to couple to an MDI engine,
|
||||
which is either a stand-alone code or a plugin library.
|
||||
|
||||
As explained in the `fix mdi/qm <fix_mdi_qm>` command documentation, it
|
||||
can be used to perform *ab initio* MD simulations or energy
|
||||
minimizations, or to evaluate the quantum energy and forces for a series
|
||||
of independent systems. The ``examples/mdi`` directory has example
|
||||
input scripts for all of these use cases.
|
||||
As explained in the :doc:`fix mdi/qm <fix_mdi_qm>` command
|
||||
documentation, it can be used to perform *ab initio* MD simulations or
|
||||
energy minimizations, or to evaluate the quantum energy and forces for a
|
||||
series of independent systems. The ``examples/mdi`` directory has
|
||||
example input scripts for all of these use cases.
|
||||
|
||||
The package also has a :doc:`fix mdi/qmmm <fix_mdi_qmmm>` command in
|
||||
which LAMMPS operates as an MDI driver in conjunction with a quantum
|
||||
mechanics code as an MDI engine to perform QM/MM simulations. The
|
||||
LAMMPS input script partitions the system into QM and MM (molecular
|
||||
mechanics) atoms. As described below the ``examples/QUANTUM`` directory
|
||||
has examples for coupling to 3 different quantum codes in this manner.
|
||||
|
||||
----------
|
||||
|
||||
The examples/mdi directory contains Python scripts and LAMMPS input
|
||||
The ``examples/mdi`` directory contains Python scripts and LAMMPS input
|
||||
script which use LAMMPS as either an MDI driver or engine, or both.
|
||||
Currently, 5 example use cases are provided:
|
||||
|
||||
@ -119,45 +126,26 @@ as a plugin library.
|
||||
|
||||
-------------
|
||||
|
||||
Currently, there are at least two quantum DFT codes which have direct MDI
|
||||
As of March 2023, these are quantum codes with MDI support provided via
|
||||
Python wrapper scripts included in the LAMMPS distribution. These can
|
||||
be used with the fix mdi/qm and fix mdi/qmmm commands to perform QM
|
||||
calculations of an entire system (e.g. AIMD) or QM/MM simulations. See
|
||||
the ``examples/QUANTUM`` sub-directories for more details:
|
||||
|
||||
* LATTE - AIMD only
|
||||
* PySCF - QM/MM only
|
||||
* NWChem - AIMD or QM/MM
|
||||
|
||||
There are also at least two quantum codes which have direct MDI
|
||||
support, `Quantum ESPRESSO (QE) <https://www.quantum-espresso.org/>`_
|
||||
and `INQ <https://qsg.llnl.gov/node/101.html>`_. There are also several
|
||||
QM codes which have indirect support through QCEngine or i-PI. The
|
||||
former means they require a wrapper program (QCEngine) with MDI support
|
||||
which writes/read files to pass data to the quantum code itself. The
|
||||
list of QCEngine-supported and i-PI-supported quantum codes is on the
|
||||
`MDI webpage
|
||||
and `INQ <https://qsg.llnl.gov/node/101.html>`_. There are also
|
||||
several QM codes which have indirect support through QCEngine or i-PI.
|
||||
The former means they require a wrapper program (QCEngine) with MDI
|
||||
support which writes/read files to pass data to the quantum code
|
||||
itself. The list of QCEngine-supported and i-PI-supported quantum
|
||||
codes is on the `MDI webpage
|
||||
<https://molssi-mdi.github.io/MDI_Library/html/index.html>`_.
|
||||
|
||||
Here is how to build QE as a stand-alone ``pw.x`` file which can be
|
||||
used in stand-alone mode:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
git clone --branch mdi_plugin https://github.com/MolSSI-MDI/q-e.git <base_path>/q-e
|
||||
build the executable pw.x, following the `QE build guide <https://gitlab.com/QEF/q-e/-/wikis/Developers/CMake-build-system>`_
|
||||
|
||||
Here is how to build QE as a shared library which can be used in plugin mode,
|
||||
which results in a ``libqemdi.so`` file in ``<base_path>/q-e/MDI/src``:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
git clone --branch mdi_plugin https://github.com/MolSSI-MDI/q-e.git <base_path>/q-e
|
||||
cd <base_path>/q-e
|
||||
./configure --enable-parallel --enable-openmp --enable-shared FFLAGS="-fPIC" FCFLAGS="-fPIC" CFLAGS="-fPIC" foxflags="-fPIC" try_foxflags="-fPIC"
|
||||
make -j 4 mdi
|
||||
|
||||
INQ cannot be built as a stand-alone code; it is by design a library.
|
||||
Here is how to build INQ as a shared library which can be used in
|
||||
plugin mode, which results in a ``libinqmdi.so`` file in
|
||||
``<base_path>/inq/build/examples``:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
git clone --branch mdi --recurse-submodules https://gitlab.com/taylor-a-barnes/inq.git <base_path>/inq
|
||||
cd <base_path>/inq
|
||||
mkdir -p build
|
||||
cd build
|
||||
../configure --prefix=<install_path>/install
|
||||
make -j 4
|
||||
make install
|
||||
These direct- and indirect-support codes should be usable for full
|
||||
system calculations (e.g. AIMD). Whether they support QM/MM models
|
||||
depends on the individual QM code.
|
||||
|
||||
@ -20,7 +20,6 @@ atoms and the water molecule to run a rigid SPC model.
|
||||
| LJ :math:`\epsilon`, :math:`\sigma` of OH, HH = 0.0
|
||||
| :math:`r_0` of OH bond = 1.0
|
||||
| :math:`\theta_0` of HOH angle = 109.47\ :math:`^{\circ}`
|
||||
|
|
||||
|
||||
Note that as originally proposed, the SPC model was run with a 9
|
||||
Angstrom cutoff for both LJ and Coulomb terms. It can also be used
|
||||
@ -33,16 +32,121 @@ the partial charge assignments change:
|
||||
|
||||
| O charge = -0.8476
|
||||
| H charge = 0.4238
|
||||
|
|
||||
|
||||
See the :ref:`(Berendsen) <howto-Berendsen>` reference for more details on both
|
||||
the SPC and SPC/E models.
|
||||
|
||||
Below is the code for a LAMMPS input file and a molecule file
|
||||
(``spce.mol``) of SPC/E water for use with the :doc:`molecule command
|
||||
<molecule>` demonstrating how to set up a small bulk water system for
|
||||
SPC/E with rigid bonds.
|
||||
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
units real
|
||||
atom_style full
|
||||
region box block -5 5 -5 5 -5 5
|
||||
create_box 2 box bond/types 1 angle/types 1 &
|
||||
extra/bond/per/atom 2 extra/angle/per/atom 1 extra/special/per/atom 2
|
||||
|
||||
mass 1 15.9994
|
||||
mass 2 1.008
|
||||
|
||||
pair_style lj/cut/coul/cut 10.0
|
||||
pair_coeff 1 1 0.1553 3.166
|
||||
pair_coeff 1 2 0.0 1.0
|
||||
pair_coeff 2 2 0.0 1.0
|
||||
|
||||
bond_style zero
|
||||
bond_coeff 1 1.0
|
||||
|
||||
angle_style zero
|
||||
angle_coeff 1 109.47
|
||||
|
||||
molecule water spce.mol
|
||||
create_atoms 0 random 33 34564 NULL mol water 25367 overlap 1.33
|
||||
|
||||
timestep 1.0
|
||||
fix rigid all shake 0.0001 10 10000 b 1 a 1
|
||||
minimize 0.0 0.0 1000 10000
|
||||
velocity all create 300.0 5463576
|
||||
fix integrate all nvt temp 300.0 300.0 100.0
|
||||
|
||||
thermo_style custom step temp press etotal density pe ke
|
||||
thermo 1000
|
||||
run 20000 upto
|
||||
write_data spce.data nocoeff
|
||||
|
||||
.. _spce_molecule:
|
||||
.. code-block::
|
||||
|
||||
# Water molecule. SPC/E geometry
|
||||
|
||||
3 atoms
|
||||
2 bonds
|
||||
1 angles
|
||||
|
||||
Coords
|
||||
|
||||
1 0.00000 -0.06461 0.00000
|
||||
2 0.81649 0.51275 0.00000
|
||||
3 -0.81649 0.51275 0.00000
|
||||
|
||||
Types
|
||||
|
||||
1 1 # O
|
||||
2 2 # H
|
||||
3 2 # H
|
||||
|
||||
Charges
|
||||
|
||||
1 -0.8476
|
||||
2 0.4238
|
||||
3 0.4238
|
||||
|
||||
Bonds
|
||||
|
||||
1 1 1 2
|
||||
2 1 1 3
|
||||
|
||||
Angles
|
||||
|
||||
1 1 2 1 3
|
||||
|
||||
Shake Flags
|
||||
|
||||
1 1
|
||||
2 1
|
||||
3 1
|
||||
|
||||
Shake Atoms
|
||||
|
||||
1 1 2 3
|
||||
2 1 2 3
|
||||
3 1 2 3
|
||||
|
||||
Shake Bond Types
|
||||
|
||||
1 1 1 1
|
||||
2 1 1 1
|
||||
3 1 1 1
|
||||
|
||||
Special Bond Counts
|
||||
|
||||
1 2 0 0
|
||||
2 1 1 0
|
||||
3 1 1 0
|
||||
|
||||
Special Bonds
|
||||
|
||||
1 2 3
|
||||
2 1 3
|
||||
3 1 2
|
||||
|
||||
Wikipedia also has a nice article on `water models <https://en.wikipedia.org/wiki/Water_model>`_.
|
||||
|
||||
----------
|
||||
|
||||
.. _howto-Berendsen:
|
||||
|
||||
**(Berendsen)** Berendsen, Grigera, Straatsma, J Phys Chem, 91,
|
||||
6269-6271 (1987).
|
||||
**(Berendsen)** Berendsen, Grigera, Straatsma, J Phys Chem, 91, 6269-6271 (1987).
|
||||
|
||||
@ -1,53 +1,211 @@
|
||||
TIP3P water model
|
||||
=================
|
||||
|
||||
The TIP3P water model as implemented in CHARMM
|
||||
:ref:`(MacKerell) <howto-tip3p>` specifies a 3-site rigid water molecule with
|
||||
charges and Lennard-Jones parameters assigned to each of the 3 atoms.
|
||||
In LAMMPS the :doc:`fix shake <fix_shake>` command can be used to hold
|
||||
the two O-H bonds and the H-O-H angle rigid. A bond style of
|
||||
*harmonic* and an angle style of *harmonic* or *charmm* should also be
|
||||
used.
|
||||
The TIP3P water model as implemented in CHARMM :ref:`(MacKerell)
|
||||
<howto-tip3p>` specifies a 3-site rigid water molecule with charges and
|
||||
Lennard-Jones parameters assigned to each of the 3 atoms.
|
||||
|
||||
These are the additional parameters (in real units) to set for O and H
|
||||
atoms and the water molecule to run a rigid TIP3P-CHARMM model with a
|
||||
cutoff. The K values can be used if a flexible TIP3P model (without
|
||||
fix shake) is desired. If the LJ epsilon and sigma for HH and OH are
|
||||
set to 0.0, it corresponds to the original 1983 TIP3P model
|
||||
:ref:`(Jorgensen) <Jorgensen1>`.
|
||||
A suitable pair style with cutoff Coulomb would be:
|
||||
|
||||
| O mass = 15.9994
|
||||
| H mass = 1.008
|
||||
| O charge = -0.834
|
||||
| H charge = 0.417
|
||||
| LJ :math:`\epsilon` of OO = 0.1521
|
||||
| LJ :math:`\sigma` of OO = 3.1507
|
||||
| LJ :math:`\epsilon` of HH = 0.0460
|
||||
| LJ :math:`\sigma` of HH = 0.4000
|
||||
| LJ :math:`\epsilon` of OH = 0.0836
|
||||
| LJ :math:`\sigma` of OH = 1.7753
|
||||
| K of OH bond = 450
|
||||
| :math:`r_0` of OH bond = 0.9572
|
||||
| K of HOH angle = 55
|
||||
| :math:`\theta` of HOH angle = 104.52\ :math:`^{\circ}`
|
||||
|
|
||||
* :doc:`pair_style lj/cut/coul/cut <pair_lj_cut_coul>`
|
||||
|
||||
These are the parameters to use for TIP3P with a long-range Coulomb
|
||||
solver (e.g. Ewald or PPPM in LAMMPS), see :ref:`(Price) <Price1>` for
|
||||
details:
|
||||
or these commands for a long-range Coulomb model:
|
||||
|
||||
* :doc:`pair_style lj/cut/coul/long <pair_lj_cut_coul>`
|
||||
* :doc:`pair_style lj/cut/coul/long/soft <pair_fep_soft>`
|
||||
* :doc:`kspace_style pppm <kspace_style>`
|
||||
* :doc:`kspace_style pppm/disp <kspace_style>`
|
||||
|
||||
In LAMMPS the :doc:`fix shake or fix rattle <fix_shake>` command can be
|
||||
used to hold the two O-H bonds and the H-O-H angle rigid. A bond style
|
||||
of :doc:`harmonic <bond_harmonic>` and an angle style of :doc:`harmonic
|
||||
<angle_harmonic>` or :doc:`charmm <angle_charmm>` should also be used.
|
||||
In case of rigid bonds also bond style :doc:`zero <bond_zero>` and angle
|
||||
style :doc:`zero <angle_zero>` can be used.
|
||||
|
||||
The table below lists the force field parameters (in real :doc:`units
|
||||
<units>`) to for the water molecule atoms to run a rigid or flexible
|
||||
TIP3P-CHARMM model with a cutoff, the original 1983 TIP3P model
|
||||
:ref:`(Jorgensen) <Jorgensen1>`, or a TIP3P model with parameters
|
||||
optimized for a long-range Coulomb solver (e.g. Ewald or PPPM in LAMMPS)
|
||||
:ref:`(Price) <Price1>`. The K values can be used if a flexible TIP3P
|
||||
model (without fix shake) is desired, for rigid bonds/angles they are
|
||||
ignored.
|
||||
|
||||
.. list-table::
|
||||
:header-rows: 1
|
||||
:widths: auto
|
||||
|
||||
* - Parameter
|
||||
- TIP3P-CHARMM
|
||||
- TIP3P (original)
|
||||
- TIP3P (Ewald)
|
||||
* - O mass (amu)
|
||||
- 15.9994
|
||||
- 15.9994
|
||||
- 15.9994
|
||||
* - H mass (amu)
|
||||
- 1.008
|
||||
- 1.008
|
||||
- 1.008
|
||||
* - O charge (:math:`e`)
|
||||
- -0.834
|
||||
- -0.834
|
||||
- -0.834
|
||||
* - H charge (:math:`e`)
|
||||
- 0.417
|
||||
- 0.417
|
||||
- 0.417
|
||||
* - LJ :math:`\epsilon` of OO (kcal/mole)
|
||||
- 0.1521
|
||||
- 0.1521
|
||||
- 0.1020
|
||||
* - LJ :math:`\sigma` of OO (:math:`\AA`)
|
||||
- 3.1507
|
||||
- 3.1507
|
||||
- 3.188
|
||||
* - LJ :math:`\epsilon` of HH (kcal/mole)
|
||||
- 0.0460
|
||||
- 0.0
|
||||
- 0.0
|
||||
* - LJ :math:`\sigma` of HH (:math:`\AA`)
|
||||
- 0.4
|
||||
- 1.0
|
||||
- 1.0
|
||||
* - LJ :math:`\epsilon` of OH (kcal/mole)
|
||||
- 0.0836
|
||||
- 0.0
|
||||
- 0.0
|
||||
* - LJ :math:`\sigma` of OH (:math:`\AA`)
|
||||
- 1.7753
|
||||
- 1.0
|
||||
- 1.0
|
||||
* - K of OH bond (kcal/mole/:math:`\AA^2`)
|
||||
- 450
|
||||
- 450
|
||||
- 450
|
||||
* - :math:`r_0` of OH bond (:math:`\AA`)
|
||||
- 0.9572
|
||||
- 0.9572
|
||||
- 0.9572
|
||||
* - K of HOH angle (kcal/mole)
|
||||
- 55.0
|
||||
- 55.0
|
||||
- 55.0
|
||||
* - :math:`\theta_0` of HOH angle
|
||||
- 104.52\ :math:`^{\circ}`
|
||||
- 104.52\ :math:`^{\circ}`
|
||||
- 104.52\ :math:`^{\circ}`
|
||||
|
||||
Below is the code for a LAMMPS input file and a molecule file
|
||||
(``tip3p.mol``) of TIP3P water for use with the :doc:`molecule command
|
||||
<molecule>` demonstrating how to set up a small bulk water system for
|
||||
TIP3P with rigid bonds.
|
||||
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
units real
|
||||
atom_style full
|
||||
region box block -5 5 -5 5 -5 5
|
||||
create_box 2 box bond/types 1 angle/types 1 &
|
||||
extra/bond/per/atom 2 extra/angle/per/atom 1 extra/special/per/atom 2
|
||||
|
||||
mass 1 15.9994
|
||||
mass 2 1.008
|
||||
|
||||
pair_style lj/cut/coul/cut 8.0
|
||||
pair_coeff 1 1 0.1521 3.1507
|
||||
pair_coeff 2 2 0.0 1.0
|
||||
|
||||
bond_style zero
|
||||
bond_coeff 1 0.9574
|
||||
|
||||
angle_style zero
|
||||
angle_coeff 1 104.52
|
||||
|
||||
molecule water tip3p.mol
|
||||
create_atoms 0 random 33 34564 NULL mol water 25367 overlap 1.33
|
||||
|
||||
fix rigid all shake 0.001 10 10000 b 1 a 1
|
||||
minimize 0.0 0.0 1000 10000
|
||||
|
||||
reset_timestep 0
|
||||
timestep 1.0
|
||||
velocity all create 300.0 5463576
|
||||
fix integrate all nvt temp 300 300 100.0
|
||||
|
||||
thermo_style custom step temp press etotal pe
|
||||
|
||||
thermo 1000
|
||||
run 20000
|
||||
write_data tip3p.data nocoeff
|
||||
|
||||
.. _tip3p_molecule:
|
||||
.. code-block::
|
||||
|
||||
# Water molecule. TIP3P geometry
|
||||
|
||||
3 atoms
|
||||
2 bonds
|
||||
1 angles
|
||||
|
||||
Coords
|
||||
|
||||
1 0.00000 -0.06556 0.00000
|
||||
2 0.75695 0.52032 0.00000
|
||||
3 -0.75695 0.52032 0.00000
|
||||
|
||||
Types
|
||||
|
||||
1 1 # O
|
||||
2 2 # H
|
||||
3 2 # H
|
||||
|
||||
Charges
|
||||
|
||||
1 -0.834
|
||||
2 0.417
|
||||
3 0.417
|
||||
|
||||
Bonds
|
||||
|
||||
1 1 1 2
|
||||
2 1 1 3
|
||||
|
||||
Angles
|
||||
|
||||
1 1 2 1 3
|
||||
|
||||
Shake Flags
|
||||
|
||||
1 1
|
||||
2 1
|
||||
3 1
|
||||
|
||||
Shake Atoms
|
||||
|
||||
1 1 2 3
|
||||
2 1 2 3
|
||||
3 1 2 3
|
||||
|
||||
Shake Bond Types
|
||||
|
||||
1 1 1 1
|
||||
2 1 1 1
|
||||
3 1 1 1
|
||||
|
||||
Special Bond Counts
|
||||
|
||||
1 2 0 0
|
||||
2 1 1 0
|
||||
3 1 1 0
|
||||
|
||||
Special Bonds
|
||||
|
||||
1 2 3
|
||||
2 1 3
|
||||
3 1 2
|
||||
|
||||
| O mass = 15.9994
|
||||
| H mass = 1.008
|
||||
| O charge = -0.830
|
||||
| H charge = 0.415
|
||||
| LJ :math:`\epsilon` of OO = 0.102
|
||||
| LJ :math:`\sigma` of OO = 3.188
|
||||
| LJ :math:`\epsilon`, :math:`\sigma` of OH, HH = 0.0
|
||||
| K of OH bond = 450
|
||||
| :math:`r_0` of OH bond = 0.9572
|
||||
| K of HOH angle = 55
|
||||
| :math:`\theta` of HOH angle = 104.52\ :math:`^{\circ}`
|
||||
|
|
||||
|
||||
Wikipedia also has a nice article on `water models <https://en.wikipedia.org/wiki/Water_model>`_.
|
||||
|
||||
|
||||
@ -2,100 +2,138 @@ TIP4P water model
|
||||
=================
|
||||
|
||||
The four-point TIP4P rigid water model extends the traditional
|
||||
three-point TIP3P model by adding an additional site, usually
|
||||
massless, where the charge associated with the oxygen atom is placed.
|
||||
This site M is located at a fixed distance away from the oxygen along
|
||||
the bisector of the HOH bond angle. A bond style of *harmonic* and an
|
||||
angle style of *harmonic* or *charmm* should also be used.
|
||||
:doc:`three-point TIP3P <Howto_tip3p>` model by adding an additional
|
||||
site M, usually massless, where the charge associated with the oxygen
|
||||
atom is placed. This site M is located at a fixed distance away from
|
||||
the oxygen along the bisector of the HOH bond angle. A bond style of
|
||||
:doc:`harmonic <bond_harmonic>` and an angle style of :doc:`harmonic
|
||||
<angle_harmonic>` or :doc:`charmm <angle_charmm>` should also be used.
|
||||
In case of rigid bonds also bond style :doc:`zero <bond_zero>` and angle
|
||||
style :doc:`zero <angle_zero>` can be used.
|
||||
|
||||
A TIP4P model is run with LAMMPS using either these commands
|
||||
for a cutoff model:
|
||||
There are two ways to implement TIP4P water in LAMMPS:
|
||||
|
||||
* :doc:`pair_style tip4p/cut <pair_lj_cut_tip4p>`
|
||||
* :doc:`pair_style lj/cut/tip4p/cut <pair_lj_cut_tip4p>`
|
||||
#. Use a specially written pair style that uses the :ref:`TIP3P geometry
|
||||
<tip3p_molecule>` without the point M. The point M location is then
|
||||
implicitly derived from the other atoms or each water molecule and
|
||||
used during the force computation. The forces on M are then
|
||||
projected on the oxygen and the two hydrogen atoms. This is
|
||||
computationally very efficient, but the charge distribution in space
|
||||
is only correct within the tip4p labeled styles. So all other
|
||||
computations using charges will "see" the negative charge incorrectly
|
||||
on the oxygen atom.
|
||||
|
||||
or these commands for a long-range model:
|
||||
This can be done with the following pair styles for Coulomb with a cutoff:
|
||||
|
||||
* :doc:`pair_style tip4p/long <pair_coul>`
|
||||
* :doc:`pair_style lj/cut/tip4p/long <pair_lj_cut_tip4p>`
|
||||
* :doc:`pair_style lj/long/tip4p/long <pair_lj_long>`
|
||||
* :doc:`pair_style tip4p/long/soft <pair_fep_soft>`
|
||||
* :doc:`pair_style lj/cut/tip4p/long/soft <pair_fep_soft>`
|
||||
* :doc:`kspace_style pppm/tip4p <kspace_style>`
|
||||
* :doc:`kspace_style pppm/disp/tip4p <kspace_style>`
|
||||
* :doc:`pair_style tip4p/cut <pair_lj_cut_tip4p>`
|
||||
* :doc:`pair_style lj/cut/tip4p/cut <pair_lj_cut_tip4p>`
|
||||
|
||||
The bond lengths and bond angles should be held fixed using the
|
||||
:doc:`fix shake <fix_shake>` or :doc:`fix rattle <fix_shake>` command,
|
||||
unless a parameterization for a flexible TIP4P model is used. The
|
||||
parameter sets listed below are all for rigid TIP4P model variants and
|
||||
thus the bond and angle force constants are not used and can be set to
|
||||
any legal value; only equilibrium length and angle are used.
|
||||
or these commands for a long-range Coulomb treatment:
|
||||
|
||||
These are the additional parameters (in real units) to set for O and H
|
||||
atoms and the water molecule to run a rigid TIP4P model with a cutoff
|
||||
:ref:`(Jorgensen) <Jorgensen5>`. Note that the OM distance is specified in
|
||||
the :doc:`pair_style <pair_style>` command, not as part of the pair
|
||||
coefficients.
|
||||
* :doc:`pair_style tip4p/long <pair_coul>`
|
||||
* :doc:`pair_style lj/cut/tip4p/long <pair_lj_cut_tip4p>`
|
||||
* :doc:`pair_style lj/long/tip4p/long <pair_lj_long>`
|
||||
* :doc:`pair_style tip4p/long/soft <pair_fep_soft>`
|
||||
* :doc:`pair_style lj/cut/tip4p/long/soft <pair_fep_soft>`
|
||||
* :doc:`kspace_style pppm/tip4p <kspace_style>`
|
||||
* :doc:`kspace_style pppm/disp/tip4p <kspace_style>`
|
||||
|
||||
| O mass = 15.9994
|
||||
| H mass = 1.008
|
||||
| O charge = -1.040
|
||||
| H charge = 0.520
|
||||
| :math:`r_0` of OH bond = 0.9572
|
||||
| :math:`\theta` of HOH angle = 104.52\ :math:`^{\circ}`
|
||||
| OM distance = 0.15
|
||||
| LJ :math:`\epsilon` of O-O = 0.1550
|
||||
| LJ :math:`\sigma` of O-O = 3.1536
|
||||
| LJ :math:`\epsilon`, :math:`\sigma` of OH, HH = 0.0
|
||||
| Coulomb cutoff = 8.5
|
||||
|
|
||||
The bond lengths and bond angles should be held fixed using the
|
||||
:doc:`fix shake <fix_shake>` or :doc:`fix rattle <fix_shake>` command,
|
||||
unless a parameterization for a flexible TIP4P model is used. The
|
||||
parameter sets listed below are all for rigid TIP4P model variants and
|
||||
thus the bond and angle force constants are not used and can be set to
|
||||
any legal value; only equilibrium length and angle are used.
|
||||
|
||||
For the TIP4/Ice model (J Chem Phys, 122, 234511 (2005);
|
||||
https://doi.org/10.1063/1.1931662) these values can be used:
|
||||
#. Use an :ref:`explicit 4 point TIP4P geometry <tip4p_molecule>` where
|
||||
the oxygen atom carries no charge and the M point no Lennard-Jones
|
||||
interactions. Since :doc:`fix shake <fix_shake>` or :doc:`fix rattle
|
||||
<fix_shake>` may not be applied to this kind of geometry, :doc:`fix
|
||||
rigid or fix rigid/small <fix_rigid>` or its thermostatted variants
|
||||
are required to maintain a rigid geometry. This avoids some of the
|
||||
issues with respect to analysis and non-tip4p styles, but it is a
|
||||
more costly force computation (more atoms in the same volume and thus
|
||||
more neighbors in the neighbor lists) and requires a much shorter
|
||||
timestep for stable integration of the rigid body motion. Since no
|
||||
bonds or angles are required, they do not need to be defined and atom
|
||||
style charge would be sufficient for a bulk TIP4P water system. In
|
||||
order to avoid that LAMMPS produces an error due to the massless M
|
||||
site a tiny non-zero mass needs to be assigned.
|
||||
|
||||
| O mass = 15.9994
|
||||
| H mass = 1.008
|
||||
| O charge = -1.1794
|
||||
| H charge = 0.5897
|
||||
| :math:`r_0` of OH bond = 0.9572
|
||||
| :math:`\theta` of HOH angle = 104.52\ :math:`^{\circ}`
|
||||
| OM distance = 0.1577
|
||||
| LJ :math:`\epsilon` of O-O = 0.21084
|
||||
| LJ :math:`\sigma` of O-O = 3.1668
|
||||
| LJ :math:`\epsilon`, :math:`\sigma` of OH, HH = 0.0
|
||||
| Coulomb cutoff = 8.5
|
||||
|
|
||||
The table below lists the force field parameters (in real :doc:`units
|
||||
<units>`) to for a selection of popular variants of the TIP4P model.
|
||||
There is the rigid TIP4P model with a cutoff :ref:`(Jorgensen)
|
||||
<Jorgensen5>`, the TIP4/Ice model :ref:`(Abascal1) <Abascal1>`, the
|
||||
TIP4P/2005 model :ref:`(Abascal2) <Abascal2>` and a version of TIP4P
|
||||
parameters adjusted for use with a long-range Coulombic solver
|
||||
(e.g. Ewald or PPPM in LAMMPS). Note that for implicit TIP4P models the
|
||||
OM distance is specified in the :doc:`pair_style <pair_style>` command,
|
||||
not as part of the pair coefficients.
|
||||
|
||||
For the TIP4P/2005 model (J Chem Phys, 123, 234505 (2005);
|
||||
https://doi.org/10.1063/1.2121687), these values can be used:
|
||||
.. list-table::
|
||||
:header-rows: 1
|
||||
:widths: auto
|
||||
|
||||
| O mass = 15.9994
|
||||
| H mass = 1.008
|
||||
| O charge = -1.1128
|
||||
| H charge = 0.5564
|
||||
| :math:`r_0` of OH bond = 0.9572
|
||||
| :math:`\theta` of HOH angle = 104.52\ :math:`^{\circ}`
|
||||
| OM distance = 0.1546
|
||||
| LJ :math:`\epsilon` of O-O = 0.1852
|
||||
| LJ :math:`\sigma` of O-O = 3.1589
|
||||
| LJ :math:`\epsilon`, :math:`\sigma` of OH, HH = 0.0
|
||||
| Coulomb cutoff = 8.5
|
||||
|
|
||||
|
||||
These are the parameters to use for TIP4P with a long-range Coulombic
|
||||
solver (e.g. Ewald or PPPM in LAMMPS):
|
||||
|
||||
| O mass = 15.9994
|
||||
| H mass = 1.008
|
||||
| O charge = -1.0484
|
||||
| H charge = 0.5242
|
||||
| :math:`r_0` of OH bond = 0.9572
|
||||
| :math:`\theta` of HOH angle = 104.52\ :math:`^{\circ}`
|
||||
| OM distance = 0.1250
|
||||
| LJ :math:`\epsilon` of O-O = 0.16275
|
||||
| LJ :math:`\sigma` of O-O = 3.16435
|
||||
| LJ :math:`\epsilon`, :math:`\sigma` of OH, HH = 0.0
|
||||
|
|
||||
* - Parameter
|
||||
- TIP4P (original)
|
||||
- TIP4P/Ice
|
||||
- TIP4P/2005
|
||||
- TIP4P (Ewald)
|
||||
* - O mass (amu)
|
||||
- 15.9994
|
||||
- 15.9994
|
||||
- 15.9994
|
||||
- 15.9994
|
||||
* - H mass (amu)
|
||||
- 1.008
|
||||
- 1.008
|
||||
- 1.008
|
||||
- 1.008
|
||||
* - O or M charge (:math:`e`)
|
||||
- -1.040
|
||||
- -1.1794
|
||||
- -1.1128
|
||||
- -1.04844
|
||||
* - H charge (:math:`e`)
|
||||
- 0.520
|
||||
- 0.5897
|
||||
- 0.5564
|
||||
- 0.52422
|
||||
* - LJ :math:`\epsilon` of OO (kcal/mole)
|
||||
- 0.1550
|
||||
- 0.21084
|
||||
- 0.1852
|
||||
- 0.16275
|
||||
* - LJ :math:`\sigma` of OO (:math:`\AA`)
|
||||
- 3.1536
|
||||
- 3.1668
|
||||
- 3.1589
|
||||
- 3.16435
|
||||
* - LJ :math:`\epsilon` of HH, MM, OH, OM, HM (kcal/mole)
|
||||
- 0.0
|
||||
- 0.0
|
||||
- 0.0
|
||||
- 0.0
|
||||
* - LJ :math:`\sigma` of HH, MM, OH, OM, HM (:math:`\AA`)
|
||||
- 1.0
|
||||
- 1.0
|
||||
- 1.0
|
||||
- 1.0
|
||||
* - :math:`r_0` of OH bond (:math:`\AA`)
|
||||
- 0.9572
|
||||
- 0.9572
|
||||
- 0.9572
|
||||
- 0.9572
|
||||
* - :math:`\theta_0` of HOH angle
|
||||
- 104.52\ :math:`^{\circ}`
|
||||
- 104.52\ :math:`^{\circ}`
|
||||
- 104.52\ :math:`^{\circ}`
|
||||
- 104.52\ :math:`^{\circ}`
|
||||
* - OM distance (:math:`\AA`)
|
||||
- 0.15
|
||||
- 0.1577
|
||||
- 0.1546
|
||||
- 0.1250
|
||||
|
||||
Note that the when using the TIP4P pair style, the neighbor list cutoff
|
||||
for Coulomb interactions is effectively extended by a distance 2 \* (OM
|
||||
@ -108,6 +146,118 @@ trade-off for your model. The OM distance and the LJ and Coulombic
|
||||
cutoffs are set in the :doc:`pair_style lj/cut/tip4p/long
|
||||
<pair_lj_cut_tip4p>` command.
|
||||
|
||||
Below is the code for a LAMMPS input file using the implicit method and
|
||||
the :ref:`TIP3P molecule file <tip3p_molecule>`. Because the TIP4P
|
||||
charges are different from TIP3P they need to be reset (or the molecule
|
||||
file changed):
|
||||
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
units real
|
||||
atom_style full
|
||||
region box block -5 5 -5 5 -5 5
|
||||
create_box 2 box bond/types 1 angle/types 1 &
|
||||
extra/bond/per/atom 2 extra/angle/per/atom 1 extra/special/per/atom 2
|
||||
|
||||
mass 1 15.9994
|
||||
mass 2 1.008
|
||||
|
||||
pair_style lj/cut/tip4p/cut 1 2 1 1 0.15 8.0
|
||||
pair_coeff 1 1 0.1550 3.1536
|
||||
pair_coeff 2 2 0.0 1.0
|
||||
|
||||
bond_style zero
|
||||
bond_coeff 1 0.9574
|
||||
|
||||
angle_style zero
|
||||
angle_coeff 1 104.52
|
||||
|
||||
molecule water tip3p.mol # this uses the TIP3P geometry
|
||||
create_atoms 0 random 33 34564 NULL mol water 25367 overlap 1.33
|
||||
# must change charges for TIP4P
|
||||
set type 1 charge -1.040
|
||||
set type 2 charge 0.520
|
||||
|
||||
fix rigid all shake 0.001 10 10000 b 1 a 1
|
||||
minimize 0.0 0.0 1000 10000
|
||||
|
||||
reset_timestep 0
|
||||
timestep 1.0
|
||||
velocity all create 300.0 5463576
|
||||
fix integrate all nvt temp 300 300 100.0
|
||||
|
||||
thermo_style custom step temp press etotal pe
|
||||
|
||||
thermo 1000
|
||||
run 20000
|
||||
write_data tip4p-implicit.data nocoeff
|
||||
|
||||
Below is the code for a LAMMPS input file using the explicit method and
|
||||
a TIP4P molecule file. Because of using :doc:`fix rigid/nvt/small
|
||||
<fix_rigid>` no bonds need to be defined and thus no extra storage needs
|
||||
to be reserved for them, but we need to switch to atom style full or use
|
||||
:doc:`fix property/atom mol <fix_property_atom>` so that fix
|
||||
rigid/nvt/small can identify rigid bodies by their molecule ID:
|
||||
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
units real
|
||||
atom_style charge
|
||||
atom_modify map array
|
||||
region box block -5 5 -5 5 -5 5
|
||||
create_box 3 box
|
||||
|
||||
mass 1 15.9994
|
||||
mass 2 1.008
|
||||
mass 3 1.0e-100
|
||||
|
||||
pair_style lj/cut/coul/cut 8.0
|
||||
pair_coeff 1 1 0.1550 3.1536
|
||||
pair_coeff 2 2 0.0 1.0
|
||||
pair_coeff 3 3 0.0 1.0
|
||||
|
||||
fix mol all property/atom mol
|
||||
molecule water tip4p.mol
|
||||
create_atoms 0 random 33 34564 NULL mol water 25367 overlap 1.33
|
||||
|
||||
timestep 0.5
|
||||
fix integrate all rigid/nvt/small molecule temp 300.0 300.0 100.0
|
||||
velocity all create 300.0 5463576
|
||||
|
||||
thermo_style custom step temp press etotal density pe ke
|
||||
thermo 1000
|
||||
run 20000
|
||||
write_data tip4p-explicit.data nocoeff
|
||||
|
||||
.. _tip4p_molecule:
|
||||
.. code-block::
|
||||
|
||||
# Water molecule. Explicit TIP4P geometry for use with fix rigid
|
||||
|
||||
4 atoms
|
||||
|
||||
Coords
|
||||
|
||||
1 0.00000 -0.06556 0.00000
|
||||
2 0.75695 0.52032 0.00000
|
||||
3 -0.75695 0.52032 0.00000
|
||||
4 0.00000 0.08444 0.00000
|
||||
|
||||
Types
|
||||
|
||||
1 1 # O
|
||||
2 2 # H
|
||||
3 2 # H
|
||||
4 3 # M
|
||||
|
||||
Charges
|
||||
|
||||
1 0.000
|
||||
2 0.520
|
||||
3 0.520
|
||||
4 -1.040
|
||||
|
||||
|
||||
Wikipedia also has a nice article on `water models <https://en.wikipedia.org/wiki/Water_model>`_.
|
||||
|
||||
----------
|
||||
@ -116,3 +266,13 @@ Wikipedia also has a nice article on `water models <https://en.wikipedia.org/wik
|
||||
|
||||
**(Jorgensen)** Jorgensen, Chandrasekhar, Madura, Impey, Klein, J Chem
|
||||
Phys, 79, 926 (1983).
|
||||
|
||||
.. _Abascal1:
|
||||
|
||||
**(Abascal1)** Abascal, Sanz, Fernandez, Vega, J Chem Phys, 122, 234511 (2005)
|
||||
https://doi.org/10.1063/1.1931662
|
||||
|
||||
.. _Abascal2:
|
||||
|
||||
**(Abascal2)** Abascal, J Chem Phys, 123, 234505 (2005)
|
||||
https://doi.org/10.1063/1.2121687
|
||||
|
||||
162
doc/src/Howto_tip5p.rst
Normal file
162
doc/src/Howto_tip5p.rst
Normal file
@ -0,0 +1,162 @@
|
||||
TIP5P water model
|
||||
=================
|
||||
|
||||
The five-point TIP5P rigid water model extends the :doc:`three-point
|
||||
TIP3P model <Howto_tip3p>` by adding two additional sites L, usually
|
||||
massless, where the charge associated with the oxygen atom is placed.
|
||||
These sites L are located at a fixed distance away from the oxygen atom,
|
||||
forming a tetrahedral angle that is rotated by 90 degrees from the HOH
|
||||
plane. Those sites thus somewhat approximate lone pairs of the oxygen
|
||||
and consequently improve the water structure to become even more
|
||||
"tetrahedral" in comparison to the :doc:`four-point TIP4P model
|
||||
<Howto_tip4p>`.
|
||||
|
||||
A suitable pair style with cutoff Coulomb would be:
|
||||
|
||||
* :doc:`pair_style lj/cut/coul/cut <pair_lj_cut_coul>`
|
||||
|
||||
or these commands for a long-range model:
|
||||
|
||||
* :doc:`pair_style lj/cut/coul/long <pair_lj_cut_coul>`
|
||||
* :doc:`pair_style lj/cut/coul/long/soft <pair_fep_soft>`
|
||||
* :doc:`kspace_style pppm <kspace_style>`
|
||||
* :doc:`kspace_style pppm/disp <kspace_style>`
|
||||
|
||||
A TIP5P model *must* be run using a :doc:`rigid fix <fix_rigid>` since
|
||||
there is no other option to keep this kind of structure rigid in LAMMPS.
|
||||
In order to avoid that LAMMPS produces an error due to the massless L
|
||||
sites, those need to be assigned a tiny non-zero mass.
|
||||
|
||||
The table below lists the force field parameters (in real :doc:`units
|
||||
<units>`) to for a the TIP5P model with a cutoff :ref:`(Mahoney)
|
||||
<Mahoney>` and the TIP5P-E model :ref:`(Rick) <Rick>` for use with a
|
||||
long-range Coulombic solver (e.g. Ewald or PPPM in LAMMPS).
|
||||
|
||||
.. list-table::
|
||||
:header-rows: 1
|
||||
:widths: auto
|
||||
|
||||
* - Parameter
|
||||
- TIP5P
|
||||
- TIP5P-E
|
||||
* - O mass (amu)
|
||||
- 15.9994
|
||||
- 15.9994
|
||||
* - H mass (amu)
|
||||
- 1.008
|
||||
- 1.008
|
||||
* - O charge (:math:`e`)
|
||||
- 0.0
|
||||
- 0.0
|
||||
* - L charge (:math:`e`)
|
||||
- -0.241
|
||||
- -0.241
|
||||
* - H charge (:math:`e`)
|
||||
- 0.241
|
||||
- 0.241
|
||||
* - LJ :math:`\epsilon` of OO (kcal/mole)
|
||||
- 0.1600
|
||||
- 0.1780
|
||||
* - LJ :math:`\sigma` of OO (:math:`\AA`)
|
||||
- 3.1200
|
||||
- 3.0970
|
||||
* - LJ :math:`\epsilon` of HH, LL, OH, OL, HL (kcal/mole)
|
||||
- 0.0
|
||||
- 0.0
|
||||
* - LJ :math:`\sigma` of HH, LL, OH, OL, HL (:math:`\AA`)
|
||||
- 1.0
|
||||
- 1.0
|
||||
* - :math:`r_0` of OH bond (:math:`\AA`)
|
||||
- 0.9572
|
||||
- 0.9572
|
||||
* - :math:`\theta_0` of HOH angle
|
||||
- 104.52\ :math:`^{\circ}`
|
||||
- 104.52\ :math:`^{\circ}`
|
||||
* - OL distance (:math:`\AA`)
|
||||
- 0.70
|
||||
- 0.70
|
||||
* - :math:`\theta_0` of LOL angle
|
||||
- 109.47\ :math:`^{\circ}`
|
||||
- 109.47\ :math:`^{\circ}`
|
||||
|
||||
Below is the code for a LAMMPS input file for setting up a simulation of
|
||||
TIP5P water with a molecule file. Because of using :doc:`fix
|
||||
rigid/nvt/small <fix_rigid>` no bonds need to be defined and thus no
|
||||
extra storage needs to be reserved for them, but we need to switch to
|
||||
atom style full or use :doc:`fix property/atom mol <fix_property_atom>`
|
||||
so that fix rigid/nvt/small can identify rigid bodies by their molecule
|
||||
ID:
|
||||
|
||||
.. code-block:: LAMMPS
|
||||
|
||||
units real
|
||||
atom_style charge
|
||||
atom_modify map array
|
||||
region box block -5 5 -5 5 -5 5
|
||||
create_box 3 box
|
||||
|
||||
mass 1 15.9994
|
||||
mass 2 1.008
|
||||
mass 3 1.0e-100
|
||||
|
||||
pair_style lj/cut/coul/cut 8.0
|
||||
pair_coeff 1 1 0.160 3.12
|
||||
pair_coeff 2 2 0.0 1.0
|
||||
pair_coeff 3 3 0.0 1.0
|
||||
|
||||
fix mol all property/atom mol
|
||||
molecule water tip5p.mol
|
||||
create_atoms 0 random 33 34564 NULL mol water 25367 overlap 1.33
|
||||
|
||||
timestep 0.5
|
||||
fix integrate all rigid/nvt/small molecule temp 300.0 300.0 100.0
|
||||
reset_timestep 0
|
||||
velocity all create 300.0 5463576
|
||||
|
||||
thermo_style custom step temp press etotal density pe ke
|
||||
thermo 1000
|
||||
run 20000
|
||||
write_data tip5p.data nocoeff
|
||||
|
||||
.. _tip5p_molecule:
|
||||
.. code-block::
|
||||
|
||||
# Water molecule. Explicit TIP5P geometry for use with fix rigid
|
||||
|
||||
5 atoms
|
||||
|
||||
Coords
|
||||
|
||||
1 0.00000 -0.06556 0.00000
|
||||
2 0.75695 0.52032 0.00000
|
||||
3 -0.75695 0.52032 0.00000
|
||||
4 0.00000 -0.46971 0.57154
|
||||
5 0.00000 -0.46971 -0.57154
|
||||
|
||||
Types
|
||||
|
||||
1 1 # O
|
||||
2 2 # H
|
||||
3 2 # H
|
||||
4 3 # L
|
||||
5 3 # L
|
||||
|
||||
Charges
|
||||
|
||||
1 0.000
|
||||
2 0.241
|
||||
3 0.241
|
||||
4 -0.241
|
||||
5 -0.241
|
||||
|
||||
Wikipedia also has a nice article on `water models <https://en.wikipedia.org/wiki/Water_model>`_.
|
||||
|
||||
----------
|
||||
|
||||
.. _Mahoney:
|
||||
|
||||
**(Mahoney)** Mahoney, Jorgensen, J Chem Phys 112, 8910 (2000)
|
||||
|
||||
.. _Rick:
|
||||
|
||||
**(Rick)** Rick, J Chem Phys 120, 6085 (2004)
|
||||
@ -11,12 +11,14 @@ LAMMPS in workshop settings, we had to redirect Windows users to
|
||||
Linux Virtual Machines such as VirtualBox or Unix-like compilation with
|
||||
Cygwin.
|
||||
|
||||
With the latest updates in Windows 10 (Version 2004, Build 19041 or higher),
|
||||
Microsoft has added a new way to work on Linux-based code. The Windows
|
||||
Subsystem for Linux (WSL). With WSL Version 2, you now get a Linux Virtual
|
||||
Machine that transparently integrates into Windows. All you need is to ensure
|
||||
you have the latest Windows updates installed and enable this new feature.
|
||||
Linux VMs are then easily installed using the Microsoft Store.
|
||||
With the latest updates in Windows 10 (Version 2004, Build 19041 or
|
||||
higher), Microsoft has added a new way to work on Linux-based code. The
|
||||
`Windows Subsystem for Linux (WSL)
|
||||
<https://learn.microsoft.com/en-us/windows/wsl/>`_. With WSL Version 2,
|
||||
you now get a Linux Virtual Machine that transparently integrates into
|
||||
Windows. All you need is to ensure you have the latest Windows updates
|
||||
installed and enable this new feature. Linux VMs are then easily
|
||||
installed using the Microsoft Store.
|
||||
|
||||
In this tutorial, I'll show you how to set up and compile LAMMPS for both serial
|
||||
and MPI usage in WSL2.
|
||||
|
||||
@ -1,13 +1,13 @@
|
||||
Download an executable for Linux or Mac via Conda
|
||||
-------------------------------------------------
|
||||
Download an executable for Linux or macOS via Conda
|
||||
---------------------------------------------------
|
||||
|
||||
Pre-compiled LAMMPS binaries are available for macOS and Linux via the
|
||||
`Conda <conda_>`_ package management system.
|
||||
|
||||
First, one must set up the Conda package manager on your system. Follow the
|
||||
instructions to install `Miniconda <mini_conda_install_>`_, then create a conda
|
||||
environment (named `my-lammps-env` or whatever you prefer) for your LAMMPS
|
||||
install:
|
||||
First, one must set up the Conda package manager on your system. Follow
|
||||
the instructions to install `Miniconda <mini_conda_install_>`_, then
|
||||
create a conda environment (named `my-lammps-env` or whatever you
|
||||
prefer) for your LAMMPS install:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
|
||||
@ -26,15 +26,18 @@ provides `limited support for subversion clients <svn_>`_.
|
||||
.. _git: https://git-scm.com
|
||||
.. _svn: https://help.github.com/en/github/importing-your-projects-to-github/working-with-subversion-on-github
|
||||
|
||||
You can follow the LAMMPS development on 3 different git branches:
|
||||
You can follow the LAMMPS development on 4 different git branches:
|
||||
|
||||
* **stable** : this branch is updated from the *release* branch with
|
||||
every stable release version and also has selected bug fixes and updates
|
||||
back-ported from the *develop* branch
|
||||
* **release** : this branch is updated with every patch or feature release;
|
||||
updates are always "fast-forward" merges from *develop*
|
||||
* **develop** : this branch follows the ongoing development and
|
||||
is updated with every merge commit of a pull request
|
||||
* **stable** : this branch is updated from the *release* branch with
|
||||
every stable release version and also has selected bug fixes with every
|
||||
update release when the *maintenance* branch is merged into it
|
||||
* **maintenance** : this branch collects back-ported bug fixes from the
|
||||
*develop* branch to the *stable* branch. It is used to update *stable*
|
||||
for update releases and it synchronized with *stable* at each stable release.
|
||||
|
||||
To access the git repositories on your box, use the clone command to
|
||||
create a local copy of the LAMMPS repository with a command like:
|
||||
@ -60,17 +63,17 @@ between them at any time using "git checkout <branch name>".)
|
||||
*--depth* git command line flag. That will create a "shallow clone"
|
||||
of the repository, which contains only a subset of the git history.
|
||||
Using a depth of 1000 is usually sufficient to include the head
|
||||
commits of the *develop* and the *release* branches. To include the
|
||||
head commit of the *stable* branch you may need a depth of up
|
||||
to 10000. If you later need more of the git history, you can always
|
||||
convert the shallow clone into a "full clone".
|
||||
commits of the *develop*, the *release*, and the *maintenance*
|
||||
branches. To include the head commit of the *stable* branch you may
|
||||
need a depth of up to 10000. If you later need more of the git
|
||||
history, you can always convert the shallow clone into a "full
|
||||
clone".
|
||||
|
||||
Once the command completes, your directory will contain the same files
|
||||
as if you unpacked a current LAMMPS tarball, with the exception, that
|
||||
the HTML documentation files are not included. They can be fetched
|
||||
from the LAMMPS website by typing ``make fetch`` in the doc directory.
|
||||
Or they can be generated from the content provided in ``doc/src`` by
|
||||
typing ``make html`` from the ``doc`` directory.
|
||||
the HTML documentation files are not included. They can be generated
|
||||
from the content provided in ``doc/src`` by typing ``make html`` from
|
||||
the ``doc`` directory.
|
||||
|
||||
After initial cloning, as bug fixes and new features are added to
|
||||
LAMMPS you can stay up-to-date by typing the following git commands
|
||||
@ -79,8 +82,9 @@ from within the "mylammps" directory:
|
||||
.. code-block:: bash
|
||||
|
||||
git checkout release # not needed if you always stay in this branch
|
||||
git checkout stable # use one of these 3 checkout commands
|
||||
git checkout stable # use one of these 4 checkout commands
|
||||
git checkout develop # to choose the branch to follow
|
||||
git checkout maintenance
|
||||
git pull
|
||||
|
||||
Doing a "pull" will not change any files you have added to the LAMMPS
|
||||
@ -145,7 +149,7 @@ changed. How to do this depends on the build system you are using.
|
||||
to enforce consistency of the source between the src folder
|
||||
and package directories. This is OK to do even if you don't
|
||||
use any packages. The ``make purge`` command removes any deprecated
|
||||
src files if they were removed by the patch from a package
|
||||
src files if they were removed by the update from a package
|
||||
subdirectory.
|
||||
|
||||
.. warning::
|
||||
@ -159,10 +163,10 @@ changed. How to do this depends on the build system you are using.
|
||||
.. admonition:: Git protocols
|
||||
:class: note
|
||||
|
||||
The servers at github.com support the "https://" access protocol for
|
||||
The servers at github.com support the "https" access protocol for
|
||||
anonymous, read-only access. If you have a suitably configured
|
||||
GitHub account, you may also use SSH protocol with the URL
|
||||
"git@github.com:lammps/lammps.git".
|
||||
``git@github.com:lammps/lammps.git``.
|
||||
|
||||
The LAMMPS GitHub project is currently overseen by Axel Kohlmeyer
|
||||
(Temple U, akohlmey at gmail.com).
|
||||
|
||||
@ -3,6 +3,7 @@ Download an executable for Linux
|
||||
|
||||
Binaries are available for different versions of Linux:
|
||||
|
||||
- :ref:`Pre-built static Linux x86_64 executables <static>`
|
||||
- :ref:`Pre-built Ubuntu and Debian Linux executables <ubuntu>`
|
||||
- :ref:`Pre-built Fedora Linux executables <fedora>`
|
||||
- :ref:`Pre-built EPEL Linux executables (RHEL, CentOS) <epel>`
|
||||
@ -21,6 +22,33 @@ Binaries are available for different versions of Linux:
|
||||
|
||||
----------
|
||||
|
||||
.. _static:
|
||||
|
||||
Pre-built static Linux x86_64 executables
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Pre-built LAMMPS executables for Linux, that are statically linked and
|
||||
compiled for 64-bit x86 CPUs (x86_64 or AMD64) are available for download
|
||||
at `https://download.lammps.org/static/ <https://download.lammps.org/static/>`_.
|
||||
Because of that static linkage (and unlike the Linux distribution specific
|
||||
packages listed below), they do not depend on any installed software and
|
||||
thus should run on *any* 64-bit x86 machine with *any* Linux version.
|
||||
|
||||
These executable include most of the available packages and multi-thread
|
||||
parallelization (via INTEL, KOKKOS, or OPENMP package). They are **not**
|
||||
compatible with MPI. Several of the LAMMPS tools executables (e.g. ``msi2lmp``)
|
||||
and the ``lammps-shell`` program are included as well. Because of the
|
||||
static linkage, there is no ``liblammps.so`` library file and thus also the
|
||||
LAMMPS python module, which depends on it, is not included.
|
||||
|
||||
The compressed tar archives available for download have names following
|
||||
the pattern ``lammps-linux-x86_64-<version>.tar.gz`` and will all unpack
|
||||
into a ``lammps-static`` folder. The executables are then in the
|
||||
``lammps-static/bin/`` folder. Since they do not depend on any other
|
||||
software, they may be freely moved or copied around.
|
||||
|
||||
----------
|
||||
|
||||
.. _ubuntu:
|
||||
|
||||
Pre-built Ubuntu and Debian Linux executables
|
||||
@ -144,7 +172,7 @@ Pre-built EPEL Linux executable
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Pre-built LAMMPS (and KIM) packages for stable releases are available
|
||||
in the `Extra Packages for Enterprise Linux (EPEL) repository <https://fedoraproject.org/wiki/EPEL>`_
|
||||
in the `Extra Packages for Enterprise Linux (EPEL) repository <https://docs.fedoraproject.org/en-US/epel/>`_
|
||||
for use with Red Hat Enterprise Linux (RHEL) or CentOS version 7.x
|
||||
and compatible Linux distributions. Names of packages, executable,
|
||||
and content are the same as described above for Fedora Linux.
|
||||
@ -232,7 +260,7 @@ There are three scripts available, named `lammps
|
||||
<https://aur.archlinux.org/packages/lammps>`_, `lammps-beta
|
||||
<https://aur.archlinux.org/packages/lammps>`_ and `lammps-git
|
||||
<https://aur.archlinux.org/packages/lammps>`_. They respectively
|
||||
package the stable, patch and git releases.
|
||||
package the stable, feature, and git releases.
|
||||
|
||||
To install, you will need to have the git package installed. You may use
|
||||
any of the above names in-place of lammps.
|
||||
|
||||
@ -1,12 +1,12 @@
|
||||
Download an executable for Mac
|
||||
------------------------------
|
||||
Download an executable for macOS
|
||||
--------------------------------
|
||||
|
||||
LAMMPS can be downloaded, built, and configured for OS X on a Mac with
|
||||
`Homebrew <homebrew_>`_. (Alternatively, see the installation
|
||||
instructions for :doc:`downloading an executable via Conda
|
||||
<Install_conda>`.) The following LAMMPS packages are unavailable at
|
||||
this time because of additional requirements not yet met: GPU, KOKKOS,
|
||||
LATTE, MSCG, MPIIO, POEMS, VORONOI.
|
||||
LAMMPS can be downloaded, built, and configured for macOS with `Homebrew
|
||||
<homebrew_>`_. (Alternatively, see the installation instructions for
|
||||
:doc:`downloading an executable via Conda <Install_conda>`.) The
|
||||
following LAMMPS packages are unavailable at this time because of
|
||||
additional requirements not yet met: GPU, KOKKOS, MSCG, MPIIO, POEMS,
|
||||
VORONOI.
|
||||
|
||||
After installing Homebrew, you can install LAMMPS on your system with
|
||||
the following commands:
|
||||
@ -15,8 +15,9 @@ the following commands:
|
||||
|
||||
brew install lammps
|
||||
|
||||
This will install the executables "lammps_serial" and "lammps_mpi", as well as
|
||||
the LAMMPS "doc", "potentials", "tools", "bench", and "examples" directories.
|
||||
This will install the executables "lammps_serial" and "lammps_mpi", as
|
||||
well as the LAMMPS "doc", "potentials", "tools", "bench", and "examples"
|
||||
directories.
|
||||
|
||||
Once LAMMPS is installed, you can test the installation with the
|
||||
Lennard-Jones benchmark file:
|
||||
|
||||
@ -2,7 +2,7 @@ Download source and documentation as a tarball
|
||||
----------------------------------------------
|
||||
|
||||
You can download a current LAMMPS tarball from the `download page <download_>`_
|
||||
of the `LAMMPS website <lws_>`_.
|
||||
of the `LAMMPS website <lws_>`_ or from GitHub (see below).
|
||||
|
||||
.. _download: https://www.lammps.org/download.html
|
||||
.. _bug: https://www.lammps.org/bug.html
|
||||
@ -10,28 +10,28 @@ of the `LAMMPS website <lws_>`_.
|
||||
.. _lws: https://www.lammps.org
|
||||
|
||||
You have two choices of tarballs, either the most recent stable release
|
||||
or the most current patch or feature release. Stable releases occur a
|
||||
few times per year, and undergo more testing before release. Feature
|
||||
releases occur every 4 to 8 weeks. The new contents in all feature
|
||||
releases are listed on the `bug and feature page <bug_>`_ of the LAMMPS
|
||||
homepage.
|
||||
|
||||
Both tarballs include LAMMPS documentation (HTML and PDF files)
|
||||
corresponding to that version. The download page also has an option
|
||||
to download the current-version LAMMPS documentation by itself.
|
||||
or the most recent feature release. Stable releases occur a few times
|
||||
per year, and undergo more testing before release. Also, between stable
|
||||
releases bug fixes from the feature releases are back-ported and the
|
||||
tarball occasionally updated. Feature releases occur every 4 to 8
|
||||
weeks. The new contents in all feature releases are listed on the `bug
|
||||
and feature page <bug_>`_ of the LAMMPS homepage.
|
||||
|
||||
Tarballs of older LAMMPS versions can also be downloaded from `this page
|
||||
<older_>`_.
|
||||
|
||||
Once you have a tarball, unzip and untar it with the following
|
||||
Tarballs downloaded from the LAMMPS homepage include the pre-translated
|
||||
LAMMPS documentation (HTML and PDF files) corresponding to that version.
|
||||
|
||||
Once you have a tarball, uncompress and untar it with the following
|
||||
command:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
tar -xzvf lammps*.tar.gz
|
||||
|
||||
This will create a LAMMPS directory with the version date
|
||||
in its name, e.g. lammps-23Jun18.
|
||||
This will create a LAMMPS directory with the version date in its name,
|
||||
e.g. lammps-28Mar23.
|
||||
|
||||
----------
|
||||
|
||||
@ -44,7 +44,9 @@ with the following command, to create a lammps-<version> directory:
|
||||
|
||||
unzip lammps*.zip
|
||||
|
||||
This version corresponds to the selected LAMMPS patch or stable release.
|
||||
This version corresponds to the selected LAMMPS feature or stable
|
||||
release (as indicated by the matching git tag) and will only contain the
|
||||
source code and no pre-built documentation.
|
||||
|
||||
.. _git: https://github.com/lammps/lammps/releases
|
||||
|
||||
|
||||
@ -17,11 +17,12 @@ install the Windows MPI package (MPICH2 from Argonne National Labs),
|
||||
needed to run in parallel with MPI.
|
||||
|
||||
The LAMMPS binaries contain *all* :doc:`optional packages <Packages>`
|
||||
included in the source distribution except: KIM, KOKKOS, MSCG, PYTHON,
|
||||
ADIOS, H5MD, NETCDF, QMMM, ML-QUIP, and VTK.
|
||||
The serial version also does not include the MPIIO and
|
||||
LATBOLTZ packages. The GPU package is compiled for OpenCL with
|
||||
mixed precision kernels.
|
||||
included in the source distribution except: ADIOS, H5MD, KIM, ML-PACE,
|
||||
ML-QUIP, MSCG, NETCDF, PLUMED, QMMM, SCAFACOS, and VTK. The serial
|
||||
version also does not include the MPIIO and LATBOLTZ packages. The
|
||||
PYTHON package is only available in the Python installers that bundle a
|
||||
Python runtime. The GPU package is compiled for OpenCL with mixed
|
||||
precision kernels.
|
||||
|
||||
The LAMMPS library is compiled as a shared library and the
|
||||
:doc:`LAMMPS Python module <Python_module>` is installed, so that
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user