Compare commits

...

2621 Commits

Author SHA1 Message Date
33dcfb5390 Merge pull request #3978 from akohlmey/next_patch_release
Update version strings for 21 Nov 2023 feature release
2023-11-21 15:51:35 -05:00
fef0e0762b Merge pull request #3981 from rbberger/update_cmake_codeowner
Update CODEOWNERS, part 2
2023-11-21 14:27:07 -05:00
fc28fc318b Update CODEOWNERS for cmake 2023-11-21 10:57:33 -07:00
92c5150034 Merge pull request #3979 from akohlmey/intel-fmtlib-workarounds
Workaround for bug in C++17 support in Intel Classic compilers with fmtlib
2023-11-21 09:35:34 -05:00
ac90a4ac9c reorder for cleaner dependency handling 2023-11-19 09:19:03 -05:00
6cd2055084 delete obsolete dependencies 2023-11-19 09:18:40 -05:00
bc692dce79 add missing entries 2023-11-19 09:18:17 -05:00
3c73882a68 update Purge.list and avoid redundant checks 2023-11-19 08:59:27 -05:00
de7f87621a Merge pull request #3974 from stanmoore1/skip_trim
Add trim option to skip neighbor list build styles
2023-11-19 07:02:40 -05:00
11305107d9 update release date to 21 November 2023 2023-11-19 05:40:05 -05:00
d60fb7067a Merge branch 'develop' into next_patch_release 2023-11-19 05:31:41 -05:00
0487dc5331 copy intel C++17 compiler hack to Kokkos makefiles 2023-11-18 11:15:53 -05:00
2d4527d59a tweak intel compiler makefile for traditional build 2023-11-18 07:14:38 -05:00
baa00d22e9 simplify 2023-11-18 06:22:25 -05:00
c66710934d reduce warnings when compiling with intel classic compilers 2023-11-18 06:22:16 -05:00
be286d2c7d lower the C++ standard to 14 for some files when compiling with intel classic compiler 2023-11-18 06:21:28 -05:00
6ae0715650 Merge pull request #3976 from akohlmey/collected-small-fixes
Collected small fixes and updates
2023-11-18 00:03:37 -05:00
d1f3411db9 Merge branch 'develop' of github.com:lammps/lammps into skip_trim 2023-11-17 17:49:27 -07:00
be19b5c210 Make naming consistent 2023-11-17 12:46:45 -07:00
6fc7f5689b Port changes to OPENMP package 2023-11-17 10:04:11 -07:00
06b962fc33 Bugfix: port missed changes from #3846 2023-11-17 09:50:03 -07:00
0083cc9e26 Port changes to OPENMP and INTEL packages 2023-11-17 09:12:43 -07:00
2c670e8d44 update version strings to 17 Nov 2023 2023-11-17 08:25:44 -05:00
5223f2dfb4 Merge remote-tracking branch 'akohlmey/numerial_propagation' into collected-small-fixes 2023-11-17 08:10:13 -05:00
ab183eb6e6 Merge remote-tracking branch 'github/develop' into collected-small-fixes 2023-11-17 08:09:58 -05:00
9a432341f9 Merge pull request #3970 from Yi-FanLi/numerial_propagation
fix pimd/langevin: add support for plain integrators without normal mode transformation
2023-11-17 08:08:33 -05:00
a4da55942a check if creating unix domain socket failed 2023-11-17 03:16:27 -05:00
e59a665943 add tests for immediate variables 2023-11-17 03:00:16 -05:00
ea8234a875 treat immediate variables like equal style also for evaluating references to computes and fixes 2023-11-16 22:08:00 -05:00
752088c410 Merge pull request #3975 from jibril-b-coulibaly/small_changes
correct typo and link in body particles doc
2023-11-16 21:16:22 -05:00
d739faf971 disable if constexpr for all Intel compilers 2023-11-16 21:14:55 -05:00
98ba8706a5 Merge branch 'develop' of github.com:lammps/lammps into skip_trim 2023-11-16 16:28:47 -07:00
4608444ada Add trim option to skip neighbor list build styles 2023-11-16 16:23:09 -07:00
6f366b8c74 Fix issues with sorting neigh list by cutoff distance 2023-11-16 16:21:59 -07:00
718cfc4562 Fix indexing bug 2023-11-16 16:19:44 -07:00
ddd5cc1a73 avoid segfault on command errors in force style unit tests and print error mesage instead 2023-11-16 17:53:12 -05:00
ac5f28719b explicitly include if constexpr only when C++17 or later is selected 2023-11-16 17:52:58 -05:00
44b126a87d correct typo and link in body particles doc 2023-11-16 10:35:02 -07:00
ba1c848f43 Merge branch 'develop' into numerial_propagation 2023-11-16 12:01:11 -05:00
7f2a6b1a85 update h2 fix pimd/langevin example 2023-11-16 12:00:29 -05:00
1f509d900e make output more consistent with other LAMMPS code 2023-11-16 11:57:33 -05:00
3664eaf12f Merge pull request #3973 from stanmoore1/kk_min
Bugfixes for Kokkos minimize
2023-11-16 08:46:22 -05:00
d31c3abbd4 Merge pull request #3971 from akohlmey/collected-small-fixes
Collected small fixes and updates
2023-11-15 17:08:30 -05:00
b326572916 flag input errors 2023-11-15 09:49:58 -05:00
aec2266064 fix typo 2023-11-15 09:43:02 -05:00
aa8f9e956f Merge branch 'develop' into collected-small-fixes 2023-11-15 08:32:06 -05:00
bcfbea9903 throw error for illegal replication values 2023-11-15 08:03:15 -05:00
5e4761d631 Merge pull request #3724 from lammps/fix-rigid-enforce2d
Enable fix rigid to support 2d enforcement internally
2023-11-15 07:08:38 -05:00
e6485002ad Avoid integer division 2023-11-13 15:08:49 -07:00
d88ffeea3f Need force_clear for atom_vec_spin_kokkos 2023-11-13 14:58:48 -07:00
bc6031cd24 Fix bug in Kokkos minimize + fix deform 2023-11-13 14:53:45 -07:00
443f0666b7 refactor some more temperature/pressure/pe compute lookups 2023-11-12 16:12:16 -05:00
3390a11312 improve error detection and messages 2023-11-12 10:04:04 -05:00
be6fcaa77f modernize 2023-11-12 04:58:24 -05:00
e6524b59fa only check significant chunk of the words 2023-11-12 04:43:17 -05:00
be02ef3a53 fix broken link 2023-11-12 04:43:17 -05:00
0f375715db modernize 2023-11-11 13:27:44 -05:00
649aad3877 modernize 2023-11-11 11:28:40 -05:00
7a425475e0 get rid of redundant class members 2023-11-11 10:27:28 -05:00
27d0d98e80 Merge pull request #4 from akohlmey/numerial_propagation 2023-11-11 06:21:59 -05:00
9ef1b2d64d apply clang-format 2023-11-11 06:20:55 -05:00
6850aacc55 doc tweaks 2023-11-11 06:09:15 -05:00
ca7242bf41 Merge branch 'develop' into numerial_propagation 2023-11-11 06:05:22 -05:00
3d14e2e0e2 whitespace 2023-11-11 06:05:07 -05:00
2e43bb0865 correct usage of virtual and override for rigid fixes and OpenMP versions 2023-11-11 05:56:06 -05:00
9a65bd4e3b update document for method=pimd 2023-11-11 04:10:31 -05:00
4ef27552c4 fix spring_force()'s position 2023-11-11 03:10:00 -05:00
ae05e35017 Merge branch 'develop' into fix-rigid-enforce2d 2023-11-11 02:21:25 -05:00
781eadc9c3 Merge pull request #3950 from akohlmey/collected-small-fixes
Collected small fixes and updates
2023-11-11 02:06:54 -05:00
ba32afc06e fix spring_energy 2023-11-11 01:45:36 -05:00
98a0f43c9b add spring_force function 2023-11-11 01:04:13 -05:00
6393519419 q_step function 2023-11-10 16:07:00 -05:00
beea2a6ee1 Merge branch 'develop' into collected-small-fixes 2023-11-10 10:57:08 -05:00
23ae4a34b3 Merge pull request #3958 from jrgissing/fix_deposit-var-keyword
Fix deposit var keyword
2023-11-10 10:56:21 -05:00
41a3115801 Merge pull request #3966 from yury-lysogorskiy/patch-2
[BUGFIX] Update pair_pace_extrapolation.cpp
2023-11-10 10:49:40 -05:00
6dca6471a3 Merge pull request #3968 from rbberger/fix_wrong_argv_bugs
Bugfix: Correctly build argv with nullptr at the end
2023-11-10 10:48:18 -05:00
f413d395a5 add support for method=PIMD; add q_step function 2023-11-10 00:20:51 -05:00
e6d3148533 add method=pimd support for Langevin thermostat 2023-11-09 23:34:01 -05:00
eff65ad3f3 bugfix: correctly build argv when using Python interface 2023-11-09 20:29:14 -07:00
053a904d08 bugfix: make copy of exename 2023-11-08 09:18:58 -07:00
46768d0ff3 Correctly build argv with nullptr at the end 2023-11-08 09:18:58 -07:00
6fef7871e8 Update pair_pace_extrapolation.cpp
BUGFIX: pair_pace_extrapolation: setup flag aceimpl->ace->compute_projections = true before computing  extrapolation grade
2023-11-07 16:46:47 +01:00
17640f54d2 reset warnflag for each run 2023-11-04 17:53:19 -04:00
3d3b07f0d4 consolidate nb3b pair style docs 2023-11-03 22:39:42 -04:00
9b88ba595d reduce timestep to get correct runs and no crashes. update logs. 2023-11-03 16:52:35 -04:00
0fbe388cbd undo "boxgeom" changes 2023-11-03 16:40:18 -04:00
a0f7612f13 encode system box geometry into a class member 2023-11-03 03:25:08 -04:00
f288efe823 Merge branch 'collected-small-fixes' of https://github.com/akohlmey/lammps into collected-small-fixes 2023-11-02 17:45:31 -04:00
6102c2a460 Forces are not modified 2023-11-02 13:10:27 -06:00
8c3cda0aea Fix bug in fix_dt_reset_kokkos 2023-11-02 13:05:18 -06:00
925d006d19 join wrapped strings 2023-11-02 13:43:37 -04:00
e655cda066 Merge pull request #3828 from vladgl/kk-ompi-rocm
Dynamic check for CUDA and ROCm-aware OpenMPI support in KOKKOS package
2023-11-01 18:10:59 -04:00
bee1b66365 Merge branch 'develop' into collected-small-fixes 2023-11-01 17:57:56 -04:00
45582fee07 Merge pull request #3960 from akohlmey/nb3b-screened
New pair_style nb3b/screened
2023-11-01 14:57:00 -04:00
da597880a5 add code to avoid deadlock 2023-11-01 05:11:43 -04:00
7fbde12e6a Merge branch 'develop' into collected-small-fixes 2023-11-01 05:01:03 -04:00
b8a0622be1 Merge pull request #3964 from lammps/compute-cluster-atom-bugfix
Fix bug with compute cluster/atom and aggregate/atom when used with fix deform
2023-11-01 04:59:15 -04:00
74efe0a00c add comm of ghost atom coords to compute cluster/atom and aggregate/atom 2023-10-31 16:02:49 -06:00
4f3162888b remove debug code 2023-10-31 12:55:49 -04:00
ac527e3d3f store invrho instead of rho 2023-10-31 10:07:53 -04:00
a4064e5202 update code owners for new pair style 2023-10-31 09:37:38 -04:00
41fb0a5700 make README consistent with potential file and implementation 2023-10-31 09:34:32 -04:00
e04dfc55bd replace UTF-8 characters with their ASCII counterparts 2023-10-30 23:24:54 -04:00
14f8d99894 update ReaxFF force field info and remove references to reax and reax/c pair styles 2023-10-30 23:21:46 -04:00
5674786acd add feature to comment out and uncomment lines and selections from context menu 2023-10-30 15:25:06 -04:00
afa149ba1a Merge remote-tracking branch 'github/develop' into collected-small-fixes 2023-10-30 12:25:18 -04:00
6056941688 add pair_style nb3b/screened by Federica Lodesani 2023-10-30 11:28:45 -04:00
2e1ee3ff7a Merge branch 'lammps:develop' into fix_deposit-var-keyword 2023-10-30 10:57:50 -04:00
f0a15036cd Merge pull request #3957 from jrgissing/record_particle_insertions
Record particle insertions
2023-10-30 10:07:52 -04:00
f3a7ec8c55 copy/paste issues 2023-10-29 16:19:11 -04:00
d4ee6f476c var/set docs for fix_deposit 2023-10-29 16:13:12 -04:00
549ea506d4 add var keyword to fix_deposit
borrowed from create_atoms
2023-10-29 15:46:55 -04:00
c5c816e360 Add another check 2023-10-28 20:14:53 -06:00
56d2a791af whitespace 2023-10-28 14:01:39 -04:00
902c43e8c6 formatting 2023-10-28 13:45:55 -04:00
db91f9413d docs 2023-10-28 13:41:42 -04:00
c5463e13f1 output ninserted for fixes: deposit+pour 2023-10-28 13:22:10 -04:00
ef2b3a7d70 remove accidentally committed file 2023-10-28 05:25:05 -04:00
d35c271677 limit the maximum number of iterations so the LAMMPS simulation will not stall 2023-10-27 19:10:55 -04:00
6c3206f2f6 Tweaks 2023-10-27 15:41:21 -06:00
588be47b18 remove dead code 2023-10-27 17:02:21 -04:00
e7fc2923a5 whitespace 2023-10-27 14:59:51 -06:00
36690a861d correct and simplify 2023-10-27 16:33:24 -04:00
784ae460a1 only offer completion in context menu, if there is something to complete 2023-10-27 13:18:19 -04:00
0ab6870402 Need to include MPI header 2023-10-27 10:31:24 -06:00
16dd61ca5f Remove redundant compile-time checks 2023-10-27 09:48:26 -06:00
d79aca6015 fix bug in not listing all not compiled-in styles 2023-10-27 11:08:02 -04:00
e431a972ad Stop processing commands when "quit" is found instead of crashing.
When using the library interface for processing commands, the "quit"
command will terminate the application. Instead we intercept and just
stop processing the command buffer and print a suitable message.

Long-term, we perhaps may want to add a "QuitException" and throw that.
2023-10-27 11:06:59 -04:00
6b4a190820 must skip quit command death test with MPICH version 4.1 and later due to using threads 2023-10-27 03:51:19 -04:00
dc9140dfa8 modernize 2023-10-27 03:19:11 -04:00
5a665c31f6 use better heuristics to avoid zero plot ranges 2023-10-27 00:20:34 -04:00
b9283cfcf6 modernize 2023-10-27 00:20:05 -04:00
717e1d4319 Merge branch 'collected-small-fixes' of github.com:akohlmey/lammps into collected-small-fixes 2023-10-26 20:48:47 -04:00
d33a8ea0c2 whitespace 2023-10-26 20:48:20 -04:00
c02782413f Merge remote-tracking branch 'github/develop' into collected-small-fixes 2023-10-26 20:35:36 -04:00
ed6c603488 Merge pull request #3954 from bnebgen-LANL/mliap_null_fix
Mliap null fix
2023-10-26 20:18:32 -04:00
7051852f8f Merge pull request #3947 from evoyiatzis/patch-7
Enable definition of cone region using equal variables
2023-10-26 20:07:09 -04:00
b1ffb70f7d Logic tweak 2023-10-26 17:20:33 -06:00
eea3b1a757 Whitespace 2023-10-26 13:59:36 -06:00
b6b8884bc6 clear data buffer when querying LAMMPS for info, check return values, use symbolic constant 2023-10-26 13:58:17 -04:00
22c47a4e1b expand x or y range for charts if too small 2023-10-26 12:21:48 -04:00
1e533d6496 simplify 2023-10-26 12:20:47 -04:00
ed4ae0a26c find more misformatted references in ReST sources 2023-10-26 04:46:33 -04:00
5e402c76c2 Merge remote-tracking branch 'github/develop' into collected-small-fixes 2023-10-26 04:42:24 -04:00
226786969a Merge pull request #3953 from jibril-b-coulibaly/fix_wall_region_eflag
Fix wall region eflag
2023-10-26 04:41:51 -04:00
47dd98dd34 whitespace 2023-10-25 20:38:20 -04:00
8aa28e40b7 Merge branch 'mliap_null_fix' of github.com:bnebgen-LANL/lammps-kokkos-mliap into mliap_null_fix 2023-10-25 14:40:06 -06:00
bb9f468247 Added fix to setting pair energies in kokkos 2023-10-25 14:38:28 -06:00
ea744ac8f9 fix typos 2023-10-25 11:17:24 -06:00
23d4bfe198 reset eflag=0 in fix wall/region 2023-10-25 11:08:58 -06:00
20b386fc1a update CONTRIBUTING guidelines posted on GitHub 2023-10-25 06:12:44 -04:00
020ef70300 avoid double free on B array 2023-10-24 23:18:24 -04:00
e5160b279a avoid static code analysis warnings 2023-10-24 23:12:17 -04:00
c123c7058b remove dead code 2023-10-24 19:08:00 -04:00
975cc9a052 simplify, avoid division by zero 2023-10-24 19:05:48 -04:00
8abe52c613 simplify/modernize access to computes and fixes and check dynamics casts 2023-10-24 18:59:39 -04:00
63e674cc3e simplify and remove redundant or dead code 2023-10-24 18:37:29 -04:00
c6c174469c Replace deprecated Kokkos code 2023-10-24 12:32:02 -06:00
bd0c1795b4 Fix harmless compiler warnings 2023-10-24 10:33:55 -06:00
5f2f120b4b improve help and error messages 2023-10-24 10:39:49 -04:00
88644306cd add sanity check on path to LAMMPS python package folder 2023-10-24 10:39:30 -04:00
9052f67319 Merge branch 'collected-small-fixes' of github.com:akohlmey/lammps into collected-small-fixes 2023-10-24 07:52:28 -04:00
ceed4c7db8 for consistency with CMake 3.12+ we should set Python_EXECUTABLE instead of PYTHON_EXECUTABLE 2023-10-24 07:51:54 -04:00
1e2416dfcc make sure liblinalg is built before linking phana 2023-10-23 15:00:59 -04:00
358ee6eb1b Merge branch 'lammps:develop' into mliap_null_fix 2023-10-23 05:29:07 -06:00
22cc6bf0b3 provide example python code for reading a YAML dump file 2023-10-22 20:01:23 -04:00
e518637d63 avoid invalid escape warnings for regexp expressions with python 3.12 2023-10-22 20:00:33 -04:00
731400e004 improve error messages for read_dump 2023-10-22 18:29:07 -04:00
1782008b28 programming style updates 2023-10-22 18:13:17 -04:00
b5a01e84e1 consolidate dump file field enumerators into reader.h header for consistency 2023-10-22 18:09:11 -04:00
08edd193e2 programming style updates 2023-10-21 14:57:26 -04:00
a7fb81c68e must initialize deleted pointers to null since the following commands may fail 2023-10-21 14:57:26 -04:00
1db5643d6e Merge pull request #3949 from Yi-FanLi/pimd_langevin_fix_t_prim
fix pimd/langevin: fix a small bug in the output of t_prim
2023-10-21 11:58:50 -04:00
710cd1c001 Merge branch 'lammps:develop' into mliap_null_fix 2023-10-21 04:08:19 -06:00
80f72e7a1d use times inverse_np instead 2023-10-21 00:28:33 -04:00
3d480a01a5 add the missing dividing by np in compute t_prim 2023-10-20 23:41:06 -04:00
58d299d08e Merge pull request #3948 from lammps/fix-srd-doc-page
Update citations on fix srd doc page
2023-10-20 22:14:19 -04:00
1064c82c00 Cleaned of print statements 2023-10-20 18:56:20 -06:00
fd05acec2f fix spelling 2023-10-20 20:54:05 -04:00
4aedba058c Merge branch 'develop' into fix-srd-doc-page 2023-10-20 20:47:17 -04:00
6f9310d32e Merge pull request #3943 from akohlmey/collected-small-fixes
Collected small fixes and updates
2023-10-20 20:45:11 -04:00
e1d876b7fe kokkos working 2023-10-20 18:41:46 -06:00
654a410b8c update refs on fix srd doc page 2023-10-20 12:59:36 -06:00
291defb453 update refs on fix srd doc page 2023-10-20 12:57:19 -06:00
ccbe907def avoid memory leak 2023-10-20 14:24:45 +03:00
61371bba5e remove whitespace from region_cone.cpp 2023-10-20 13:44:35 +03:00
b22d0afd97 Update region.rst 2023-10-20 13:41:00 +03:00
c180f3d825 Include method & variable definitions in region_cone.h 2023-10-20 13:31:48 +03:00
1300999c22 Enable definition of cone region using equal variables 2023-10-20 13:24:08 +03:00
0f11a9dd70 require version newer than 2 Aug 2023 for LAMMPS GUI 1.5.9 2023-10-19 23:21:18 -04:00
d93d4f8b5c normal complete, kokkos in development 2023-10-19 17:32:21 -06:00
1de15c38bf whitespace 2023-10-19 12:16:26 -07:00
2401cba84a Fix bug in Kokkos SNAP on GPUs 2023-10-19 12:15:01 -07:00
ea6bfa5948 Merge branch 'develop' into collected-small-fixes 2023-10-19 12:24:16 -04:00
f641d88f86 Merge pull request #3944 from Maria-Lesniewski/fix_bocs_bugfix
Propagate Barostat fixes to BOCS user package - see Lammps PR 1259
2023-10-19 12:22:55 -04:00
62ea874d9d Add more error checks to Kokkos minimize 2023-10-19 08:02:11 -06:00
0fc9b194dc quote strings with special characters in keyword lists 2023-10-19 10:01:10 -04:00
27e0a71849 whitespace 2023-10-19 07:44:44 -06:00
bcc93c2dc5 Initial working Null atom fix 2023-10-19 00:19:02 -06:00
4602c8c849 First null atom fix pass 2023-10-18 23:22:16 -06:00
e188407566 Cleaned fix 2023-10-18 23:17:25 -06:00
0501674724 Commit before cleaning changes 2023-10-18 23:07:21 -06:00
791f7d1d88 Add dynamic check for CUDA 2023-10-18 22:14:42 +03:00
45d2a91c62 Barostat fix - see lammps PR 879 and 942 2023-10-18 13:13:37 -04:00
54ff01d86d assign code owner to fix press/langevin 2023-10-18 08:01:41 -04:00
a5f61c5d44 address bugs and issues flagged by static code analysis with coverity scan 2023-10-18 07:59:22 -04:00
5cfd8b3c63 silence coverity scan warning 2023-10-18 07:56:50 -04:00
302e3be669 make sure itag is initialized 2023-10-18 07:51:25 -04:00
0f10269357 cleaning 2023-10-17 23:45:52 -06:00
87fdff5874 No variable transfer 2023-10-17 23:41:52 -06:00
4c980eec91 correct table formatting 2023-10-17 20:52:13 -04:00
ea69d77b79 fix issues with Qt library detection 2023-10-17 20:02:01 -04:00
dbd5f93ed4 whitespace 2023-10-17 19:41:00 -04:00
6b184e8079 copy-and-paste bugfix from @stanmoore1 2023-10-17 19:39:31 -04:00
f0801338f3 Merge pull request #3846 from lammps/triclinic-neighbor-bug
Fix occasional bug in neighbor list build for triclinic geometries due to round off
2023-10-17 19:36:43 -04:00
c051a4cf2d Fix perf regression 2023-10-17 14:18:16 -06:00
bd1794f142 Remove debug output 2023-10-17 12:59:10 -06:00
672905bbf0 Merge branch 'develop' of github.com:lammps/lammps into kk-ompi-rocm 2023-10-17 12:57:11 -06:00
750957d585 Remove unused var 2023-10-17 12:27:35 -06:00
3b4fff4164 Need to sync tag, add template param 2023-10-17 12:01:01 -06:00
0fe621886e Merge pull request #3896 from lammps/compute-fix-variable-outputs
Standardize how computes and fixes can produce multiple kinds of output
2023-10-16 18:12:20 -04:00
4ae0fc8312 Fix GPU compile 2023-10-16 15:47:42 -06:00
dc67f25270 Another tweak 2023-10-16 15:17:46 -06:00
8c7493d02a Fix more broken examples 2023-10-16 15:11:37 -06:00
462a3935fe Port bugfix to Kokkos 2023-10-16 14:07:42 -06:00
558c1307fd Merge pull request #3941 from stanmoore1/trim_fix
Fix issues with trim lists
2023-10-16 15:49:47 -04:00
ad1400ac71 Fix broken example 2023-10-16 12:33:21 -06:00
51f0c9eac4 Merge branch 'develop' of github.com:lammps/lammps into triclinic-neighbor-bug 2023-10-16 12:18:04 -06:00
5d0dc79403 Merge branch 'develop' of github.com:lammps/lammps into compute-fix-variable-outputs 2023-10-16 12:01:59 -06:00
53d123caa5 Merge pull request #3930 from stanmoore1/kk_flux
Small Kokkos changes
2023-10-16 14:00:04 -04:00
902e996f2a restore neighbor list trimming support to REBO family of pair styles 2023-10-16 13:51:16 -04:00
f93ff98728 Fix issues with trim lists 2023-10-16 11:20:06 -06:00
00b5eb57c9 Merge branch 'kk_flux' of https://github.com/stanmoore1/lammps into kk_flux 2023-10-13 14:52:24 -04:00
65bd04260b bugfix for modernization 2023-10-13 14:50:03 -04:00
69d82b9bc6 Remove unused variable 2023-10-13 12:47:46 -06:00
6c6f35dd69 modernize loops over fixes 2023-10-13 14:39:20 -04:00
41a7f64847 Update dependency 2023-10-13 10:58:14 -06:00
d8e6b432fa Port recent changes 2023-10-13 10:48:37 -06:00
34c94fccd2 Merge branch 'develop' of github.com:lammps/lammps into kk_flux 2023-10-13 09:36:42 -06:00
14af16e4a6 Merge pull request #3937 from akohlmey/collected-small-changes
Collected small changes and fixes
2023-10-13 11:20:33 -04:00
02d66ea4ca Merge pull request #3939 from yury-lysogorskiy/feature/ml-pace-bgrad
upd ML-PACE.cmake and Install.py (new version v.2023.10.04 and checks…
2023-10-13 11:18:44 -04:00
ae8791c682 avoid out of bounds access to string under cursor 2023-10-13 08:17:10 -04:00
2f67826363 indicate whether multi-thread is available in preferences 2023-10-13 06:59:06 -04:00
50d2ebc27d auto-detect OpenMP support also when compiling a standalone binary 2023-10-13 06:50:52 -04:00
3db7e1f9cf avoid invalid data accesses 2023-10-13 06:50:06 -04:00
926de1575c avoid completion on empty lines 2023-10-13 06:20:19 -04:00
2629136958 avoid uninitialized data access and segfaults when calling main widget functions 2023-10-13 06:20:12 -04:00
d29ae7af92 upd ML-PACE.cmake and Install.py (new version v.2023.10.04 and checksum) that should fix build issues with KOKOKOS 2023-10-13 12:05:28 +02:00
3ebcb0f6f1 store settings to different locations for different Qt versions 2023-10-13 06:00:29 -04:00
6195be5af7 make keyboard shortcut handling consistent across the entire app 2023-10-13 05:59:20 -04:00
506de7015d document support for building LAMMPS GUI with Qt6 2023-10-13 05:13:30 -04:00
c67ca1bfd9 Merge branch 'develop' into collected-small-changes 2023-10-13 04:59:18 -04:00
1150f1ab07 Merge pull request #3909 from ndtrung81/kk-updates
Adding KOKKOS support for pair yukawa/colloid, fix efield and fix spring/self
2023-10-13 04:58:33 -04:00
6ad5c0eced port LAMMPS GUI to Qt6 while still supporting Qt5 2023-10-12 23:24:11 -04:00
1a9dac83d7 update fix srd docs 2023-10-12 21:52:32 -04:00
26133bd26a Revert "restore GNU make build capability for ML-PACE"
This reverts commit 2b1985f755.
2023-10-12 16:29:01 -04:00
4910401f6c Add accelerator package text 2023-10-12 12:52:57 -06:00
8bc3965583 More robust refactor of Kokkos fix property/atom 2023-10-12 12:06:55 -06:00
9b108a631b Do not zero forces in pair if using hybrid/overlay 2023-10-11 16:36:15 -06:00
fbdd61e28c enable spacefilling sphere option also for systems with per-atom radius 2023-10-11 18:15:13 -04:00
6f38fa090a Merge remote-tracking branch 'github/develop' into collected-small-changes 2023-10-11 15:37:40 -04:00
71ebb60a33 Merge pull request #3931 from evoyiatzis/patch-6
Fixes #3925 in region_ellipsoid.cpp
2023-10-11 15:37:01 -04:00
45172d33a9 use potential file name distributed with LAMMPS in examples 2023-10-11 09:20:05 -04:00
bb7e8c66ed clarify 2023-10-11 08:26:50 -04:00
eff74405c1 don't replace end of line character from completion 2023-10-11 02:16:23 -04:00
cc5c5bbd49 block waiting for end of stdout data not more than a second 2023-10-11 02:12:03 -04:00
86a5d6bb15 must re-initialized threads also for neigbor lists 2023-10-11 02:05:23 -04:00
84eab70fb4 must select entire non-blank string under cursor for completion insertions 2023-10-10 22:18:41 -04:00
07a0333670 prevent potential memory leak 2023-10-10 13:53:56 -04:00
2b1985f755 restore GNU make build capability for ML-PACE 2023-10-10 11:36:49 -04:00
c0ace4aa4b Merge pull request #3921 from wmbrownIntel/snap-intel
Adding intel variant of snap pair style.
2023-10-10 11:02:43 -04:00
d97d14745e Merge pull request #3791 from Bibobu/NPTLangevin
Adding fix press/langevin
2023-10-10 06:28:41 -04:00
4b5c0043ba Merge pull request #3923 from akohlmey/lammps-gui-ubuntu20-backport
LAMMPS GUI improvements, fixes, refactoring, and backports for Ubuntu 20.04LTS
2023-10-10 00:24:08 -04:00
b816029d70 pop down completion list when all characters have been deleted 2023-10-09 23:32:22 -04:00
b24e1e10a0 reposition the cursor for the context menu, but only if there is no selection 2023-10-09 22:59:14 -04:00
a4eaf1e6bd Merge branch 'develop' into lammps-gui-ubuntu20-backport 2023-10-09 21:32:35 -04:00
4ff226b00f Fix issues in Kokkos fix property/atom 2023-10-09 16:12:27 -06:00
ea4ce05633 Merge pull request #3932 from yury-lysogorskiy/feature/ml-pace-bgrad
add support of computing B-grads (and C-tilde grads)
2023-10-09 13:00:28 -04:00
1db12d7df5 update LAMMPS GUI help summary text 2023-10-09 00:09:18 -04:00
4eef20e808 make consistent 2023-10-08 19:26:08 -04:00
b2c52c5032 use FSAA implementation of dump image instead of emulating it 2023-10-08 19:23:07 -04:00
e5190a0ff9 more specific preferences label 2023-10-08 19:14:04 -04:00
1390a92a5b correct indexing bug with FSAA 2023-10-08 19:12:37 -04:00
2d597f61b8 adjust default size of image area 2023-10-07 13:35:32 -04:00
d1f910af2c remove redundant close button 2023-10-07 13:33:59 -04:00
3e6997e98b restore saved text cursor when initializing system before creating an image 2023-10-07 13:33:43 -04:00
60ffcf74dc enable and apply clang-format to fix press/berendsen 2023-10-07 12:17:05 -04:00
8d305cb44f modernize access to list of fixes and fix properties also for fix press/berendsen 2023-10-07 12:15:57 -04:00
6442763b70 indicate that fix press/langevin changes box dimensions 2023-10-07 12:08:02 -04:00
5649381f01 enable and apply clang-format 2023-10-07 12:03:18 -04:00
3b02979645 improve error messages 2023-10-07 12:01:33 -04:00
578c95fb42 modernize access to list of fixes and their properties 2023-10-07 12:01:13 -04:00
090f12e029 Minor edits, mainly affecting friction keyword 2023-10-06 17:03:41 -06:00
dc3b6aa697 Minor edits, mainly affecting friction keyword 2023-10-06 16:47:38 -06:00
f688a28d7f update help index table 2023-10-06 13:01:12 -04:00
d388ef762d Implement more conventional behavior when opening non-existing file.
Instead of only printing a warning we now create a *named* and
empty buffer and change to the directory of the filename, so that
the file will be created in the desired location as soon as it is saved.
2023-10-06 06:42:40 -04:00
fcc92b50db add support for a help flag and print text mode error message for nonexisting file 2023-10-06 02:46:15 -04:00
b38e828c49 Prevent segfault with unsupported radial basis 2023-10-05 22:51:48 -06:00
3999b3e557 enforce newline before adding run 0 command to avoid syntax errors. 2023-10-05 13:22:15 -04:00
127dcd5613 fix cut-n-paste error 2023-10-05 13:16:03 -04:00
1c3f659844 Merge branch 'develop' of github.com:lammps/lammps into NPTLangevin 2023-10-05 16:01:57 +02:00
ea8d6aaa52 Version of the code with Pdamp similar to NH barostat and friction input
as Langevin caracteristic time.
2023-10-05 16:01:03 +02:00
7d1c5b4106 Updated the manual to explain the new parameter and the physics of the
barostat.
2023-10-05 15:56:51 +02:00
b0deb87188 include Qt version in About dialog 2023-10-04 15:13:22 -04:00
92a6200c55 no need to converge root finding beyond when g reaches 2*epsilon 2023-10-04 10:39:19 -04:00
c0f1fe4d31 make utility functions local and static. remove from class. 2023-10-04 10:33:27 -04:00
ac53cbb779 update LAMMPS GUI docs and some images 2023-10-04 07:45:25 -04:00
0536e0e7b3 upd Install.py (new version v.2023.10.04.pre and checksum) 2023-10-04 12:38:25 +02:00
63aa467959 add support of computing B-grads (and C-tilde grads) 2023-10-04 12:32:24 +02:00
35640dd72e use event filter to bypass default shortcuts that conflict with our custom ones 2023-10-04 06:29:39 -04:00
8af3aef734 Fixes #3925 in region_ellipsoid.cpp 2023-10-04 10:04:45 +03:00
ed631ecd44 add button to reset zoom/pan of chart viewer 2023-10-03 22:36:00 -04:00
a3c843f590 add support for shortcuts CTRL-/ (stop run) and CTRL-Q (quit) to most windows 2023-10-03 21:14:11 -04:00
6ff7050d2d enforce that the number of threads is properly reset for /omp styles 2023-10-03 19:47:34 -04:00
02b9bdd639 fix uninitialized data access 2023-10-03 17:49:55 -04:00
b3008e3329 fix delete / delete[] mismatch 2023-10-03 17:49:44 -04:00
f9f33ce1b6 Fix issues with Kokkos fix property/atom 2023-10-03 15:41:35 -06:00
6a43ca8410 reset number of threads to 1 when using no accelerator or opt 2023-10-03 16:13:59 -04:00
75050b8920 get upper thread limit from Qt so we can raise the number of threads 2023-10-03 15:40:06 -04:00
6da8fff08c Fix bug with dynamic groups 2023-10-03 13:35:50 -06:00
18a69873f8 add keyboard shortcut for saving log to file 2023-10-03 15:23:52 -04:00
5302e39f69 avoid segfaults when accessing lammps_last_thermo() 2023-10-03 14:35:48 -04:00
bb01afc498 provide default file name when writing log window text to file 2023-10-03 14:18:17 -04:00
4bbaebda16 Revert ineffectual change 2023-10-03 12:09:23 -06:00
9f612e6ef3 Merge branch 'kk_flux' of github.com:stanmoore1/lammps into kk_flux 2023-10-03 12:07:46 -06:00
f57e5d975c Fix harmless compiler warnings 2023-10-03 12:07:28 -06:00
c521d54f85 Fix compile error 2023-10-03 10:58:22 -06:00
ff23da1c97 Switch order 2023-10-03 10:28:08 -06:00
918705ce2f refactor CSV format output 2023-10-03 12:10:44 -04:00
367d0ac905 Add support for FLUX 2023-10-03 10:07:52 -06:00
e840d422ef Use a_f to be consistent 2023-10-03 10:07:41 -06:00
b5dae4024a tweak output format for gnuplot data export 2023-10-03 12:02:56 -04:00
37c1bfafa3 remove unused class member 2023-10-02 18:30:47 -04:00
5db01aa989 BUGFIX: correctly render the currently selected chart when exporting to image files 2023-10-02 18:19:27 -04:00
77d0475fb7 update TODO file 2023-10-01 11:46:16 -04:00
e7b9bc2d4f update docs 2023-09-29 18:53:18 -04:00
1689c306b6 add "Save to File" option to the context dialog for the log window 2023-09-29 18:00:31 -04:00
5a750c8633 automatically define variable "gui_run" to contain the run number 2023-09-29 17:42:30 -04:00
ef575d5944 change default for replacing log/chart/image windows to true 2023-09-29 16:47:52 -04:00
c24ddfed29 add a run counter to log, chart, and slideshow window titles
this counter is reset on loading a new file
2023-09-29 16:45:13 -04:00
b03e8e376a make references consistent 2023-09-28 14:31:32 -04:00
6613af05dc fix spelling issue 2023-09-28 14:31:19 -04:00
54517726cd Merge remote-tracking branch 'github/develop' into lammps-gui-ubuntu20-backport 2023-09-28 14:19:15 -04:00
49f08e6231 Merge pull request #3924 from akohlmey/collected-small-changes
Collected small changes and fixes
2023-09-28 14:18:40 -04:00
18f48a5e7c Recognize Windows 11 23H2 2023-09-27 18:00:19 -04:00
5a455c5e3a remove redundant calls to fmt::format() from calls to error->one/all() and utils::logmesg() 2023-09-26 23:56:51 -04:00
6115edefcb remove redundant use of fmt::format() 2023-09-26 23:34:56 -04:00
6141d8d08c gracefully handle some older ReaxFF force field files without overcorrection parameter 2023-09-26 23:29:59 -04:00
7c3a95240e print more specific error messages when parsing ReaxFF force field files 2023-09-26 23:29:22 -04:00
25e9c2a35b file completion only in current folder. hide popup when changing completer 2023-09-25 09:23:49 -04:00
053f6fa03d must also update CWD when *saving* a file, not only when loading 2023-09-25 08:54:56 -04:00
a128089ab1 apply clang-format 2023-09-25 08:35:32 -04:00
2c636c83f5 check for compatible LAMMPS version when creating LAMMPS instance
This check must be done at runtime, since the LAMMPS shared library
may have been loaded dynamically and thus required library functions
may not be present or missing features with too only a LAMMPS version.
2023-09-25 08:35:23 -04:00
082d2bec9f merge used parts of periodic_table.h into imageviewer.cpp 2023-09-25 07:46:55 -04:00
29989f102a remove unused class members and silence compiler warnings 2023-09-24 23:08:59 -04:00
b2f62bbd1a include FFMpeg and gzip into windows zip archive for LAMMPS GUI 2023-09-24 17:52:43 -04:00
11608abf34 update docs 2023-09-24 16:45:59 -04:00
5201e6b2f1 add support for completion on file names 2023-09-24 16:31:28 -04:00
934269e456 move all icon files to the icons folder 2023-09-24 15:55:14 -04:00
5588c121f4 add support to export slide show animation to movie file via ffmpeg 2023-09-24 15:09:14 -04:00
c50dcf6129 move helper functions to separate file. add overloads to mystrdup() 2023-09-24 12:53:14 -04:00
35bf3e05ca Merge branch 'develop' into fix-rigid-enforce2d 2023-09-22 12:01:57 -04:00
afa8501d20 recognize STL files starting with "solid binary" as binary files 2023-09-22 07:51:58 -04:00
12acd346b7 plug memory leak 2023-09-22 07:51:16 -04:00
fb55fc3277 we don't need a lattice for creating atoms from a STL mesh 2023-09-22 07:51:07 -04:00
6f79918bab copy FFMpeg binary into app bundle 2023-09-21 19:43:53 -04:00
8b40e16ebd Revert "link gui to jpeg and png libs"
This reverts commit 57b3b74bcd.
2023-09-21 19:16:54 -04:00
70d6518eac minor updates for using presets. mention macos multi-arch preset 2023-09-21 19:10:36 -04:00
a9f15f6a29 update preset 2023-09-21 19:09:57 -04:00
57b3b74bcd link gui to jpeg and png libs 2023-09-21 19:09:26 -04:00
a463995646 add dependencies for building dmg bundle 2023-09-21 19:09:04 -04:00
c3cc4974d1 silence uninitialized access valgrind warning 2023-09-21 07:33:03 -04:00
75682ffbca Merge pull request #3922 from arghdos/fix_for_rocm_60
Apply fix for hipfft paths in ROCm >= 6.0
2023-09-19 10:43:19 -04:00
d371550f5f step lammps-gui version patch number 2023-09-18 19:19:37 -04:00
934055601b change insertion function to always replace partial word with completion
Also change popup mode to always display all possible completions
and only highlight the current selection. This seems more beginner friendly.
2023-09-18 18:03:27 -04:00
e52eb81839 make use of std::swap() 2023-09-18 16:51:19 -04:00
7467a058ee Apply fix for hipfft paths in ROCm >= 6.0 2023-09-18 11:21:02 -05:00
70a8aff561 update todo list 2023-09-17 20:45:02 -04:00
7f4de6b8b9 more use of QRegExp instead of QRegularExpression for QT version < 5.15 2023-09-17 19:52:00 -04:00
20be9e64cf use split_line convenience function for better consistency and backward compatibility 2023-09-17 19:44:15 -04:00
cf8b157702 use QtRegExp for QT 5.12 on Ubuntu 20.04LTS 2023-09-17 19:38:53 -04:00
3e9f1c8af2 Merge pull request #3919 from akohlmey/collected-small-fixes
Collected small fixes and updates
2023-09-16 07:19:25 -04:00
508dbb74c5 print warning when using threads that snap/intel will not use them 2023-09-15 08:37:32 -04:00
d1e405e83f ML-SNAP now also has INTEL as dependent package 2023-09-14 19:08:38 -04:00
7b4ca086a8 documentation updates, clarifications, and corrections 2023-09-14 19:08:15 -04:00
5e657e5adb Intel Package: Adding documentation changes for snap variant. 2023-09-14 18:01:55 -04:00
1c10d0d495 Intel Package: Adding snap variant. 2023-09-14 17:11:51 -04:00
6d12800a0d make the GUI update interval a configurable option in the preferences 2023-09-14 10:39:57 -04:00
232e57a949 fix cut-n-paste issue 2023-09-14 00:27:35 -04:00
88b9aa62b7 forgot to rename files in KOKKOS/Install.sh 2023-09-13 17:27:30 -04:00
ae7945bd99 add missing newline 2023-09-13 15:56:49 -04:00
d198a9314f reorder to have sections in alphabetical order again 2023-09-13 15:55:23 -04:00
822ad5b866 change refereces to lib/smd and smd to lib/machdyn and machdyn 2023-09-13 15:51:41 -04:00
5d0bbeb257 Merge branch 'develop' into collected-small-fixes 2023-09-13 08:57:32 -04:00
c82e7b16bd Merge pull request #3915 from Architect0rr/develop
Initialize ADIOS dumps only the first time when used in multiple runs (for custom/adios dump style)
2023-09-13 08:54:40 -04:00
e230220c13 remove dead code 2023-09-12 02:44:58 -04:00
d0f0bdd695 remove deprecated register storage class 2023-09-11 17:37:32 -04:00
2839ce334e disable neighbor list trimming by default for REBO pair styles for now 2023-09-10 10:25:03 -04:00
3c1586878a reorder include files 2023-09-08 15:36:30 -04:00
2319f98987 update docs with settings for building tools with CMake 2023-09-08 11:42:35 -04:00
5235d7e434 there is no "thermo_extract" tool (anymore) 2023-09-08 11:42:35 -04:00
da1db776b6 update some tables and comments for the current state of LAMMPS 2023-09-08 11:42:35 -04:00
8bde9ffd53 silence compiler warning 2023-09-08 11:42:34 -04:00
400bb426b8 Merge pull request #3912 from akohlmey/tab-reformat-completion
Add reformatting of line and command completion to LAMMPS GUI
2023-09-08 11:40:47 -04:00
f8e65b19a2 add completion for compute and fix ID references 2023-09-08 10:43:31 -04:00
778263673c add completion for variables and variable references 2023-09-08 08:57:17 -04:00
f293c5dd87 don't add the same group name twice 2023-09-08 08:38:54 -04:00
f726a54f27 detect and highlight strings in more places 2023-09-08 08:37:48 -04:00
ecc68c2f0c fix typo 2023-09-08 00:26:22 -04:00
1d851a6cff fix some spelling issue. Start auto-complete after 2 characters 2023-09-07 23:53:21 -04:00
2d76f9e4ac add completion for group id 2023-09-07 18:02:02 -04:00
fea91c0583 edits to LAMMPS GUI howto page 2023-09-07 12:16:07 -06:00
a1ddf68e5c also delete log and chart window when loading a new file 2023-09-07 10:06:11 -04:00
71a6f5b827 some small clarifications 2023-09-06 23:51:35 -04:00
34179d2cf9 Merge branch 'develop' into tab-reformat-completion 2023-09-06 23:40:10 -04:00
595f2db72f Merge pull request #3914 from lammps/dependabot/github_actions/actions/checkout-4
Bump actions/checkout from 3 to 4
2023-09-06 12:01:49 -04:00
17aa458c26 delete image viewer window when loading new file 2023-09-06 00:28:05 -04:00
2c0ff19528 allow calling lammps_last_error_message() with a NULL buffer to clear the error 2023-09-06 00:27:46 -04:00
0b5ce04638 initialize system with commands up to first run/minimize to have initial snapshot 2023-09-05 22:18:25 -04:00
aaad6cffba must close LAMMPS instance after loading new file. 2023-09-05 18:03:05 -04:00
788ce89751 fix typo in query 2023-09-05 18:02:42 -04:00
1fe5c59674 Initialize ADIOS dumps only the first time when
used in multiple runs (for custom/adios dump style)
2023-09-05 12:44:56 +03:00
e1088ed6f9 add "none" to completions of force styles 2023-09-05 04:59:50 -04:00
9036717f1e add completions for unit styles 2023-09-04 20:56:55 -04:00
68d88de785 Bump actions/checkout from 3 to 4
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-04 19:30:21 +00:00
cf23022921 highlighting tweaks for numbers and special terms 2023-09-02 23:49:57 -04:00
7f5124e11a tweak highlighting for "setup" commands 2023-09-02 23:39:29 -04:00
c7973ccc9b initialize all pointers in initializer list to null 2023-09-02 19:36:49 -04:00
6f3b74b53e plug memory leak 2023-09-02 18:49:35 -04:00
2bda147ff5 since dump image calls functions in thermo, thermo must be delete *after* the dumps 2023-09-02 18:48:06 -04:00
2b90e1143a add missing %1 for arg() method 2023-09-02 18:36:05 -04:00
2d17894430 Update LAMMPS GUI documentation for Version 1.5 2023-09-02 11:50:20 -04:00
cf9ce0ebed support displaying completions from editor context menu 2023-09-02 10:48:36 -04:00
98b803eba9 implement workaround for broken word under cursor selection in QTextCursor class 2023-09-02 09:44:13 -04:00
4d409906fe implement more completions, skip suffixed styles, support variable styles 2023-09-01 23:02:51 -04:00
cb446f5e7f simplify auto-completion 2023-09-01 20:04:47 -04:00
8383da5e74 create individual completer classes for different styles, use macros 2023-09-01 19:57:42 -04:00
c1bf3f7d4e must step up ABI version for plugin loader 2023-09-01 11:55:19 -04:00
0a5e97e768 add LAMMPS version check, to be uncommented after PR #3896 is merged 2023-09-01 11:00:35 -04:00
b2ba1bbe70 implement automatic completion popup and reformat on return 2023-09-01 07:27:52 -04:00
65866156dd make handling of boolean settings consistent 2023-09-01 07:27:10 -04:00
1514d98c35 swap matching isSetup and isRun to avoid funny coloring of run_style and similar 2023-09-01 07:25:50 -04:00
0043e4ccc8 macOS drops us into "/" when opening the app bundle without a file. use $HOME instead. 2023-09-01 03:29:45 -04:00
2e0bc524cc update TODO list 2023-09-01 02:53:48 -04:00
b478888ede move processing of completion to separate function 2023-09-01 02:52:26 -04:00
9690d2dc02 update formatting with clang-format 2023-09-01 02:45:20 -04:00
b6d10d1e20 implement command completion popup 2023-09-01 02:43:32 -04:00
156ab0b338 add reformat to context menu, formatting width may be changed in preferences 2023-08-31 23:25:30 -04:00
7a9aa7950c add special case formatting for *_coeff commands 2023-08-31 21:58:39 -04:00
8ac45a8a02 reformat line when Tab key is pressed 2023-08-31 21:39:43 -04:00
7b5dfa2a3b Merge pull request #3910 from akohlmey/add-slideshow
Add slideshow feature to LAMMPS GUI
2023-08-31 21:35:45 -04:00
9796317269 Merge pull request #3911 from taylor-a-barnes/mdi_fix
Fix bug in MDI energy
2023-08-31 18:09:21 -04:00
ca8722d14c Fix bug in MDI energy 2023-08-31 16:27:23 -04:00
5d23d5d317 remove duplicates, move misplaced, and add missing keywords for syntax highlighting 2023-08-31 15:59:46 -04:00
c96d793fb6 update unit tests for change in read_restart 2023-08-31 04:45:23 -04:00
43d1d8c86b make atom_modify map settings in restart file overridable 2023-08-30 23:51:25 -04:00
f77fec1e61 handle immediate variables and atom_modify keyword 2023-08-30 22:10:53 -04:00
0e9a402c5a update TODO list 2023-08-30 16:19:28 -04:00
4b910d7812 complete rewrite of syntax highlighting with more consistency 2023-08-30 16:01:14 -04:00
2c92de2690 update preference dialog images 2023-08-30 09:07:23 -04:00
d474a511b6 update 2023-08-30 07:38:00 -04:00
b75b0ff3d5 sync naming of resulting archives with macOS 2023-08-30 07:37:53 -04:00
bfca91bbf0 layout tweak for macOS 2023-08-30 07:18:50 -04:00
34b26ffb74 final tweaks for macOS packaging 2023-08-30 07:04:15 -04:00
207cb5bb51 update LAMMPS GUI bundling for macOS 2023-08-30 06:42:56 -04:00
4f52a5e791 need to implement the same workaround for macOS as for ImageViewer class 2023-08-30 06:04:58 -04:00
8aee65b25c update TODO list 2023-08-30 05:40:13 -04:00
3fd8e1dd7d change table of hotkeys to use 6 columns instead of 8 for better reability 2023-08-30 04:53:55 -04:00
c2eafb874d update docs for LAMMPS GUI v1.4 2023-08-30 04:38:11 -04:00
9fe266d4cd make consistent 2023-08-30 04:30:33 -04:00
c432df0f91 set window icon consistently where possible 2023-08-30 04:15:13 -04:00
4ca5d7eec5 fix logic error 2023-08-30 03:58:56 -04:00
2aa8e10ae2 do not allow to zoom in beyond 80% of screen height or width 2023-08-30 03:54:13 -04:00
07efb5b015 don't add button to toggle slideshow window 2023-08-30 02:46:56 -04:00
9b065c0ac4 remove redundant "View" menu 2023-08-30 02:46:39 -04:00
9aa68442b6 complete implementation of slideshow window 2023-08-30 01:07:27 -04:00
ceadb04cf3 store the actual file name *after* it is written 2023-08-29 23:31:24 -04:00
a176ef4768 make consistent with write_dump 2023-08-29 20:07:35 -04:00
26ef4065da add image_fname string for caching the last active dump image filename pattern 2023-08-29 19:22:56 -04:00
d0c1cfd292 simplify 2023-08-29 19:21:41 -04:00
8531e8138c Use "Create Image" instead of "View Image" for launching the image viewer 2023-08-29 19:07:07 -04:00
514fec1b11 add non-functional slide show window to GUI
# Conflicts:
#	tools/lammps-gui/CMakeLists.txt
#	tools/lammps-gui/lammpsgui.cpp
#	tools/lammps-gui/lammpsgui.qrc
#	tools/lammps-gui/lammpsgui.ui
2023-08-29 18:45:04 -04:00
e83e9ab78b Merge pull request #3904 from akohlmey/highlight-line
Add highlighting of current line in lammps-gui and tracking of line numbers in LAMMPS
2023-08-29 17:43:15 -04:00
432380c468 update 2023-08-29 16:54:51 -04:00
c8a611098e add pointer to installation/download of LAMMPS GUI 2023-08-29 16:54:45 -04:00
21c0ec7e2c Merge remote-tracking branch 'github/develop' into highlight-line 2023-08-29 16:28:15 -04:00
6bdf86056c Merge pull request #3903 from akohlmey/collected_small_changes
Collected small changes and fixes
2023-08-29 16:26:41 -04:00
67bcf75b74 Updated the corresponding doc pages with ".. index::" and added (k) to the commands in the overview pages 2023-08-28 23:18:05 -05:00
0cf0d11b03 whitespace 2023-08-28 21:30:55 -04:00
c71c4d0fcd must have a verbatim block to include .. versionadded:: 2023-08-28 21:19:04 -04:00
2c363043e3 update LAMMPS GUI Howto for version 1.3 2023-08-28 21:18:39 -04:00
976080ecf0 tweak layout of chart window by adding a spacer and a label 2023-08-28 20:50:06 -04:00
6c8e782289 Merge branch 'develop' into highlight-line 2023-08-28 17:46:06 -04:00
bed5d65e1b Merge branch 'develop' into collected_small_changes 2023-08-28 17:45:13 -04:00
afabb279a3 Merge pull request #3908 from lammps/doc-page-tweak
Add info for on-line manual versions to Manaul home page
2023-08-28 15:33:37 -04:00
e2daed05ad fix typo 2023-08-28 13:12:01 -04:00
b5756e25d2 Merge pull request #3906 from akohlmey/fmtlib-10.1.1
Update fmtlib to version 10.1.1
2023-08-28 12:29:48 -04:00
b55be3eb7e list manual versions on Manual home page 2023-08-28 10:22:52 -06:00
b08abd4a80 Updated Install.sh and cleaned up 2023-08-28 11:06:07 -05:00
4ef9f70bfe Fixed whitespaces, added author info 2023-08-28 09:43:00 -05:00
09e94cc1ff update fmtlib to version 10.1.1 2023-08-28 09:53:00 -04:00
64750c8a21 allow sphinx 7.2 again after incompatibility with breathe has been fixed 2023-08-28 05:20:47 -04:00
58d60dfea0 Fixed bugs with device sync for xoriginal 2023-08-26 16:08:59 -05:00
92f173f7c3 update TODO list and step patch version for next set of features 2023-08-26 12:40:59 -04:00
821cbf1a22 add window to monitor current variables 2023-08-25 23:56:27 -04:00
d864b4789f refactor variable info in Info class, make info accessible from library interface 2023-08-25 23:55:42 -04:00
5b5210130c improve highlighting settings to also show errors with different color 2023-08-25 21:19:05 -04:00
401133acec count lines during scanning for triple quotes 2023-08-25 21:17:41 -04:00
568199e50d must initialize force style pointers to null 2023-08-25 21:17:11 -04:00
0461fe8a13 delete carriage returns instead of turning them into blanks, add final newline 2023-08-25 18:55:14 -04:00
9c91ec9050 remove dead code 2023-08-25 17:51:22 -04:00
74d76f988d update docs 2023-08-25 17:48:28 -04:00
6cc021bcaf when updating the highlight also update cursor position 2023-08-25 17:35:38 -04:00
6759a20cfc remove dead code 2023-08-25 17:35:05 -04:00
8f41ac1272 support loops in lammps_commands_string() 2023-08-25 17:34:32 -04:00
c5da0581e6 add support for input file line numbers 2023-08-25 16:11:46 -04:00
c61aaa81d2 add support to run LAMMPS on the file instead of the edit buffer 2023-08-25 15:12:48 -04:00
f94d00d435 step version number 2023-08-25 15:11:59 -04:00
149a820510 sync prototype with library.h 2023-08-25 15:11:46 -04:00
079d6c2341 LAMMPS class destructor may throw execption via utils::logmesg() 2023-08-25 11:55:58 -04:00
7b6c78bc06 explicitly flag ForceConst class destructor as noexcept(false) since call to set_ntypes() may throw exception 2023-08-25 10:47:37 -04:00
fee9a77fb4 must use array delete and not scalar delete on char array 2023-08-25 10:05:11 -04:00
76c0632363 remove dead code, class members that should be local, initialize others 2023-08-25 09:15:31 -04:00
6fcad323ab must initialize typefirst now after recent changes from @dsbolin 2023-08-25 06:15:33 -04:00
541a5be1dd update more frequently 2023-08-25 06:08:18 -04:00
8a7c1f3d0d add support for add a highlight for the currently active input line to the line number display 2023-08-24 21:25:57 -04:00
3a7efdfb8c implement setFont() method that sets the font for the entire editor window 2023-08-24 21:25:14 -04:00
c7a0e5f0e1 use line splitting method that keeps empty lines and set line numbers 2023-08-24 21:23:35 -04:00
48de679a58 add support for accessing line number from cached thermo data 2023-08-24 21:22:51 -04:00
23bc3abe18 add option to cache the current line number of the input file or buffer 2023-08-24 21:20:49 -04:00
187bebb515 Working on fix spring/self/kk, something with missing host-device sync that causes force blowup 2023-08-24 12:17:37 -05:00
dc3c8da52b Merge pull request #3900 from dsbolin/fix_srd_bugfixes
Bug fixes for fix srd
2023-08-24 11:52:46 -04:00
afc4e1d476 Merge pull request #3893 from akohlmey/lammps-gui-fixes
Some more lammps-gui fixes and updates
2023-08-24 11:04:52 -04:00
6ccccb5d13 add versionadded tag to new inputs keyword docs 2023-08-24 09:27:17 -04:00
f7656101a2 Merge pull request #3892 from akohlmey/collected-small-changes
Collected small changes and fixes
2023-08-23 21:19:37 -04:00
b4e7d5f0b9 fix whitespace (again) 2023-08-23 20:11:32 -04:00
949f93b588 clarify the documentation for the extract_atom numpy wrapper 2023-08-23 20:02:23 -04:00
df1e2a64d2 the MESONT package depends on the MOLECULE package since the last upgrade 2023-08-23 19:03:34 -04:00
70dab54e79 A few bug fixes for fix srd 2023-08-23 13:03:51 -06:00
c417288df9 add missing :doc: 2023-08-23 14:14:26 -04:00
00345ce8c3 rename compute local/comp/atom to composition/atom 2023-08-23 14:06:44 -04:00
95c792c559 Merge branch 'compute-fix-variable-outputs' of github.com:lammps/lammps into compute-fix-variable-outputs 2023-08-23 09:47:44 -06:00
e6b98f5942 fix logic issue in compute reduce 2023-08-23 09:47:36 -06:00
476446d93c add reference log outputs for ML-HDNNP and add input demoing use with hybrid 2023-08-23 08:58:20 -04:00
174825fe8c fix element mapping bug in pair style hdnnp when used as a hybrid sub-style 2023-08-23 07:21:16 -04:00
2e79beb368 signal that destructors may throw exceptions 2023-08-23 03:37:54 -04:00
aec1f46291 initialize all class members 2023-08-23 03:28:06 -04:00
9999f775cc address CodeQL issue 2023-08-23 03:03:19 -04:00
351a9dd11f Merge remote-tracking branch 'github/develop' into collected-small-changes 2023-08-23 03:02:29 -04:00
154c98cd7d Merge remote-tracking branch 'github/develop' into compute-fix-variable-outputs 2023-08-22 21:37:19 -04:00
c072719a44 Merge pull request #3898 from stanmoore1/reax_kk_bug
Fix bug in Kokkos ReaxFF on GPUs when border comm is on host
2023-08-22 18:57:43 -04:00
3e22eb8355 adjust version date 2023-08-22 16:40:25 -06:00
17dd04b4de tweak variable doc page 2023-08-22 16:22:57 -06:00
71ca6ee47c fix one more example input script 2023-08-22 16:02:28 -06:00
ad33a018f4 update variable syntax in several example input scripts 2023-08-22 15:52:47 -06:00
17b78d86a6 Merge pull request #3885 from bathmatt/pt_without_device
Made check incase PyTorch didn't define the device
2023-08-22 17:38:54 -04:00
dd6b847a5c mention that "peratom" is no longer required and was removed 2023-08-22 16:29:14 -04:00
ffe291b793 Fixed bugs with the memory allocation for xoriginal 2023-08-22 15:28:28 -05:00
dc5619667f Fix bug in Kokkos ReaxFF on GPUs when border comm is on host 2023-08-22 11:26:12 -06:00
7d9c068da0 whitespace 2023-08-22 11:50:54 -04:00
aad232ffc6 fix typo 2023-08-22 11:46:57 -04:00
eaedc60396 more fixes for file and pathnames with blanks 2023-08-21 15:55:47 -04:00
532e365331 enable/disable VDW mode pushbutton depending on whether valid element info is present 2023-08-21 13:24:12 -04:00
331adc09c0 Merge branch 'develop' into compute-fix-variable-outputs 2023-08-21 10:56:54 -06:00
ab2b83f654 clarify doc for fix ave/histo command 2023-08-21 10:54:42 -06:00
1d749594cb avoid write_dump image failing when not all elements can be recognized 2023-08-21 12:26:08 -04:00
c6233547a5 update compute and fix doc pages for new generality 2023-08-21 09:39:00 -06:00
20748b877e Merge pull request #3894 from akohlmey/remove-mpiio
Remove MPIIO package
2023-08-21 11:02:28 -04:00
3192b11cb8 fix write_dump command string so it can handle paths with blanks 2023-08-21 09:06:19 -04:00
603d7d28fd make constants and functions static so there are no namespace conflicts with multiple files including it 2023-08-21 05:23:42 -04:00
d230ae49c4 update documentation for removal of MPIIO package 2023-08-20 22:17:03 -04:00
4de7694bbe add removed MPIIO dump styles to deprecated dump styles 2023-08-20 22:03:34 -04:00
a81412f015 remove MPIIO sources and references to them. update Purge.list and build systems 2023-08-20 21:51:33 -04:00
46f28e1fb8 workaround for imageviewer GUI glitch on macOS 2023-08-20 19:11:11 -04:00
e50d950a86 fix copy-n-paste bug 2023-08-20 00:24:11 -04:00
a94c45eb0c speed up SSAO with OpenMP multi-threading, if available 2023-08-20 00:11:33 -04:00
93f011ad7c make vdwfactor consistent and speed up rendering for VDW mode by skipping bonds 2023-08-20 00:10:42 -04:00
b592542a5b use more consistent way to update checkboxes and labels by assigning names 2023-08-20 00:01:42 -04:00
80144c9970 speed up SSAO with OpenMP multi-threading, if available 2023-08-19 20:06:31 -04:00
a86c0ed671 suppress pointless warning by MSVC++ compilers 2023-08-19 17:48:03 -04:00
c1b5fe4e84 reimplement lammps_commands_string() library function with C++ and support for heredocs 2023-08-19 17:48:03 -04:00
89fc0ad68a correctly extract local file name from dropped URI 2023-08-19 17:46:41 -04:00
fb0712b66f consistently use bool for echo and cite flags 2023-08-19 13:38:53 -04:00
a4390529ab automatically copy "About LAMMPS" dialog text to clipboard 2023-08-19 09:28:11 -04:00
b904534ac2 Merge pull request #3889 from akohlmey/image-anti-alias
Implement anti-aliasing for dump image (and dump movie)
2023-08-18 15:52:01 -04:00
6e1529ddff finish changes to variables 2023-08-18 13:18:50 -06:00
283c928aac add note and images to showcase the effect of fsaa and ssao 2023-08-18 14:08:43 -04:00
7febd8c918 Merge branch 'develop' into image-anti-alias 2023-08-18 13:32:23 -04:00
d35cd8625e Merge pull request #3890 from akohlmey/lammps-gui-improvements
More lammps gui improvements
2023-08-18 11:37:19 -04:00
91d826a5d6 changed compute section of variable formulas 2023-08-18 09:34:46 -06:00
95e9e6549f simply variable.cpp 2023-08-18 09:28:58 -06:00
2af8842877 whitespace 2023-08-18 06:40:51 -04:00
0624aa56b9 remove unused file 2023-08-18 01:50:13 -04:00
422b989c1c may only set bond diameter, if there are actual bonds in the system allowed 2023-08-17 22:33:12 -04:00
5528cefe0f move fsaa keyword next to ssao and away from dump_modify
we don't need to reallocate the buffers this way
2023-08-17 19:57:46 -04:00
f2901827e6 updates to variable doc page to clarify compute/fix options 2023-08-17 17:25:27 -06:00
299eda8ca3 have compute_reduce require either peratom or local inputs 2023-08-17 16:12:14 -06:00
988b121a96 silence compiler warnings 2023-08-17 16:55:57 -04:00
f4fe28d8d0 change PNG compression from best compression to best speed 2023-08-17 16:42:22 -04:00
0d739439c7 changes to compute voronoi/atom 2023-08-17 12:47:48 -06:00
aedda9513e document cost of FSAA 2023-08-17 13:11:41 -04:00
a0414f2fc9 update TODO list 2023-08-17 05:38:51 -04:00
6e2a65c4c5 update docs for LAMMPS GUI 2023-08-17 05:26:48 -04:00
4ec5b5776c fix permissions 2023-08-17 02:25:13 -04:00
b7126f523c use counter so that widgets are properly assigned to their grid slots 2023-08-17 02:23:00 -04:00
18aa897430 fix whitespace and include missing icon 2023-08-17 01:38:34 -04:00
b2a8bc07a0 add option to toggle between VDW style representation and licorice style 2023-08-17 01:20:07 -04:00
23f9615ef2 color by element when units setting allows it 2023-08-17 00:41:30 -04:00
37b0ba1d51 import periodic table functions from VMD/molfile plugin 2023-08-17 00:40:00 -04:00
3ac856cc92 add extract_global() and extract_atom() 2023-08-17 00:39:10 -04:00
43347b87ce also recognize integer ranges with : or * as integer 2023-08-17 00:38:46 -04:00
f91dc3e68a implement anti-aliasing for dump image (and dump movie) 2023-08-16 20:24:57 -04:00
4628199041 update todo 2023-08-16 19:10:14 -04:00
3eb8fd219a update of a Howto_output doc page 2023-08-16 16:19:11 -06:00
2c8a3d87a0 must stop running LAMMPS simulation before we can close the lammps object 2023-08-16 13:06:09 -04:00
ebbce58da6 fix typo 2023-08-16 12:07:43 -04:00
561f682afd support setting image dimensions, have render activity indicator 2023-08-16 08:48:31 -04:00
44f725f61f add tooltips, add run/stop/image buttons to status bar, replace run/stop icons 2023-08-16 07:11:07 -04:00
7c9eda658f fix typo 2023-08-16 03:38:05 -04:00
06e2d5d306 Merge pull request #3883 from akohlmey/lammps-gui-improvements
LAMMPS GUI improvements
2023-08-16 02:17:57 -04:00
cd4642dfb4 Merge pull request #3887 from lammps/compute-prop-grid-proc
Add proc option to compute property/grid
2023-08-15 23:49:33 -04:00
b57f6d9b30 dynamic loaded library crashes currently on macOS 2023-08-15 23:44:14 -04:00
a7f84ef645 Merge pull request #3888 from lammps/example-asphere-tri
Changes to make example script in ASPHERE/tri run smoothly
2023-08-15 23:25:04 -04:00
2cdb9c5c69 must make copies on Linux 2023-08-15 23:22:17 -04:00
653f0c4d8a correct re-launch implementation for windows 2023-08-15 23:13:31 -04:00
65cd6a3f2a we cannot cleanly restart with a new plugin through loading. must relaunch. 2023-08-15 22:46:50 -04:00
51cb6da4ca must dynamically load liblammps.so before any library function calls 2023-08-15 21:33:35 -04:00
d8541e1318 Merge branch 'develop' into lammps-gui-improvements 2023-08-15 21:23:58 -04:00
cbf463898d add versionadded tag 2023-08-15 20:58:57 -04:00
9b45b80844 Merge branch 'develop' into example-asphere-tri 2023-08-15 20:56:09 -04:00
db9bb9e390 Merge branch 'develop' into compute-prop-grid-proc 2023-08-15 20:54:33 -04:00
1e2db10252 whitespace 2023-08-15 20:54:28 -04:00
e3167fb83d Merge pull request #3881 from akohlmey/collected-small-changes
Collected small changes and fixes
2023-08-15 20:40:30 -04:00
b3f045f5ae changes to make example script in ASPHERE/tri run 2023-08-15 17:09:17 -06:00
185fa1bcdb small documentation and spelling updates 2023-08-15 12:01:07 -04:00
e886d01190 add View in OVITO and View in VMD entries to Run menu 2023-08-15 08:04:01 -04:00
cd9a5f8d8c make darkgray *really* dark gray, i.e. darker than gray 2023-08-15 06:09:34 -04:00
a5b2461e36 update docs 2023-08-15 06:08:57 -04:00
afd5f6a818 some more image settings tweaks 2023-08-15 06:08:39 -04:00
62547ccde5 update quick help and TODO list 2023-08-15 05:35:34 -04:00
263db3d13c avoid lengthy accelerator details with Nvidia GPUs 2023-08-15 02:26:54 -04:00
0c7f56e881 imageviewer updates
- new zoom icons
- resetview option
- properly track pushbutton checked state
- add preferences options for selecting background and box color
2023-08-15 02:21:05 -04:00
dedddee70a no point in removing a null pointer item 2023-08-15 01:06:15 -04:00
3bf70c1b97 various chart window updates and improvements
- charts are reset if the thermo style changes
- charts are reset if the timestep is reset (to a lower value)
- charts are not updated if thermo data is not valid (e.g. during setup)
- use integer format for Steps on the x-axis
2023-08-15 01:05:54 -04:00
8bfa0b2b04 add option to query Update::setupflag to see if thermo data is valid 2023-08-15 01:03:25 -04:00
4e604c2ccd remove OpenMPI hack. We have disabled MPIIO testing altogether. 2023-08-14 22:05:32 -04:00
f0962f36f6 make consistent and avoid segfaults 2023-08-14 21:53:45 -04:00
e51845776d make box, axes, ssao, antialias checkable buttons in image viewer
this reduces the antialias option to just 2x
2023-08-14 21:37:46 -04:00
2728f6763e updated output and cross-check 2023-08-14 18:47:27 -04:00
c11c51ba3c complete lammps gui howto 2023-08-14 16:56:22 -04:00
b53c564190 update clang-format detection for compatibility with Debian 2023-08-14 15:13:43 -04:00
9fc54865cf improve desktop integration for Linux 2023-08-14 14:31:30 -04:00
dad8081d55 Merge pull request #3884 from akohlmey/fmtlib-10.1
Update fmtlib to version 10.1
2023-08-14 11:35:29 -04:00
e297800102 get rid of tr() macros 2023-08-14 10:11:58 -04:00
a10b1de511 complete bundling and assigning icons to actions 2023-08-14 04:01:33 -04:00
cdbbe33933 Made check incase PyTorch didn't define the device 2023-08-14 09:36:56 +02:00
ea965d3b26 Working on exchange comm on device, and grow arrays for xoriginal 2023-08-13 23:40:53 -05:00
619623f0f6 more icons 2023-08-13 21:38:18 -04:00
f53991c107 include more icons link to Howto doc 2023-08-13 17:46:00 -04:00
a07f02c135 more howto documentation updates 2023-08-13 17:13:19 -04:00
d650bc61c5 include images of the preferences dialog tabs and discuss preferences 2023-08-13 15:36:05 -04:00
7e3c04aa51 add a small LAMMPS icon to the status bar indicating whether an active LAMMPS instance exists 2023-08-13 02:57:47 -04:00
9f407cae1e more documentation and tutorial updates 2023-08-13 02:57:02 -04:00
c1f9f9d1c6 we have accumulated enough changes to call this version 1.2 2023-08-13 00:15:09 -04:00
8076f77e1e add missing connect() macro 2023-08-13 00:14:46 -04:00
d4b6302b31 more doc improvements 2023-08-12 23:33:06 -04:00
1991d74623 desktop integration for Linux, embedded icons on Windows 2023-08-12 23:30:37 -04:00
929ca8f0f1 small clarification 2023-08-12 21:07:35 -04:00
c11d58f7b1 Start working on a LAMMPS GUI howto
Docs are now organized as follows:
- README is minimal and points to other docs
- The section in Tools.rst mostly explains compilation and installation
- The Howto contains a tour of the GUI and explains intended functionality
2023-08-12 21:07:12 -04:00
e7b02e89fa also linke the principal command when linking styles 2023-08-12 20:13:40 -04:00
bbcfbe957b implement context specific help either via right-click or CTRL-? 2023-08-12 17:46:10 -04:00
3957b4b194 avoid legacy compilation failures on recent ubuntu machines that only have python3-config 2023-08-12 12:45:13 -04:00
5115df7a38 avoid legacy compilation failures on recent ubuntu machines that only have python3-config 2023-08-12 12:45:01 -04:00
dd18de164a avoid legacy compilation failures on recent ubuntu machines that only have python3-config 2023-08-12 12:41:44 -04:00
45290b5296 update fmtlib to version 10.1 2023-08-12 11:52:22 -04:00
f104d75626 add missing icon 2023-08-12 10:17:10 -04:00
62b4318801 complete implementation of variable setting dialog 2023-08-12 10:08:02 -04:00
ca9924035b Working on pack/unpack exchange for xoriginal 2023-08-12 01:19:43 -05:00
9110c23fcb add set variables dialog 2023-08-12 00:09:30 -04:00
45b9801941 add parser that collects info about possible variables to be set from the command line 2023-08-11 21:59:51 -04:00
a24eccf95d Removed maxatom from fix spring/self, need to work on exchange for xoriginal on spring/self/kk 2023-08-11 09:43:28 -05:00
2cf73ff427 use platform abstractions from Qt library 2023-08-11 06:44:52 -04:00
035620d252 more image window tweaks
- add image windows to View menu
- add setting to replace old image view instead of creating a new one
- add setting to turn on/off box
- add setting to turn on/off axes
2023-08-11 03:36:40 -04:00
93e67c9388 add pixmaps to image viewer buttons 2023-08-11 02:40:08 -04:00
2e0e3d9204 add support for near-interactive image processing 2023-08-10 23:27:04 -04:00
4afd5f9661 update status message while rendering snapshot image 2023-08-10 21:46:05 -04:00
7c03921669 only close LAMMPS instance if preferences for command line flags have changed 2023-08-10 21:36:09 -04:00
55d0b84428 add support for Image rendering with up to 4x4 antialiasing and SSAO mode 2023-08-10 21:16:17 -04:00
4fb5135887 remove scrollwheel support, add prototype buttons 2023-08-10 19:58:03 -04:00
cb2627220e add a few more ideas 2023-08-10 13:29:27 -04:00
506383ab7e more ideas 2023-08-10 06:35:34 -04:00
bf6e021335 Merge branch 'develop' into lammps-gui-improvements 2023-08-10 06:28:05 -04:00
eda6a39e6a Merge branch 'develop' into collected-small-changes 2023-08-10 06:27:44 -04:00
3ae89fed8b Merge pull request #3867 from akohlmey/fix-vector-nmax
Add  nmax keyword to fix vector to restrict vector length
2023-08-10 06:27:11 -04:00
54edfd1604 update TODO, remove useless file 2023-08-10 06:14:41 -04:00
4bb3ecd09c Added the fix spring/self/kk source files 2023-08-10 00:36:33 -05:00
6ff85cab7f Adding fix spring/self/kk, needed to add maxatom to fix spring/self, may need resize xoriginal as well 2023-08-10 00:34:52 -05:00
2b7873a5bd fix typos 2023-08-09 22:55:31 -04:00
cb4eee809d add support to store the 5 most recent files and add them to the file menu 2023-08-09 22:22:17 -04:00
f1ba4227dc update TODO list 2023-08-09 20:26:26 -04:00
27d4a8afcf small tweak 2023-08-09 20:26:18 -04:00
2f415c8b62 bugfix for pair style dpd/gpu from Trung 2023-08-09 09:42:01 -04:00
b9afbf40a0 Merge branch 'develop' into collected-small-changes 2023-08-09 00:43:29 -04:00
bddb19fda1 disable *all* MPI-IO related testing 2023-08-09 00:41:40 -04:00
5d1c75e660 disable MPI-IO based restart writing (for now) 2023-08-09 00:41:39 -04:00
a56ac77132 indexing bugfix for compute global/atom 2023-08-09 00:41:39 -04:00
2f6dbfd239 possible workaround for unit test failure
taken from: https://github.com/open-mpi/ompi/issues/9656
2023-08-09 00:41:39 -04:00
ab4ae4f177 recover lost "reset to defaults" action 2023-08-09 00:36:42 -04:00
a4ab3935b4 more "About" dialog box tweaks 2023-08-09 00:36:33 -04:00
a3f742a405 add info about accelerator support and communication 2023-08-09 00:36:26 -04:00
46dd9c8546 make font size in "About" dialog 3/4 the default size. 2023-08-09 00:36:17 -04:00
b7fad288c7 fix ability to select a temporary directory (for image files) 2023-08-09 00:36:05 -04:00
7b1c00137a add preference option to select default and text font 2023-08-09 00:35:47 -04:00
4397e13aaf simplify font selection and prepare for making it a preference 2023-08-09 00:35:36 -04:00
54c62c86a7 fall back to "none" accelerator, if one was selected, but is no longer available 2023-08-09 00:35:23 -04:00
407bcf30a0 step patch level for lammps-gui 2023-08-09 00:35:13 -04:00
65d5d6508a force C locale from within the LAMMPS GUI app 2023-08-09 00:34:58 -04:00
77808cd178 add option to set visibility of log and chart windows from menu and in preferences 2023-08-09 00:34:43 -04:00
d7b5387712 enforce C locale, so that numbers are created and parsed correctly in the GUI text editor 2023-08-09 00:34:35 -04:00
f345146103 Simplify QtCreator file, update TODO once more, tag patch level 2023-08-09 00:34:19 -04:00
6dcfe130a4 tweaks to syntax highlighting 2023-08-09 00:34:05 -04:00
b81aaebd87 update TODO list 2023-08-09 00:33:54 -04:00
d33d59ec41 update docs 2023-08-09 00:33:43 -04:00
1b0967477b add support to export collected Thermo data to gnuplot .dat and excel .csv 2023-08-09 00:33:31 -04:00
bf79b91db0 update TODO list 2023-08-09 00:33:17 -04:00
890765f2e6 add preference option to replace chart window 2023-08-09 00:33:00 -04:00
53eaca030b complete chart view window with option to select chart from thermo columns 2023-08-09 00:32:46 -04:00
fe7681d0b3 add chart viewer window to show graphs of ongoing runs from thermo data 2023-08-09 00:32:34 -04:00
d414dd52d5 subclass QPlainTextEdit for logwindows, so we can store its size on close
also some more settings tweaks (e.g. do not store window size when maximized)
and add setting to replace log windows instead or creating new ones.
2023-08-09 00:32:22 -04:00
ea15cec4bf remember the size of the main window 2023-08-09 00:31:53 -04:00
9b0fe3eeda improve LAMMPS GUI docs, add info about using the Linux-2-Windows cross-compiler 2023-08-09 00:31:11 -04:00
4ca32f0cec Added comments to the use of operators overloaded when accessing unwrap on the GPU (serial works fine) 2023-08-07 15:24:16 -05:00
7c17ea632c Reverted changes to tau as a time constant. To be checked. 2023-08-07 12:09:44 +02:00
4a82754464 Fixed an obvious bug with x 2023-08-07 00:30:32 -05:00
5a6b2ec59c disable *all* MPI-IO related testing 2023-08-06 22:06:28 -04:00
a1bfbf4872 disable MPI-IO based restart writing (for now) 2023-08-06 22:06:14 -04:00
2987f38257 possible workaround for unit test failure
taken from: https://github.com/open-mpi/ompi/issues/9656
2023-08-06 22:05:53 -04:00
dc8f17e8e6 Fixed bugs with missing x array, removed the () operator overloads because they require access to domain within the kernels 2023-08-06 00:04:46 -05:00
b6f7a27b09 Merge pull request #3871 from megmcca/local-composition
Per-atom compute to calculate local composition of atom types
2023-08-05 00:53:57 -04:00
dbab5b6931 possible workaround for unit test failure
taken from: https://github.com/open-mpi/ompi/issues/9656
2023-08-04 22:32:28 -04:00
e10e1190e2 Merge branch 'develop' into triclinic-neighbor-bug 2023-08-04 22:32:19 -04:00
003a207038 possible workaround for unit test failure
taken from: https://github.com/open-mpi/ompi/issues/9656
2023-08-04 22:30:28 -04:00
7d359403ac clarify docs 2023-08-04 21:37:20 -04:00
db0c892d24 correct parsing of arguments with nmax appended at the end 2023-08-04 21:37:12 -04:00
5e9658aff6 fix whitespace and minor documentation integration issues 2023-08-04 21:06:47 -04:00
7adb2d7bcf fix syntax issues 2023-08-04 17:16:00 -04:00
b248211eb5 Merge branch 'develop' into fix-vector-nmax 2023-08-04 16:44:20 -04:00
41e71f2e41 update fix vector docs 2023-08-04 16:44:10 -04:00
95bc422424 fix duplicate implicit reference 2023-08-04 16:38:18 -04:00
bc02a7cc62 Merge pull request #3836 from akohlmey/cmake-3.16
Make CMake 3.16 the minimum required version
2023-08-04 15:36:32 -04:00
4c68e3f5f3 Small tweaks 2023-08-04 13:29:22 -06:00
376b83df52 Merge branch 'develop' of github.com:lammps/lammps into local-composition 2023-08-04 13:23:53 -06:00
5d3839db9f clean up all created files 2023-08-04 13:27:01 -04:00
cf5cd9f977 update docs 2023-08-04 13:21:59 -04:00
907673c4d7 Merge branch 'develop' into fix-vector-nmax 2023-08-04 13:07:03 -04:00
951b344a07 Merge branch 'develop' into cmake-3.16 2023-08-04 13:05:08 -04:00
4851f30634 Merge pull request #3877 from akohlmey/collected_small_fixes
Collected small fixes
2023-08-04 13:04:39 -04:00
a6767c85b0 apply clang-format 2023-08-04 12:11:59 -04:00
bc6fcdc61a Applying triclinic neighbor fixes to intel package. 2023-08-04 08:49:27 -07:00
1a5b947593 flag if we are cross-compiling 2023-08-04 08:02:06 -04:00
e958cc0ef1 silence warning about a setting that was added to silence warnings 2023-08-04 08:01:57 -04:00
ecb28e8e2e Merge branch 'develop' into cmake-3.16 2023-08-04 04:26:30 -04:00
8eb7f56491 be more thorough and complete about including all required dll files 2023-08-04 04:17:01 -04:00
2ea1c78376 cosmetic 2023-08-04 02:24:52 -04:00
cf6866d5e6 improve message in about LAMMPS dialog 2023-08-03 22:42:50 -04:00
6280876825 Merge remote-tracking branch 'github/develop' into collected_small_fixes 2023-08-03 22:09:45 -04:00
a10aab440f report LAMMPS GUI build choices in CMake config summary 2023-08-03 22:09:36 -04:00
e87bbf4edb Merge pull request #3832 from akohlmey/fmtlib-update
Update fmtlib copy to version 10
2023-08-03 22:03:32 -04:00
4e08e6cb4c add support to build LAMMPS GUI zip package with cross compiler 2023-08-03 21:57:33 -04:00
7498739f98 work around build issue with cross-compiler 2023-08-03 21:56:35 -04:00
0446bdfc00 work around C++17 issue in AWPMD package 2023-08-03 21:56:04 -04:00
7d84eb86f7 Merge remote-tracking branch 'github/develop' into collected_small_fixes 2023-08-03 21:01:08 -04:00
e467461cac Merge pull request #3736 from lammps/always-exceptions
Always throw exceptions for errors
2023-08-03 21:00:19 -04:00
2305c4cb30 Merge branch 'develop' into cmake-3.16 2023-08-03 17:39:15 -04:00
794e3d11df Merge pull request #3670 from stanmoore1/kk_update_4.0
Update Kokkos library in LAMMPS to v4.1.0
2023-08-03 17:36:22 -04:00
e3fa10ee88 add deprecation note to lammps_config_has_exceptions() function 2023-08-03 17:35:05 -04:00
6e9a6e6b0b Merge pull request #3856 from akohlmey/remove-mscg-package
Remove MSCG package from LAMMPS distribution
2023-08-03 17:29:56 -04:00
24ea5fe7e3 hack to avoid compile failure with intel 2023-08-03 17:21:09 -04:00
397f3e4786 exceptions are always enabled and thus the check is no longer required 2023-08-03 16:52:24 -04:00
4ed98083e0 Merge branch 'develop' into always-exceptions
# Conflicts:
#	src/library.cpp
2023-08-03 16:50:50 -04:00
a57f2a996f sync with fmtlib upstream 2023-08-03 16:34:07 -04:00
6049f2985d Merge branch 'develop' into fmtlib-update 2023-08-03 16:22:57 -04:00
e0055ea929 Merge branch 'develop' of github.com:lammps/lammps into kk_update_4.0 2023-08-03 13:42:48 -06:00
fbf0bad3b5 correct sort order 2023-08-03 14:30:32 -04:00
cefb38a000 update package list for Windows with MSVC 2023-08-03 14:30:21 -04:00
3f5898a241 flag development branch 2023-08-03 14:28:23 -04:00
cc9dee5ecd use references instead of copies when looping over list of selected fixes 2023-08-03 11:00:05 -04:00
a6d178194e use consistent names and capitalization in comments 2023-08-03 10:59:31 -04:00
554db7daaf Merge pull request #3873 from akohlmey/next_patch_release
Step version strings for next release
2023-08-03 08:14:14 -04:00
dea8050a8a Merge pull request #3870 from akohlmey/lammps-gui
Add simple LAMMPS GUI using Qt library
2023-08-03 01:02:18 -04:00
3c24e4fbf3 fix typo 2023-08-02 23:53:32 -04:00
8d5343ea23 temporary skip showing broken temp file setting on macOS 2023-08-02 23:46:44 -04:00
3f1f08d4c0 add setting support for selecting the LAMMPS plugin shared object 2023-08-02 23:33:51 -04:00
2a82ed9494 add accelerators for tabs and layout tweaks 2023-08-02 21:36:04 -04:00
f6732f028c support running with Kokkos + OpenMP 2023-08-02 21:06:30 -04:00
91fdf6918d Merge pull request #3874 from lammps/perlmutter
Add missing path to Kokkos Perlmutter Makefile
2023-08-02 19:55:18 -04:00
9617c8e3d2 also update doc page 2023-08-02 16:30:26 -06:00
3e7f1ac83a add proc option to compute property/grid 2023-08-02 16:27:19 -06:00
07b36025e2 small doc fix from @sjplimp 2023-08-02 17:56:02 -04:00
6f6eb1dbb1 update TODO list 2023-08-02 17:54:40 -04:00
c800a2c676 add menu entry to reset to default settings 2023-08-02 17:52:56 -04:00
2808a78822 more updates to preferences dialog and supporting code. almost done. 2023-08-02 17:28:34 -04:00
498ca44310 Add missing path to Kokkos Perlmutter Makefile 2023-08-02 18:43:54 +00:00
97d406f2ff update TODO list with some new ideas 2023-08-02 13:53:31 -04:00
e493519c12 more hotkeys and have Ok/Cancel on preferences dialog handled properly 2023-08-02 11:05:35 -04:00
34c398dd37 Tried two ways of doing parallel reduce for fsum 2023-08-02 06:59:24 -05:00
dfcd3f945e first pieces of preferences dialog 2023-08-02 07:02:20 -04:00
2711917a6e grammar 2023-08-02 07:01:30 -04:00
dfb614bd42 fix memory leak 2023-08-02 05:40:56 -04:00
56b50d6580 ensure final newline when saving to file 2023-08-02 05:37:56 -04:00
c918bdeb07 fix a couple of bugs that would hang the app waiting for log output 2023-08-02 05:25:24 -04:00
c99d0f5452 cmake cleanups 2023-08-02 04:58:38 -04:00
1fa2060175 Merge remote-tracking branch 'github/develop' into lammps-gui 2023-08-02 04:10:19 -04:00
8a53c66bef refactor. add LammpsWrapper class to hide plugin defines and interface changes. 2023-08-02 01:49:39 -04:00
57b6543886 Merge pull request #3859 from akohlmey/opencl-intel-single-fixes
Address GPU package issues with OpenCL on Intel GPU with single-only hardware (e.g. Xe)
2023-08-02 00:49:17 -04:00
310ede65d9 apply coding standard checks 2023-08-01 20:49:38 -04:00
f76300c4f8 do not build packages automatically but use explicit targets 2023-08-01 20:42:10 -04:00
22a9f869ea change version date 2023-08-01 18:39:42 -04:00
ea5a20afc5 add missing versionchanged tags 2023-08-01 18:39:20 -04:00
f1cda322fe make it LAMMPS GUI version 1.0.0 since we're including it in the stable version 2023-08-01 18:20:44 -04:00
4f1946f307 update LAMMPS GUI docs 2023-08-01 18:19:18 -04:00
6c8291fa15 Merge pull request #3861 from akohlmey/collected-small-fixes
Collected small fixes and updates
2023-08-01 17:10:33 -04:00
f2bc41a83c we should be ok with CMake 3.16 as minimum version again. 2023-08-01 15:38:07 -04:00
fd9af7d5c9 this is packaging/install for visual studio only 2023-08-01 15:32:24 -04:00
b9682fc6fd zip file packaging for windows 2023-08-01 14:38:48 -04:00
6a991ff0a0 Updated fix efield/kk, needs work on unwrap 2023-08-01 10:53:20 -05:00
1f829dd2e9 ignore install folder created by VS 2023-08-01 08:20:22 -04:00
b67de91feb rename script 2023-08-01 04:29:13 -04:00
d38ec56f3a more tweaks. avoid warnings. get dependencies for imageformats. 2023-08-01 04:28:54 -04:00
44cec03729 set environment variables to find potentials and frc files 2023-08-01 04:11:57 -04:00
89b205a08e must use tar to preserve symlinks 2023-08-01 03:48:57 -04:00
6b50daf5b7 Merge branch 'collected-small-fixes' into lammps-gui
# Conflicts:
#	cmake/CMakeLists.txt
2023-08-01 03:07:56 -04:00
418b2c3df0 integrate wrapper script for linux 2023-08-01 03:00:33 -04:00
488b4d46cd fix minor issues 2023-08-01 02:36:43 -04:00
0d7687cd02 strip debug info only on files, not symlinks. get deps for Qt platform plugins 2023-08-01 02:28:56 -04:00
349cf728b1 various tweaks, remove debug info, delete backward system libs 2023-08-01 02:13:48 -04:00
5fdeefe0ac Linux deployment script 2023-08-01 01:34:08 -04:00
be9d246b93 install runtime deps on Linux 2023-08-01 01:05:38 -04:00
fbf05fb9a9 copy runtime libs/dlls during install 2023-08-01 00:32:57 -04:00
33e893dbed cleanup. must include lammps-gui in install targets. windows cross-deploy 2023-07-31 17:22:26 -04:00
49d411e7c1 update 2023-07-31 14:43:09 -04:00
b5a5cf1c96 support zooming image with mousewheel 2023-07-31 14:32:10 -04:00
d41bf628c7 display number of threads in use for LAMMPS instance in status bar 2023-07-31 07:59:39 -04:00
2f159df3b7 changes for portability with Qt 5.12 on Ubuntu 20.04LTS 2023-07-31 07:04:25 -04:00
0a0184221c custom message box is more readable and wider 2023-07-31 05:09:08 -04:00
68454b3f73 small help window tweak 2023-07-31 02:12:32 -04:00
cadc45d41d implement quick help dialog 2023-07-31 01:01:00 -04:00
75254bf305 simplify. only look for Qt5 at the moment. 2023-07-31 01:00:36 -04:00
72ea2673dd update LAMMPS manual and README file 2023-07-31 00:07:32 -04:00
6d58910c5c Add new VS configuration for compiling LAMMPS GUI 2023-07-30 20:56:45 -04:00
e899a07b4c Show current working directory and share space with progress bar. Show/hide the other. 2023-07-30 20:39:48 -04:00
c95bf2c14b add image viewer dialog for write_dump image output, help can open link to manual 2023-07-30 19:23:42 -04:00
1c8b9e9467 Windos portability 2023-07-30 15:54:06 -04:00
2eca0f2634 Merge branch 'lammps-gui' of github.com:akohlmey/lammps into lammps-gui 2023-07-30 13:35:36 -04:00
93b2f24841 update installer background image 2023-07-30 13:35:08 -04:00
12fee35d78 fix bugs and typos 2023-07-30 13:32:46 -04:00
9e5dcfcf78 update for packaging a .dmg file w/o CPack (untested) 2023-07-30 13:10:11 -04:00
080d868e40 mention setting QT_FONT_DPI in README file since it has no effect in the binary 2023-07-30 11:50:00 -04:00
ac9163447c minor layout and behavior tweaks 2023-07-30 07:23:32 -04:00
05c8d260d9 use OpenMP with maximum number of threads by default
we still honor OMP_NUM_THREADS, if present.
2023-07-30 02:43:00 -04:00
e23176d633 no more rpath fixing needed. add icon to disk image 2023-07-30 02:41:35 -04:00
b3766384c3 fixup rpath for lmp executable so it can find libomp 2023-07-30 00:54:08 -04:00
2d6ae69048 include updates from @rbberger 2023-07-30 00:11:40 -04:00
81790e1c44 update DMG installer background image with instructions 2023-07-29 21:27:36 -04:00
a2503711d0 Merge branch 'lammps-gui' of github.com:akohlmey/lammps into lammps-gui
# Conflicts:
#	tools/lammps-gui/lammpsgui.cpp
2023-07-29 21:11:38 -04:00
d9f4ce04af integrate packaging related changes, build script for GUI 2023-07-29 21:03:24 -04:00
b75407684f more accurate pattern matching 2023-07-29 13:49:21 -04:00
62ec8e744a WIP on preferences dialog 2023-07-29 13:40:36 -04:00
cb5470ece3 add dialog checking whether to discard changes in a modified buffer 2023-07-28 07:36:25 -04:00
bb96707ec8 add support for "modified" indicator to window title 2023-07-28 07:12:21 -04:00
c1d690d190 implement drag-n-drop for files 2023-07-28 05:04:19 -04:00
7a9694b849 update TODO file 2023-07-28 01:15:03 -04:00
2da71bd2d6 improve cmake settings for creating an app bundle 2023-07-28 01:04:34 -04:00
739bffa5e6 accept sphinx 7.1 2023-07-27 19:20:35 -04:00
e6e5be4477 move initialization of plugin before opening input
This way we can load the shared library from the current folder
since the file opening may switch working directory.
2023-07-27 12:08:48 -04:00
034b7458bc add dummy help menu button 2023-07-27 11:53:23 -04:00
6c38c4de50 must update Purge.list when removing package from distribution 2023-07-27 10:46:34 -04:00
1fa4ab22ab Merge branch 'develop' into remove-mscg-package 2023-07-27 10:45:23 -04:00
a8de49769b add missing entry 2023-07-27 10:43:20 -04:00
f170d8a56d update todo list 2023-07-27 09:13:04 -04:00
2644c064e1 update version number and "about info" to also show whether LAMMPS was loaded dynamically 2023-07-27 09:09:06 -04:00
32091d9f32 fix typo in plugin interface API 2023-07-27 08:21:17 -04:00
dd25bac428 fix typo in plugin interface API 2023-07-27 08:20:02 -04:00
3657ed6beb clean up comments 2023-07-27 03:35:46 -06:00
2273c5c475 fix memory and output bugs 2023-07-27 03:28:46 -06:00
f533d4ff66 Merge branch 'lammps:develop' into local-composition 2023-07-27 03:13:51 -06:00
a2657c67dd fix typo 2023-07-27 04:47:45 -04:00
1697d1edf6 embed font and icon and make use of them 2023-07-27 04:41:50 -04:00
056c60839c portability to macOS 2023-07-27 04:07:03 -04:00
f81ee57c97 add button to stop a run via lammps_force_timeout() 2023-07-27 03:21:34 -04:00
da0669d988 implement running LAMMPS asynchonously in a separate thread 2023-07-27 02:56:07 -04:00
a62d1be3e6 add icons to menu bar 2023-07-26 22:39:09 -04:00
f3e54cada1 small layout tweaks 2023-07-26 18:54:24 -04:00
1698587a40 add a readme file 2023-07-26 18:25:25 -04:00
e0ed11a053 add option to load LAMMPS library dynamically at runtime as plugin 2023-07-26 18:25:13 -04:00
0120c7b8b7 add permanent text field for status to status bar 2023-07-26 08:43:55 -04:00
3287d79e9d tweak/correct highlighting 2023-07-26 08:43:26 -04:00
cde3328927 update todo list 2023-07-26 08:42:08 -04:00
c96e4d59da print more config info in about dialog 2023-07-26 02:33:50 -04:00
89b92e8b13 make "warning" boxes on errors "critical" 2023-07-26 02:33:32 -04:00
e6dc5822c3 more flexible font search 2023-07-26 02:33:06 -04:00
984a311dce make compatible with windows cross-compiler 2023-07-26 01:29:30 -04:00
e548c0bde6 add todo list 2023-07-25 23:39:29 -04:00
e4dde8ebd4 fix shortcut implementation for log windows 2023-07-25 23:15:19 -04:00
368be8ac39 update list of keywords for VIM syntax highlighting 2023-07-25 21:40:54 -04:00
6e0aaab973 first stab at LAMMPS input file syntax highlighting 2023-07-25 21:35:38 -04:00
8b9174821a capture stdout and display in dialog window 2023-07-25 16:01:02 -04:00
f7881f4de5 add global error message buffer for exceptions creating a LAMMPS instance 2023-07-25 13:08:26 -04:00
5d34cc624d temporarily disable highlighting a line 2023-07-25 13:06:52 -04:00
ab792acbe5 catch errors via library interface and present dialog displaying them 2023-07-25 13:06:27 -04:00
276b89366a add global error message buffer for exceptions creating a LAMMPS instance 2023-07-25 13:05:27 -04:00
7eb2afa994 integrate syntax highlight code from example (uses c++ syntax currently) 2023-07-25 12:20:48 -04:00
5da462670f add menu hotkeys and shortcuts 2023-07-25 12:19:10 -04:00
5d1251df27 properly canonicalize filename 2023-07-25 12:18:47 -04:00
4fd648c11e add copyright message 2023-07-25 12:18:00 -04:00
a402d2c6d8 simplify, move redundant operations to functions, update coding style 2023-07-25 10:16:20 -04:00
908e925b8f add minimal about dialogs 2023-07-25 00:39:47 -04:00
a49a1b644e update main widget to CodeEditor with line numbers and highlight. Open file from command line. 2023-07-25 00:13:53 -04:00
b87ced52b4 first minimal stab at LAMMPS GUI 2023-07-24 19:07:33 -04:00
497659a4c7 consolidate use of cstdint and cinttypes, with the latter being a superset of the former 2023-07-24 16:29:54 -04:00
c2ceb0d9e4 Merge branch 'patch-5' of github.com:evoyiatzis/lammps into collected-small-fixes 2023-07-23 17:19:10 -04:00
6422565048 Update CONTRIBUTING.md
Fixing a small typo
2023-07-23 12:22:02 +03:00
a48f4597a2 add optional nmax keyword to fix vector to allow using it as a sliding window 2023-07-22 00:08:17 -04:00
732566c8a9 mention that class members should be initialized in the constructor, not the header. 2023-07-21 19:32:47 -04:00
cbee2dd86d Merge remote-tracking branch 'github/develop' into collected-small-fixes 2023-07-21 17:27:06 -04:00
a4a206e601 Merge pull request #3865 from lammps/compute-init-flags
More fine grained monitoring if computes were initialized
2023-07-21 14:58:37 -04:00
21d4be321a must lower test epsilon with single precision FFTs and pppm used 2023-07-21 12:12:53 -04:00
cccc362b3f improve error messages 2023-07-21 11:28:09 -04:00
9669bf3d3b move creation of internal computes and variables before lmp->init() so they are initialized 2023-07-21 11:25:44 -04:00
2da908190b make error messages consistent and improve their grammar 2023-07-21 11:24:57 -04:00
0b57ea246c update dump styles to use Compute::is_initialized() 2023-07-20 21:48:51 -04:00
78880c9099 update reset_atoms image to call Compute::init_flag() as a workaround 2023-07-20 21:28:45 -04:00
c7996b506a make use of Compute::is_initialized() and Compute::init_flags() 2023-07-20 20:31:48 -04:00
6c6258371b add init_flags() and is_initialized() methods 2023-07-20 20:31:16 -04:00
b725f5da28 Merge pull request #3864 from stanmoore1/kk_meam_issue
Fix compile bug in Kokkos MEAM styles
2023-07-20 18:20:52 -04:00
c441a999f1 fix typos 2023-07-20 17:59:40 -04:00
7d46165c2a Fix compile bug in Kokkos MEAM styles 2023-07-20 13:31:34 -06:00
b9aa71cbc5 Merge branch 'develop' of github.com:lammps/lammps into kk_update_4.0 2023-07-20 13:03:17 -06:00
e299fa9aab add option to skip building for multiple GPU archs 2023-07-20 14:00:21 -04:00
c42ec8a647 create toplevel README file when building for static Linux or macOS multiarch 2023-07-19 18:14:03 -04:00
f26064d9a5 also install the bench folder into ${datadir} 2023-07-19 17:46:21 -04:00
66403c93ad add preset and support for building serial multi-arch macOS executables 2023-07-18 18:55:27 -04:00
7aec563b86 building lammps-shell requires pkg-config 2023-07-18 17:02:48 -04:00
021eeae860 add workaround for failing overhead estimation test on (Intel) GPUs that only support single precision 2023-07-18 13:24:11 -04:00
34fcf1361f Merge remote-tracking branch 'github/develop' into opencl-intel-single-fixes 2023-07-18 12:16:42 -04:00
164b254602 Merge pull request #3860 from akohlmey/fix-for-fix-adapt
Small refactor to better handle diamflag in fix adapt and fix adapt/fep
2023-07-18 11:56:11 -04:00
2e2624d719 update loop over adapt fixes logic 2023-07-18 11:10:41 -04:00
cea202ebe9 include file is not needed 2023-07-18 11:09:09 -04:00
7a04e048fe make certain radvary is initialized in constructor 2023-07-18 11:08:59 -04:00
1057fa9b00 move diamflag from fix adapt and adapt/fep to base class for cleaner code 2023-07-17 22:17:05 -04:00
dba4d9ebbc Merge pull request #3855 from akohlmey/collected-small-changes
Collected small changes and fixes
2023-07-17 19:00:40 -04:00
74c5ca0996 move definition of struct containing double to avoid failure on Intel Xe GPU 2023-07-17 18:34:03 -04:00
fa4a3a0622 using NBOR_PREFETCH=2 gives errors with Intel Xe GPUs set to 0 2023-07-17 18:33:21 -04:00
d27ab47ed9 for clarity 2023-07-17 18:32:18 -04:00
f62a4c5372 Working on fix efield/kk 2023-07-17 16:49:26 -05:00
3568cced4b update comment 2023-07-17 09:52:44 -04:00
9b7bd71ab6 remove MSCG package from LAMMPS distribution 2023-07-16 21:04:58 -04:00
27aa6898f8 modernize access for fixes and computes 2023-07-16 20:24:22 -04:00
89d82fde22 modernize access to list of fixes 2023-07-16 15:20:36 -04:00
b1a39d0b4d Merge branch 'upstream' into kk-updates 2023-07-16 00:04:32 -05:00
fd0a72eab5 modernize and consolidate style across all three temper command variants 2023-07-15 12:37:12 -04:00
77bdcb3e19 small doc style update 2023-07-15 12:36:41 -04:00
baac049aed update LAMMPS input file syntax highlighting for recent changes 2023-07-15 12:25:03 -04:00
5e1c722b10 Merge branch 'develop' into collected-small-changes 2023-07-14 20:09:27 -04:00
e6873bb7c8 modernize code 2023-07-14 20:08:34 -04:00
78d3d4948f fix off-by-one bug in argument parsing 2023-07-14 20:08:21 -04:00
78470febbd Merge branch 'develop' of github.com:lammps/lammps into kk_update_4.0 2023-07-14 17:59:15 -06:00
2090d33d5f Merge pull request #3848 from ndtrung81/amoeba-gpu-bugfix
Bugfix for AMOEBA/HIPPO GPU
2023-07-14 18:32:58 -04:00
be2e437cec use approximation for erfc() on OpenCL for Intel since the OpenCL version seems broken 2023-07-14 10:08:59 -04:00
620c60122a should not use pow() for computing cube, use multiplication. 2023-07-14 10:08:09 -04:00
02d189fb23 avoid false positive with static code analysis 2023-07-13 10:53:56 -04:00
e2d7c54409 Merge pull request #3851 from hammondkd/doc-fixes
Documentation: swap "parsed-literal::" for "code-block:: LAMMPS" in Syntax sections
2023-07-12 23:26:17 -04:00
acb0b89833 fix typos 2023-07-12 20:48:36 -04:00
6907543e9d highlight if/then/elif/else everywhere, but revert for general keywords 2023-07-12 20:25:49 -04:00
df2cfe28c4 Merge pull request #3850 from jibril-b-coulibaly/BPM
BPM package: allow bonded atoms to be excluded from neighbor lists if BPM cannot break + doc update
2023-07-12 18:38:08 -04:00
24de6377d3 handle more commands with arguments for more consistent syntax highlighting 2023-07-12 14:43:04 -04:00
fe95dbc82f enforce all special_bonds weights to be 1.0 when overlay/pair is used 2023-07-12 11:37:17 -06:00
751dc1cfb6 improve pygments lexer to detect more text to highlight and for more consistency 2023-07-12 12:28:03 -04:00
3b859094bf there is no mandatory group-ID for both commands 2023-07-12 12:27:15 -04:00
7d88a351f5 Merge branch 'develop' into doc-fixes 2023-07-12 11:41:15 -04:00
6e65744d1a Merge pull request #3844 from akohlmey/collected-small-fixes
Collected small fixes
2023-07-12 11:40:02 -04:00
eb52112a57 Merge branch 'develop' into collected-small-fixes 2023-07-11 23:07:52 -04:00
c936e98d5c Merge branch 'triclinic-neighbor-bug' of github.com:lammps/lammps into triclinic-neighbor-bug 2023-07-11 18:50:32 -07:00
a91b3dab96 doc atom ID requirement for triclinic 2023-07-11 18:50:23 -07:00
3fc809a1b9 add check for atom IDs when triclinic 2023-07-11 18:45:45 -07:00
9e049147be remove accidental commit 2023-07-11 19:50:37 -04:00
fe2a275531 update list of known commands 2023-07-11 19:40:14 -04:00
6efa8526ba work around pygments issue 2023-07-11 19:39:54 -04:00
6123883324 Replaced parsed-literal:: with code-block:: LAMMPS under "Syntax" 2023-07-11 17:57:22 -05:00
89fb236144 port bugfix for colloid test failure 2023-07-11 18:35:16 -04:00
2a7ac115d8 fix whitespace (one more time) 2023-07-11 18:25:29 -04:00
4bfffce703 merge conflict 2023-07-11 17:15:27 -05:00
fe1aab69e0 merge from ORIGIN 2023-07-11 14:39:44 -07:00
bb6e4d8440 add forgotten line to multi and mutli/old 2023-07-11 14:30:14 -07:00
0f89a8b2ca explicit special_bonds commands for 1-2 coul weight equal to zero 2023-07-11 10:42:26 -06:00
564a8e88c1 use blanks on both sides of comparison operators not only one, remove blanks next to parenthesis 2023-07-11 10:31:16 -04:00
2eeea43320 port neighbor list changes to OPENMP package 2023-07-11 10:11:39 -04:00
3328389baf Merge pull request #3814 from rohskopf/jax
JAX ML-IAP Unified connection & examples
2023-07-11 07:15:18 -04:00
4d8ef552c4 remove dead code, trim namespace imports 2023-07-10 22:42:49 -04:00
1427e0adbc Merge remote-tracking branch 'github/develop' into triclinic-neighbor-bug 2023-07-10 22:36:08 -04:00
6bd965f0df fix whitespace (again) 2023-07-10 22:35:36 -04:00
fbbf44fb8e same changes to other NPair and NStencil methods 2023-07-10 18:25:29 -07:00
c63c9711d5 update remaining ellipsoid example dump output for OVITO compatibility 2023-07-10 19:42:48 -04:00
a4b3306b7c fix error message 2023-07-10 18:48:13 -04:00
4ab95611db merge with ORIGIN 2023-07-10 12:57:57 -07:00
07f42930ff clean up code and comments 2023-07-10 12:53:02 -07:00
cb27cb644f Merge remote-tracking branch 'github/develop' into collected-small-fixes 2023-07-10 13:11:24 -04:00
254afdd938 Merge pull request #3849 from jibril-b-coulibaly/doclink
fix typo for broken links in doc
2023-07-10 13:10:38 -04:00
469ffc7aba Merge pull request #3845 from ndtrung81/dielectric-updates2
Update and bugfix for the DIELECTRIC package
2023-07-10 11:50:23 -04:00
55343d715c update URL 2023-07-09 21:39:51 -04:00
2607212363 update for upstream changes 2023-07-09 21:21:39 -04:00
63c28337ab Merge branch 'develop' into collected-small-fixes 2023-07-09 21:20:07 -04:00
91b16c5945 make certain conductivity class member is always initialized 2023-07-09 21:10:44 -04:00
60b45f9766 correct error message 2023-07-09 18:01:19 -06:00
0718114a67 fix typo for broken links in doc 2023-07-09 17:43:39 -06:00
75a2557e82 fix bugs where an Atom::tag value was stored in an int and not a tagint 2023-07-09 15:41:39 -04:00
9db5d45232 port neighbor list build changes to corresponding OPENMP package files 2023-07-09 15:29:18 -04:00
e3349581c7 fix whitespace and remove debug code 2023-07-09 15:14:36 -04:00
ce1a084a0e expand stencil for triclinic neighbor build 2023-07-08 18:31:55 -07:00
abadf9412a check old results 2023-07-08 10:26:34 -07:00
d6412dc97b Attempted to resolve issues with switching from acctyp4 to acctyp3 in tep, fieldp since the changes in PR #3675, noting some changes with Intel OCL PR #3663 2023-07-08 00:50:19 -05:00
651ed1960d add per-atom data bugfix from Stan for fix ave/histo and fix ave/histo/weight 2023-07-07 18:29:28 -04:00
42f2a4b5b0 exclude self interactions and double counting of own/own 2023-07-07 08:58:14 -07:00
129264aa14 debugging 2023-07-07 08:42:46 -07:00
bacfcd2050 change triclinic logic to not depend on exact I,J atom coords 2023-07-07 07:36:05 -07:00
6a8ca34ce8 Merge pull request #3843 from dsbolin/gran_heat
Minor bug fix and enhancements for granular heat transfer
2023-07-06 21:09:23 -04:00
a3b9914f62 make error messages consistent with keyword values yes/no. Allow coul weight for 1-2 bonds to be zero for break no to eliminate bonded atoms from neighbor list when bonds cannot break 2023-07-06 17:48:49 -06:00
8665da6824 Merge pull request #3842 from lammps/rigid-gravity-doc
Add gravity keyword info to fix rigid doc page
2023-07-06 15:36:43 -04:00
6f289df980 enable and apply clang-format 2023-07-06 15:05:36 -04:00
6d8f5a38ea improve error messages 2023-07-06 15:03:38 -04:00
bf0372280e remove dead code 2023-07-06 14:59:09 -04:00
3e4b66378a typo 2023-07-06 14:06:31 -04:00
55b7b3d999 whitespace fixes 2023-07-06 14:03:07 -04:00
b66a5cd225 fix another typo 2023-07-06 13:31:00 -04:00
f6d4fd74e3 Merge branch 'develop' into fix-rigid-enforce2d 2023-07-06 13:23:21 -04:00
cac8247383 Modified doc page for pair granular to include flux as extra pairwise quantity 2023-07-06 11:19:22 -06:00
6e41ac7ead fix typo 2023-07-06 09:14:00 -07:00
02845483d2 add gravity keyword info to fix rigid doc page 2023-07-06 09:08:15 -07:00
8ae5ab57fc non-ellipsoid particles you have a 1,0,0,0 quaternion and 1,1,1 shape 2023-07-06 09:17:27 -04:00
fcf30f4c58 modernize example for dumping ellipsoid info to visualize with OVITO 2023-07-06 09:16:58 -04:00
146245e6ae Merge pull request #3834 from lammps/mdi-wrapper-tweak
Make QM wrappers more MDI-compatible with QM energy
2023-07-06 03:31:20 -04:00
afe2226797 Merge pull request #3830 from akohlmey/collected-small-fixes
Collected small changes and fixes
2023-07-06 00:39:42 -04:00
ef3de795c5 Merge pull request #3839 from stanmoore1/kk_makefiles
Kokkos Makefiles
2023-07-06 00:37:26 -04:00
ad14862cd0 Merge pull request #3827 from jtclemm/BPM
Bugfix and documentation corrections for BPM+Granular packages
2023-07-06 00:35:58 -04:00
108c5fc416 improve error messages 2023-07-05 14:59:35 -04:00
200b428039 Merge branch 'develop' into fix-rigid-enforce2d 2023-07-05 14:22:02 -04:00
d57e1be942 avoid division by zero in angle style dipole 2023-07-04 08:13:06 -04:00
3c09aa26f9 Merge branch 'develop' of github.com:lammps/lammps into kk_update_4.0 2023-07-03 16:35:57 -06:00
9031d79791 Add Makefile for Perlmutter 2023-07-03 21:47:47 +00:00
9dd5ceaf4e Kokkos Makefiles 2023-07-03 15:06:23 -06:00
677ff15740 Gran/heat changes 2023-07-03 11:52:41 -06:00
268faf935b avoid overeager flagging of errors for arguments to derived classes 2023-07-03 10:32:24 -04:00
d23cebf9f1 must copy wheel to olddir when -w flag is not given 2023-07-03 09:53:59 -04:00
b7bfc86eaf remove unused files still available and used in download-build-jpeg-png branch 2023-07-02 07:07:12 -04:00
5878040f26 skip undesired 'make install' targets from bundled Kokkos library 2023-07-01 18:44:57 -04:00
900c6cf545 remove unused variable 2023-07-01 18:27:35 -04:00
ef40448df6 update docs for CMake 3.16 requirement 2023-07-01 03:01:37 -04:00
4a46083e88 add git commit descriptor to LAMMPS version output 2023-06-30 23:29:17 -04:00
b50fc0be78 remove obsolete CONFIGURE_DEPENDS backward compatibility hack 2023-06-30 23:19:53 -04:00
71b48253e8 remove special case CMake code for versions before 3.16 2023-06-30 23:15:37 -04:00
378ef4b23e require CMake version 3.16 2023-06-30 22:59:41 -04:00
c1213c5222 use dynamic/dof and extra/dof consistently. remove compatibility note in docs. 2023-06-30 16:27:07 -04:00
55918ebabf sphinx-tabs 3.4.1 is now available directly 2023-06-30 16:17:04 -04:00
83528f02e8 whitespace 2023-06-29 22:10:31 -04:00
02498925c5 only fail on too small periodic domain in z direction if 3d system. 2023-06-29 22:07:04 -04:00
ab1e090e0e neighbor list skin is added to custom cutoff automatically 2023-06-29 21:32:04 -04:00
b7024288b6 add check to disallow custom neighbor list cutoffs larger than the communication cutoff. 2023-06-29 21:20:07 -04:00
14462d8f80 join strings 2023-06-29 16:13:16 -04:00
7c9b7eecf3 Update CMake 2023-06-29 10:48:35 -06:00
330107b77b Update Kokkos library in LAMMPS to v4.1.0 2023-06-29 10:42:42 -06:00
b0b26d9d3a silence compiler warning 2023-06-29 07:32:52 -04:00
a50993dac1 update docs for create_bonds 2023-06-28 10:06:31 -04:00
5d027fc92c error out when many bonds creation cutoff is larger than periodic domain 2023-06-28 09:50:27 -04:00
a4cba99ff9 Attempted to update slabcorr() in pppm/dielectric 2023-06-27 23:55:57 -05:00
89c4d43a87 Merge branch 'collected-small-fixes' of github.com:akohlmey/lammps into collected-small-fixes 2023-06-27 17:53:14 -04:00
906eecdbd7 clarify the temperature computation in compute temp 2023-06-27 17:53:06 -04:00
c347de7850 improve error messages 2023-06-26 16:12:15 -04:00
c332103938 make short read detection bugfix work in parallel 2023-06-26 15:20:29 -04:00
46a9f0a08c change QM Python wrappers to use ENERGY instead of PE as MDI command 2023-06-26 11:08:04 -07:00
d4e705b059 enable and apply clang-format 2023-06-26 10:59:03 -04:00
d813519493 make handling of masses consistent and simplify code 2023-06-26 10:52:12 -04:00
1743f0b338 update fmtlib to current master branch 2023-06-25 06:30:42 -04:00
d1980031ef remove more duplicate semicolons 2023-06-25 06:02:17 -04:00
92c118b29f replace for (;;) with while (true) 2023-06-25 05:56:51 -04:00
bfa39a37ff apply clang-format 2023-06-25 05:47:21 -04:00
fab01c7d5f Remove extra semicolons 2023-06-24 20:26:08 -06:00
a38e0fb47b restore clang-format comments 2023-06-23 08:22:31 -04:00
e9a06a0654 correct and reformat error messages for short reads 2023-06-22 11:49:56 -04:00
fc365d3d5f Merge branch 'develop' into always-exceptions 2023-06-22 10:53:36 -04:00
ffda6596da detect and flag short reads with missing lines in utils::read_lines_from_file() 2023-06-22 10:48:07 -04:00
558298ac04 Merge branch 'collected-small-fixes' of github.com:akohlmey/lammps into collected-small-fixes 2023-06-21 15:05:11 -04:00
e95b10f24a update VMD plugin headers to the latest version 2023-06-21 06:44:09 -04:00
e4b50a610e avoid segfaults if a dump is created and followed by run pre no 2023-06-21 06:44:08 -04:00
6d6f57aeff cosmetic 2023-06-20 16:17:11 -04:00
fcc3c99e2b avoid segfaults if a dump is created and followed by run pre no 2023-06-20 13:31:16 -04:00
6791651b62 add else branch to make coverity scan happy 2023-06-20 09:41:55 -04:00
af3d971023 allow longer argument strings to avoid failues with unit tests 2023-06-19 18:49:43 -04:00
c5d9f901d9 Merge pull request #3829 from JohnLucas1/fixpair_bugfix
fix pair bugfix
2023-06-19 15:13:39 -04:00
104d175a85 Merge pull request #3822 from ilia-nikiforov-umn/patch-1
Update lib/kim/README
2023-06-19 14:39:43 -04:00
585e47c01a Merge pull request #3826 from srtee/patch-3
debug fix_modify press for press/berendsen
2023-06-19 14:25:49 -04:00
f5d9e78659 Merge pull request #3819 from stanmoore1/kk_sycl
Pair SNAP tuning for Kokkos SYCL
2023-06-19 14:25:14 -04:00
d6f93a5253 Merge pull request #3821 from stanmoore1/kk_npair_workaround
Temporarily disable team policy for Kokkos ghost neigh list build due to kno…
2023-06-19 14:24:48 -04:00
c08182801f Merge pull request #3825 from akohlmey/remove-obsolete-fortran-interface
Remove obsolete fortran interfaces
2023-06-19 14:20:35 -04:00
0adb355001 Merge pull request #3823 from akohlmey/collected-small-fixes
Collected small fixes
2023-06-19 14:04:55 -04:00
838be24af4 Fixing argument parsing increment 2023-06-19 10:15:06 -06:00
542aa203da correct typo in fix pair documentation 2023-06-18 20:42:45 -05:00
6ccf5f107c fix a bug in fix pair 2023-06-18 20:39:18 -05:00
af76ffdfda ROCM aware OpenMPI support 2023-06-18 17:08:49 +03:00
21fb50f37b correct logic bug 2023-06-18 07:40:04 -04:00
2cea819e7f cosmetic 2023-06-18 07:24:42 -04:00
5196e4422b debug fix_modify press for press/berendsen 2023-06-18 17:51:15 +10:00
70823cac50 remove dead code 2023-06-17 23:30:36 -04:00
e2e9170dfa protect a couple more fixes from segfaults from errors in derived classes 2023-06-17 18:52:57 -04:00
753a0bd386 remove obsolete Fortran interfaces from examples/COUPLE folder 2023-06-17 18:31:11 -04:00
5eba9d7ee3 update regex for change to version output 2023-06-17 18:04:54 -04:00
f193a87426 correct CMake syntax 2023-06-17 18:04:38 -04:00
058d817335 whitespace 2023-06-17 17:45:16 -04:00
a3de790a0d include git descriptor info when compiling develop or maintenance version 2023-06-17 15:01:17 -04:00
9231ec6dbe avoid segfault on deleting callback when there is an error in the constructor or a derived class 2023-06-17 14:39:32 -04:00
37ca3f9af8 apply clang-format 2023-06-17 14:38:59 -04:00
60d060eeb1 fix logic bug 2023-06-17 14:38:49 -04:00
ce75691eae address issues flagged by coverity scan 2023-06-17 00:35:05 -04:00
6f5e5746b3 Update lib/kim/README
Fix some typos and update to non-deprecated form of kim commands
2023-06-16 12:21:42 -05:00
2d3bbd2e72 Temporarily disable team policy for ghost neigh list build due to known bug 2023-06-16 10:52:21 -06:00
bb9dc960b7 Use updated values from @cjknight 2023-06-16 10:26:01 -06:00
a20ed8e5e4 improve error messages for dump style custom 2023-06-16 12:13:22 -04:00
59c5ed63e3 programming style 2023-06-16 12:12:23 -04:00
74c4eb1063 indicate that LAMMPS was built from a development version 2023-06-16 12:12:12 -04:00
9673c22cc7 Merge pull request #3818 from akohlmey/next_release
Update version strings for upcoming release
2023-06-15 14:30:40 -04:00
0df1542be1 Pair SNAP tuning for Kokkos SYCL 2023-06-15 10:22:35 -06:00
227c4f2f1a Merge branch 'develop' into fix-rigid-enforce2d 2023-06-15 10:04:48 -04:00
1144a01658 Merge pull request #3815 from akohlmey/collected_small_changes
Collected small changes and fixes for the next feature release
2023-06-15 10:01:54 -04:00
55d767e416 make sure intermediate results are 64-bit compatible, so the won't overflow 2023-06-15 01:51:12 -04:00
e01bde5be5 avoid null pointer dereference 2023-06-15 01:50:07 -04:00
4eb602e0d4 improve error messages and apply clang-format 2023-06-14 22:18:08 -04:00
b8dda7ebfe documentation formatting and spelling fixes 2023-06-14 22:08:30 -04:00
d19d12e9e1 Merge branch 'develop' into collected_small_changes 2023-06-14 21:55:16 -04:00
4d02c6f26f update version strings for upcoming release 2023-06-14 21:50:27 -04:00
162f243ebc Merge pull request #3797 from Compizfox/develop
Include bond forces in `compute stress/cartesian`
2023-06-14 21:31:41 -04:00
77898e4a86 update log files for fix widom 2023-06-14 18:28:51 -04:00
57f82924f5 Merge branch 'develop' into collected_small_changes 2023-06-14 18:24:18 -04:00
618fa815cc Merge pull request #3812 from wmbrownIntel/intel_fixes_2023Jun
Misc Fixes for Intel Package
2023-06-14 18:21:34 -04:00
634c6cdc13 Merge pull request #3632 from arghdos/eam_teampolicy_optimization
Implement a "caching in LDS" approach for EAM to improve performance in HIP
2023-06-14 15:38:54 -04:00
4faebaf4ed add log files for fix pimd/langevin 2023-06-14 14:53:06 -04:00
82f664acd4 update log files for BODY package styles 2023-06-14 14:43:29 -04:00
27908139ae whitespace 2023-06-14 14:14:47 -04:00
c83dc1ff30 fix STORE global -> fix STORE/GLOBAL 2023-06-14 13:52:54 -04:00
0564d79570 Fix SYCL compile error with GNU make, see https://github.com/kokkos/kokkos/pull/6218 2023-06-14 10:52:47 -06:00
0cd566a417 Fix compile error for HIP 2023-06-14 10:43:30 -06:00
80f3b6699e Merge pull request #3817 from jrgissing/bond/react-charge_rescale+other_small_fixes
Bond/react: rescale_charges fix
2023-06-14 12:29:07 -04:00
8a738fabcb must initialized triclinic variable in constructor 2023-06-14 12:12:18 -04:00
b225c94f59 remove variable shadowing instance in base class 2023-06-14 12:12:04 -04:00
fcd234f723 Merge branch 'develop' of github.com:lammps/lammps into eam_teampolicy_optimization 2023-06-14 09:28:44 -06:00
e27895b232 Merge pull request #3816 from ndtrung81/body_bugfix
Bugfix for body rounded polyhedron and polygon pair styles for non-lj units
2023-06-14 11:28:13 -04:00
0314c9892c silence compiler warnings 2023-06-14 10:26:38 -04:00
3b37c92b87 consistently print error when box has changed to triclinic without redefining kspace style 2023-06-14 10:06:01 -04:00
96b8bbbdc9 Merge branch 'develop' into develop 2023-06-14 15:09:51 +02:00
e6cd79e0e9 Fix doc links 2023-06-14 15:04:46 +02:00
8aeb059ce8 Update doc/src/compute_stress_cartesian.rst
Co-authored-by: Axel Kohlmeyer <akohlmey@gmail.com>
2023-06-14 15:03:35 +02:00
bc52d863b4 cosmetic 2023-06-14 08:48:01 -04:00
e831e54a21 Merge pull request #3811 from rbberger/python_and_library_fixes
PyLammps and Library interface changes
2023-06-14 08:25:32 -04:00
beabb4effe remove dead code 2023-06-14 03:48:59 -04:00
2afa07655f set code owner for fix pimd/langevin 2023-06-14 03:44:11 -04:00
dfd384eeff some more formatting and programming style improvements 2023-06-14 03:40:38 -04:00
494341ba48 error out when using barostat without pressure couple or vice versa 2023-06-14 03:40:12 -04:00
6f69e5ae02 initialized all pointers to null in initializer list 2023-06-14 03:18:37 -04:00
8984b89feb use consistent comments, apply clang-format 2023-06-14 03:18:17 -04:00
233fb67eaa Reverted the zero net induced charge constraint, updated the fix polarize doc page for q_scaled and q 2023-06-14 00:28:24 -05:00
03b25dcbaa update error checks 2023-06-13 21:25:58 -04:00
14a27e98c9 fix for when deleting atoms 2023-06-13 21:09:29 -04:00
105ef5f103 Rescaled EPSILON with a length scale (rounded radii) for contact detection 2023-06-13 14:24:12 -05:00
f128de7dd0 Bugfix from @ndtrung81 for indexing bug when tallying per-atom Coulomb energy 2023-06-13 15:13:16 -04:00
64508e08aa pylammps: use library API to return available groups 2023-06-12 22:49:40 -06:00
d7ecf41ff6 pylammps: use library API for variable access 2023-06-12 22:49:40 -06:00
2f7c3bf959 pylammps: reduce dependency to info command output 2023-06-12 22:49:34 -06:00
53f90fff3d final touch 2023-06-12 21:28:51 -04:00
603e397919 get_totalcharge routine 2023-06-12 20:20:45 -04:00
2ba83a4d8f add versionadded keyword 2023-06-12 15:31:37 -04:00
82cea7a546 small doc updates for added pppm_table keyword 2023-06-12 15:31:03 -04:00
90416faf0a Merge branch 'develop' into intel_fixes_2023Jun 2023-06-12 15:18:08 -04:00
bc87c69d60 Merge branch 'python_and_library_fixes' of github.com:rbberger/lammps into python_and_library_fixes 2023-06-11 17:48:26 -06:00
68a73f1c33 library: return atom and force styles via extract_global 2023-06-11 17:46:58 -06:00
c214f654b6 update communicated rxn instances to doubles 2023-06-11 19:27:58 -04:00
23552d4b7a refactor to carry around extra per-reaction values 2023-06-11 17:59:16 -04:00
92e069b19d add fortran unit tests for lammps_last_thermo 2023-06-10 21:36:56 -04:00
62b388b48f consolidate LAMMPS data type constants and enums and use the same names 2023-06-10 19:23:11 -04:00
0dab1910db Small updates to benchmark script in INTEL/TEST 2023-06-10 13:34:16 -07:00
da9637e94c Adding std namespace specifier to transcendentals in intel pkg 2023-06-10 13:33:10 -07:00
acaa2b7f9b pylammps: update email 2023-06-10 11:35:36 -06:00
38fd78b867 factor out variable lcomp 2023-06-10 09:11:09 -06:00
9eb32fc6b0 fix memory allocation runtime error 2023-06-10 07:54:40 -06:00
0e7d91b611 add missing documentation 2023-06-10 07:45:52 -06:00
235e98ee6a pylammps: only capture all thermo if PYTHON package is enabled 2023-06-09 17:40:06 -06:00
fe45b766c3 pylammps: make use of lammps_last_thermo
this now avoids parsing LAMMPS output to extract thermo data, but instead uses
the new lammps_last_thermo library function
2023-06-09 17:40:06 -06:00
ecf7c24e87 Avoid static int in lammps_last_thermo 2023-06-09 17:40:06 -06:00
f6b0981474 Fixing some issues introduced into verlet_lrt_intel.cpp 2023-06-09 14:05:41 -07:00
e0cbcff1f9 Simplying normal force calculation 2023-06-09 10:43:00 -06:00
89b37396eb Merge branch 'BPM' of github.com:jtclemm/lammps into BPM 2023-06-09 09:57:39 -06:00
04a31c33e2 Changing output of fforce in pair granular single() 2023-06-09 09:57:23 -06:00
2cb87bc9a2 Intel package should not reset atom sort frequency if it is 0 (disabled). 2023-06-08 21:47:30 -07:00
54286ce4dd Merge pull request #3781 from akohlmey/collected-small-fixes
Collected small changes and fixes
2023-06-08 22:03:23 -04:00
cbf062f383 Merge pull request #3809 from jtclemm/sdpd-examples
Updating SDPD examples
2023-06-08 20:06:35 -04:00
4cad18a057 document Fortran version of lammps_last_thermo 2023-06-08 19:59:47 -04:00
ce38bb988d add lammps_last_thermo support to swig, plugin and fortran interface 2023-06-08 19:12:59 -04:00
2e1190bfee Fixing issue with when atom styles using torque are mixed with intel pair styles not using torque. Generating runtime error for mixing intel gayberne style with non-ellipsoid intel pair styles. 2023-06-08 15:02:17 -07:00
5d4f9abf5b add unit tests for c-library interface and plain python module 2023-06-08 15:15:28 -04:00
81854cd03e change type keyword to return a pointer to static location for better portability 2023-06-08 14:55:45 -04:00
b093f1aac1 move versionadded tags to the top, replace some missed TBD with version info 2023-06-08 13:11:19 -04:00
3f6032e80d add python module interface to lammps_last_thermo, small consistency fixes 2023-06-08 13:05:37 -04:00
8ddac8cf02 search through the python folders recursive to detect all pending version tags 2023-06-08 12:46:41 -04:00
a2c968386e include versionadded tag 2023-06-08 12:46:00 -04:00
36cac1e83d make sure the field_data vector size always matches the size of the keywords vector 2023-06-08 12:45:41 -04:00
dc9cefbf21 Merge pull request #4 from jibril-b-coulibaly/BPM
clean up documentation for BPM bond styles
2023-06-08 09:08:39 -06:00
d6ad52ea66 allow wildcards with "cutoff" keyword to fix reaxff/species
this also switched to using fmtlib for column aligned output formatting
and re-applies clang-format.
2023-06-08 09:46:33 -04:00
2272d8dd20 add new library interface function to documentation 2023-06-08 09:45:12 -04:00
c851c7304c Update documentation for compute stress/cartesian,
and split the doc page compute_stress_profile into compute_stress_cartesian and compute_stress_curvilinear
2023-06-08 11:03:21 +02:00
dd0bba6ac7 whitespace 2023-06-07 20:37:53 -04:00
7551219d81 correct multitype unittest for -DLAMMPS_SMALLSMALL 2023-06-07 20:16:26 -04:00
9235377b44 Merge branch 'develop' into collected-small-fixes 2023-06-07 20:05:06 -04:00
f3ff8dac66 clean up documentation for BPM bond styles 2023-06-07 16:23:06 -06:00
491e152289 add API to library interface to access last thermo data 2023-06-07 16:21:01 -04:00
de561737a3 update docs 2023-06-07 15:28:35 -04:00
af25bd87fb Merge branch 'develop' into collected-small-fixes 2023-06-07 15:23:54 -04:00
30e6b8b9b6 make more reliable with explicit loops using exported nfield value 2023-06-07 15:19:58 -04:00
620cca34d4 add accessor to nfield, make certain field types are initialized early 2023-06-07 15:19:13 -04:00
b7afe412dc Updating SDPD examples 2023-06-07 13:08:46 -06:00
6360c02daa use explicit const references 2023-06-07 14:04:41 -04:00
5fdba37492 Merge pull request #3807 from jtclemm/BPM
Misc minor patches/features in BPM/Granular packages
2023-06-07 13:55:00 -04:00
2f88153f06 Implementing feature request for runtime control of pppm_table in Intel package. 2023-06-07 10:43:51 -07:00
73693ca25b Merge pull request #3787 from oywg11/ilp-water-graphene
Registry-Dependent Potential for Interfaces of Water with Graphene
2023-06-07 11:48:43 -04:00
f2f8e139d8 Add optional keywords to arguments for ke/pair/bond forces 2023-06-07 16:03:32 +02:00
bb1ff49af6 Corrected bug from f_piston not initialised. Removed superfluous
temp compute id variable name
2023-06-07 14:03:40 +02:00
57f166670f fix versionadded macro so it is detected when actual version is added 2023-06-07 06:38:52 -04:00
37d894db51 update/clarify docs 2023-06-07 06:30:07 -04:00
bd3e7882e6 remove unused include and related statements 2023-06-07 06:25:47 -04:00
f406aa1492 Merge pull request #3792 from evoyiatzis/master
Inclusion of bond & angle contributions to "compute stress/mop"
2023-06-07 06:09:58 -04:00
53b1af7720 LAMMPS programming style/conventions updates 2023-06-07 05:11:53 -04:00
045b230587 Fix shifted coordinates:
Add `boxlo` to the bin centers
2023-06-07 10:43:57 +02:00
0f925f7a39 reformat, add versionadded marker 2023-06-07 04:33:37 -04:00
6c7a5d2f1e Using bigint for Intel package neighbor overflow detection for large local sizes. 2023-06-06 23:56:31 -07:00
bbfd909be6 Adding redundant call to sync Intel package arrays with native arrays for methods such as MC that do not need pre_reverse. 2023-06-06 23:56:16 -07:00
b81b1f5ecc switch dump yaml/netcdf thermo output to use new caching API. remove old API. 2023-06-06 22:40:13 -04:00
74a9cfc110 Merge pull request #3660 from Yi-FanLi/pimd_langevin
Add fix style pimd/langevin
2023-06-06 21:31:28 -04:00
14acb3e0ca add multitype data type and unittest (including tests for ubuf) 2023-06-06 21:29:50 -04:00
f83867787c update error message 2023-06-06 18:17:39 -04:00
5ff6fd9aad rename kBT to kt 2023-06-06 18:14:28 -04:00
a415d732fc rename Langevin init 2023-06-06 18:11:01 -04:00
ee6b12ee30 Correct reference info 2023-06-06 18:04:26 -04:00
0ec5274873 Merge branch 'develop' into BPM 2023-06-06 14:40:51 -06:00
e954d8f050 correctly indicate OPT package version of pair style 2023-06-06 16:11:03 -04:00
eafabf0fb1 update .gitignore 2023-06-06 16:10:11 -04:00
c4d49324b5 various documentation updates
- spelling fixes
- formatting conventions
- grammar fixes and clarifications
- full integration into manual build procedure
2023-06-06 16:08:50 -04:00
170173a213 Merge branch 'develop' of github.com:lammps/lammps into kk_update_4.0 2023-06-06 08:48:41 -06:00
51b45d6830 fix small format issues 2023-06-06 22:16:41 +08:00
f85474c9ec fix a typo 2023-06-06 22:03:33 +08:00
0ef0419a98 rename function names in opt version 2023-06-06 21:45:51 +08:00
9cc6839a8b Merge branch 'develop' into collected-small-fixes 2023-06-06 08:36:25 -04:00
0d7a411123 Merge branch 'NPTLangevin' of github.com:Bibobu/lammps into NPTLangevin 2023-06-06 09:54:16 +02:00
0c2cd80028 Edited the documentation of fix_press_langevin to take changes into
account.
2023-06-06 09:37:34 +02:00
9a585f8204 Change variables names in header for consistency with GJF paper. 2023-06-06 09:14:23 +02:00
a4e7966da5 Fixed some error messages for consistency.
Seed did not need comm->me addition.
2023-06-06 09:11:27 +02:00
409bced5fd update affiliations 2023-06-06 08:35:42 +08:00
c558de3ce0 remove the fprintf debug outputs 2023-06-06 08:27:14 +08:00
0978308f5e Merge pull request #3806 from stanmoore1/kk_update_3.7.2
Update Kokkos library in LAMMPS to v3.7.2
2023-06-05 19:41:34 -04:00
aeab026d66 Update Kokkos arch list 2023-06-05 15:32:26 -06:00
e1573a11a6 Update CMake 2023-06-05 15:07:07 -06:00
8ddd965127 Update Kokkos library in LAMMPS to v4.0.1 2023-06-05 15:03:28 -06:00
39eaab5278 Merge branch 'kk_update_3.7.2' of github.com:stanmoore1/lammps into kk_update_4.0 2023-06-05 11:05:26 -06:00
741db3da28 Merge branch 'develop' of github.com:lammps/lammps into kk_update_4.0 2023-06-05 10:55:24 -06:00
966efd8bd5 Add missed changes 2023-06-05 10:33:30 -06:00
2e09ba2702 Update CMake 2023-06-05 10:08:20 -06:00
a12133ce03 Update Kokkos library in LAMMPS to v3.7.2 2023-06-05 09:59:38 -06:00
8eed55b56c Update compute_stress_mop_profile.cpp 2023-06-05 18:54:26 +03:00
ead5a28d35 Update compute_stress_mop.cpp 2023-06-05 18:53:45 +03:00
a2d58c878b Merge pull request #3803 from rohskopf/sna-kk-switchflag
Fix Kokkos SNAP cutoff factor with `switchflag = 0`
2023-06-05 11:13:00 -04:00
ed9eaadad8 Merge pull request #3804 from xwuupb/develop
Use $t variable in the reaxff HNS example
2023-06-05 10:58:39 -04:00
0cff31060b Update compute_stress_mop.cpp 2023-06-04 16:10:24 +03:00
c25999d208 Update compute_stress_mop_profile.cpp 2023-06-04 16:08:33 +03:00
3782eeee2b remove whitespace from compute_stress_mop.rst 2023-06-04 13:47:54 +03:00
51851c2f4d remove whitespace from compute_stress_mop_profile.cpp 2023-06-04 13:45:52 +03:00
d8fad4db15 remove white space from compute_stress_mop.cpp 2023-06-04 13:45:00 +03:00
a0057d674f Update compute_stress_mop_profile.cpp 2023-06-04 13:40:31 +03:00
3282470cf5 update the citation information 2023-06-04 10:19:13 +08:00
bf8a4402ce update log files in the examples 2023-06-04 10:17:21 +08:00
196641927f correct a typo in the doc file 2023-06-03 23:07:55 +08:00
b5ab173763 update the doc file 2023-06-03 23:03:12 +08:00
63f3d183fe rename log files of examples 2023-06-03 23:02:45 +08:00
f507e30d36 update input files of examples 2023-06-03 22:52:45 +08:00
a40b87b05c rename potential files 2023-06-03 22:46:33 +08:00
738a955c40 fix checkstyle issues 2023-06-03 22:37:57 +08:00
d85342cd6d Update test_compute_global.cpp 2023-06-03 16:04:40 +03:00
a25100120b update the doc file 2023-06-03 20:36:12 +08:00
8c6e2ca000 rename the opt pair style 2023-06-03 20:34:42 +08:00
2e7ca5f65c rename the pair style 2023-06-03 18:14:45 +08:00
250eac93dc fix bug in the reaxff HNS benchmark 2023-06-03 07:34:39 +02:00
a42bfb0e26 Make cutoff factor 1 instead of 0 to prevent zero valued descriptors 2023-06-02 17:26:40 -06:00
241f3b751e Unifying syntax for BPM bond options 2023-06-02 15:45:53 -06:00
40cd3bbdc4 add cache line size padding to avoid false sharing with OPENMP package 2023-06-02 17:13:39 -04:00
390888179f Update compute_stress_mop_profile.cpp 2023-06-02 20:24:32 +03:00
9dc1f45e1e Create/destroy local_contribution 2023-06-02 20:08:59 +03:00
28e3a741a8 declare local_contribution as pointer in compute_stress_mop_profile.h 2023-06-02 20:02:52 +03:00
c30762ca8b Update documentation for compute stress/mop/profile 2023-06-02 19:44:37 +03:00
e7ae02dd2a Code for bond contribution to stress/mop/profile 2023-06-02 19:33:15 +03:00
70507462e9 Include method for bond contribution & variables to compute_stress_mop_profile.h 2023-06-02 19:22:28 +03:00
8ef4e933b2 Fix bug when Kokkos border comm is on host 2023-06-02 10:17:38 -06:00
08ffd268bf remove unused symbolic constant 2023-06-02 09:43:58 +03:00
0d875d4f8f Fixed up kokkos version 2023-06-01 18:51:31 -06:00
710597a353 Made some coding style changes 2023-06-01 17:43:51 -06:00
2c22bb49b4 Added some comments to data members 2023-06-01 12:32:02 -06:00
77340921ff Merge pull request #3800 from jrgissing/fix/deposit-per_atom_property_bug
fix deposit: per atom property bug
2023-06-01 14:19:53 -04:00
869780828b Merge pull request #3802 from stanmoore1/acks2_warnings
Fix (harmless) compiler warnings in Kokkos ACKS2
2023-06-01 12:57:55 -04:00
bda933e0db Merge pull request #3793 from srtee/reaxff-varstyle-efield
Enable `fix qeq/reaxff` with variable `fix efield`
2023-06-01 10:01:56 -04:00
0e4d5f03a1 Merge branch 'lammps:develop' into local-composition 2023-06-01 07:46:15 -06:00
a4f4f965e3 fix a bug in the codes 2023-06-01 21:45:52 +08:00
887534fd02 fix checkstyle 2023-06-01 21:12:11 +08:00
1189661edc revise the code files of standard version based on latest version of LAMMPS 2023-06-01 21:00:16 +08:00
c310616bb7 Update compute_stress_mop.rst to reflect the added keywords 2023-06-01 15:34:41 +03:00
c1cec45652 add keywords to specify contributions to stress/mop 2023-06-01 15:26:43 +03:00
f3bf20be8b The first three p_flags for iso should be 1. 2023-06-01 08:26:02 -04:00
6bc27db58c do not delete c_pe and c_press in destructor 2023-06-01 06:17:11 -04:00
9a389fbac6 fix typo 2023-06-01 03:25:17 -06:00
4ebc8afd1e update documentation 2023-06-01 03:20:43 -06:00
b01db47b2d consistency in issuing errors between mop and mop/profile 2023-06-01 10:33:50 +03:00
ea6ece510e turning warning into errors for unsupported styles 2023-06-01 10:22:01 +03:00
a0461d29dd Update atom.cpp 2023-05-31 17:04:49 -04:00
90e84a6ff8 set up basic KOKKOS file (untested) 2023-05-31 13:32:52 -06:00
1124f7eb93 adjust to one-liner 2023-05-31 13:32:37 -06:00
5f8b0f56a5 Merge pull request #3790 from jrgissing/is_typelabel-function
add is_typelabel() variable function
2023-05-31 15:15:08 -04:00
cae2414126 Fix compiler warnings in Kokkos ACKS2 2023-05-31 13:09:07 -06:00
6138b2b1f7 fix grammar 2023-05-31 13:31:45 -04:00
90000ca166 update docs 2023-05-31 13:29:48 -04:00
cb02563d3d the potential keyword is not (yet) supported by fix efield/tip4p 2023-05-31 13:29:41 -04:00
c0602b6500 make using energy and potential keyword at the same time an error 2023-05-31 13:20:35 -04:00
4073241413 correct docs about label2type() function 2023-05-31 09:57:19 -04:00
69c5493631 silence compiler warning 2023-05-31 09:09:35 -04:00
8602ecd57f update/correct docs 2023-05-31 08:59:36 -04:00
4540427e2b add unit tests for is_typelabel() variable function 2023-05-31 08:50:21 -04:00
70709f2f08 simplify error messages 2023-05-31 08:25:45 -04:00
ddc34e03d6 Revert removal of copies of pointers 2023-05-31 09:50:50 +02:00
9ec55dcb1f silence compiler warning 2023-05-30 19:10:11 -04:00
088d870e20 check remaining per-atom initializations 2023-05-30 17:17:54 -04:00
2a799d45a9 Merge pull request #3795 from jwillma2/develop
Adding carbon SNAP potential files and example
2023-05-30 15:10:58 -04:00
da7a348089 simplify and shorten example, use symlinks, recreate logs 2023-05-30 14:24:32 -04:00
b3e9efcb50 Use system periodicity to find an equivalent position of the plane 2023-05-29 17:55:24 +03:00
3b38145d91 Update compute_stress_mop.cpp
Fixing sign issues because I was considering the theta angle to be formed by vectors x[atom2] - x[atom1] & x[atom3] - x[atom2] instead of x[atom1] - x[atom2] & x[atom3] - x[atom2] as done in lammps
2023-05-29 16:34:44 +03:00
86743bc0a6 Update compute_stress_mop.cpp
The angle was computed using the dot product of the vectors x[atom2] - x[atom1] and x[atom3] - x[atom2]. This is not consistent with the lammps convention where the angle is computed using the dot product between x[atom1]-x[atom2] and x[atom3]-x[atom2].
2023-05-29 10:59:18 +03:00
c934208a4a only update ivector if it still exists 2023-05-28 14:07:25 -04:00
f9ee2ad42b reorder thermo and dump output so dump styles include correct thermo data 2023-05-28 11:49:02 -04:00
f69b50408d improve error messages 2023-05-28 11:47:32 -04:00
4c4eb6ee1e improve error message 2023-05-28 00:49:52 -04:00
b28ee36f00 update documentation for compute stress/mop 2023-05-27 14:50:31 +03:00
458cce7699 Updating unit test for mop to reflect the contribution from bonds 2023-05-27 14:33:46 +03:00
01b481ec4f Small tweaks 2023-05-26 15:27:15 -07:00
16751b06b3 Add os env vars to allow more MPI procs 2023-05-26 12:52:51 -06:00
b5a1c6d47f Declare update per atom function 2023-05-26 11:25:29 -06:00
2e68930f2a Format readme 2023-05-26 11:21:13 -06:00
87850f31ca Add Kokkos instructions 2023-05-26 11:18:37 -06:00
fd87c1464a Merge branch 'jax' of https://github.com/rohskopf/lammps into jax 2023-05-26 10:49:30 -06:00
49b2c299a7 Add Kokkos example 2023-05-26 10:48:58 -06:00
6eb586e66f update_atom_energy initial 2023-05-25 21:03:32 -04:00
b7146c900f Add instructions 2023-05-25 18:58:56 -06:00
ff7bae1739 Add Kokkos getters 2023-05-25 18:43:18 -06:00
3d8df660c3 make rigid water examples more realistic and consistent. avoid warnings. 2023-05-25 18:08:42 -04:00
4174116014 Fix 1/2 factor in energy 2023-05-25 16:02:45 -06:00
3012426bd5 send eij to LAMMPS 2023-05-25 17:49:02 -04:00
1fd34ffac6 Update 2023-05-25 14:49:38 -06:00
edfb8cf100 Fixing double mixing of normal coeffs 2023-05-25 13:54:12 -06:00
58ee392579 Merge pull request #3 from akohlmey/pimd_langevin
Update to current develop and some cosmetic changes
2023-05-25 15:49:34 -04:00
ceed30e7c6 Fixing mistakes in doc pages 2023-05-25 12:58:57 -06:00
40056e29a4 move reset of lcomp array to correct scope 2023-05-25 11:58:02 -06:00
f26f397e08 avoid crashing when there are no bonds or no angles 2023-05-25 14:47:20 +03:00
8e6615918b avoid crashing when no bonds or no angles exist 2023-05-25 14:39:03 +03:00
35a55068d7 Add input padded rij from LAMMPS Cython side 2023-05-25 01:35:08 -06:00
29ba0e3f18 Update MLIAP JAX example to use jax.grad 2023-05-24 18:15:56 -07:00
a0a0812ebf Added link to fix press/berendsen and fixed minor typos 2023-05-24 14:33:34 -06:00
d9937fc2c6 add base tested code 2023-05-24 13:16:08 -06:00
b2e5f93d49 Use jax functions 2023-05-24 13:08:10 -06:00
d66504be81 Properly decorate energy/force compute 2023-05-24 11:39:05 -06:00
74d89c4c9b init 2023-05-24 11:07:03 -06:00
e246864682 Refactor compute_array() and compute_pressure():
Remove unnecessary copies of variables, declare variables locally so they are properly scoped
2023-05-24 17:03:57 +02:00
ecca46acf9 Include bond interactions in force 2023-05-24 17:03:33 +02:00
9ee40cceef fixing indexing issue and more sign problems for angle contributions 2023-05-24 17:01:13 +03:00
c7c8b065a2 fixing bug with sign issue for bond contribution in compute_stress_mop.cpp 2023-05-24 16:49:35 +03:00
25bff3e4ed fixing bug with sign for angle contribution in compute_stress_mop.cpp 2023-05-24 16:24:33 +03:00
df708a67a5 Code for angle contribution to stress/mop 2023-05-24 11:55:08 +03:00
0692ed3bd7 @evoyiatzis Include method for angle contribution & variables to compute_stress_mop.h 2023-05-24 11:47:15 +03:00
2855f18d02 Delete C_Willman_PRB2022.quadratic.snapparam 2023-05-23 12:58:34 -04:00
c95dcd7582 Delete C_Willman_PRB2022.quadratic.snapcoeff 2023-05-23 12:58:19 -04:00
a701a5e6cc Merge branch 'akohlmey:develop' into develop 2023-05-23 12:56:14 -04:00
0510ce7372 Carbon SNAP potential and example added 2023-05-23 12:29:25 -04:00
d190249e98 add documentation and checks 2023-05-22 00:10:01 +10:00
685255083e clean the duplicate info 2023-05-21 11:43:39 +08:00
91ac9ef3fc update doc file 2023-05-21 11:29:28 +08:00
276bc39a51 delete rst 2023-05-21 11:02:17 +08:00
3822e6ff0f add potential file that parameterized against with DMC reference data 2023-05-21 10:29:24 +08:00
28c9c274be Copy MLIAPUnified LJ example 2023-05-20 14:08:20 -06:00
6977f71eb0 Initial example 2023-05-20 13:53:22 -06:00
1d7a6f813b Update compute_stress_mop.cpp 2023-05-20 15:14:47 +03:00
90427c8750 Update compute_stress_mop.cpp 2023-05-20 15:12:42 +03:00
5da65bbd0a Code for bond contribution to stress/mop 2023-05-20 13:06:19 +03:00
36eb11f499 Include method for bond contribution & variables to compute_stress_mop.h 2023-05-20 12:59:34 +03:00
68ec36b006 Added the flip keyword to the documentation of fix_press_langevin. 2023-05-20 09:16:30 +02:00
9440f26355 Merge branch 'develop' of github.com:lammps/lammps into NPTLangevin 2023-05-20 08:59:29 +02:00
93402f61d8 Updated the documentation to include triclinic commands and other info. 2023-05-20 08:58:52 +02:00
fe7a6fce29 make QEQ work with atom-style potential 2023-05-20 14:33:24 +10:00
8d0eb9b1f7 hook up efield variables to qeq/reaxff 2023-05-20 14:10:07 +10:00
5fac8f483e last typo 2023-05-19 23:51:01 -04:00
d7b7d1d323 make sure error messages not wrong 2023-05-19 23:48:41 -04:00
aaabe41b22 typo 2023-05-19 22:54:23 -04:00
ad7b27a67a correct logic 2023-05-19 22:27:28 -04:00
0a45d1f9ac Update variable.rst 2023-05-19 21:31:51 -04:00
b9f01f106e is_typelabel function 2023-05-19 21:20:34 -04:00
0dd26189d4 Adding missing factor in bpm/rotational single method 2023-05-19 13:52:35 -06:00
cb5934cbcd Adding option to doc files, clarifying normal forces in compute pair/bond local 2023-05-19 13:51:53 -06:00
7ec842d9cb Adding requested feature to normalize forces 2023-05-19 13:50:11 -06:00
0334ddb7c6 Update pair_ilp_water_2dm.rst 2023-05-19 22:57:45 +08:00
22d9c047f4 update doc file 2023-05-19 22:52:18 +08:00
ab925000fe Added triclinic and relative remap functions to press/langevin files 2023-05-19 16:34:42 +02:00
7c14b750ef improve error message 2023-05-19 00:40:54 -04:00
9da310a33e spelling 2023-05-19 00:40:45 -04:00
842016e997 Merge branch 'develop' into collected-small-fixes 2023-05-19 00:13:15 -04:00
ed03d04a70 Merge pull request #3779 from lammps/fix-ttm-mod-arrays
Reorder fix ttm/mod 3d arrays to be consistent with fix ttm and fix ttm/grid
2023-05-18 18:33:25 -04:00
c73b7483b2 swtich loop order back to be consistent with rest of file 2023-05-18 11:47:20 -06:00
af71279df1 Merge branch 'fix-ttm-mod-arrays' of github.com:lammps/lammps into fix-ttm-mod-arrays 2023-05-18 11:44:31 -06:00
50858205f6 refresh log files for fix ttm/mod example 2023-05-18 11:43:54 -06:00
bbff6c25b3 add examples 2023-05-18 22:01:19 +08:00
3d35d68a4b add doc file 2023-05-18 22:00:03 +08:00
af04ecc532 add potential file 2023-05-18 21:59:07 +08:00
cc30c4478d add optmized verion of ilp_water_2dm 2023-05-18 21:58:40 +08:00
81a497adcd add standard version of ilp_water_2dm 2023-05-18 21:51:53 +08:00
6585151ce1 reorder loops to compute properties vector 2023-05-17 22:04:32 -04:00
d206f583c4 whitespace 2023-05-17 21:57:14 -04:00
f1aca8b71a formatting tweaks 2023-05-17 16:39:14 -06:00
d8ca6274e7 Merge branch 'develop' into pimd_langevin 2023-05-17 18:26:59 -04:00
10880332ed Merge pull request #3783 from Colvars/colvars-update
Update Colvars library to version 2023-05-01
2023-05-17 18:26:41 -04:00
5d66dc6659 apply clang-format 2023-05-17 17:50:15 -04:00
79f3eb6a4d remove debug code 2023-05-17 17:35:22 -04:00
8736f97792 remove dead code 2023-05-17 17:35:14 -04:00
39f61b6af3 Merge branch 'develop' into pimd_langevin 2023-05-17 17:30:49 -04:00
5be9eda905 Merge pull request #3780 from srtee/patch-3
Bugfix fix_efield.cpp for atom-style energy
2023-05-17 16:33:37 -04:00
377c652a83 Update Colvars library to version 2023-05-01
This update consists exclusively of bugfixes or maintenance-related changes.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Change-Id: Iaaf34f7560c37e0a2a34e980761246d3ef42be99
2023-02-03 14:53:34 -05:00
fd1823a890 more debugging 2023-02-03 08:00:58 -07:00
751e33c70e more LATTE refactoring and debugging 2023-02-02 18:16:45 -07:00
56ca901cdb Implement a "caching in LDS" approach for EAM to improve performance on HIP
- Use a TeamPolicy rather than a RangePolicy to expose scratch
	- Team cooperates to load row-zero of spline into LDS
	- At runtime, decide whether value can be 'cached' in LDS, and conditionally load from LDS based on this

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

Change-Id: Ie4254c8db1a7b14abafffe2b581014c5137bf7ed
2023-02-02 16:35:28 -05:00
12079c32de Merge branch 'develop' into fix-mdi-qmmm 2023-02-02 13:10:55 -07:00
b3262684af more LATTE debugging 2023-02-01 17:15:25 -07:00
c53ea66f39 debgging for LATTE 2023-02-01 14:20:27 -07:00
090e61f0ec more debugging 2023-02-01 11:31:15 -07:00
a81e6693cd more work on LATTE interface 2023-02-01 10:53:08 -07:00
2b5ef8d93e add plugin input script 2023-01-31 16:04:59 -07:00
018a815398 start work on LATTE wrapper 2023-01-31 16:02:55 -07:00
7c9068c34a correct nonPBC vs PBC calls to PySCF 2023-01-31 13:31:42 -07:00
b4ac95b225 add support for NWChem in examples/QUANTUM 2023-01-31 12:40:54 -07:00
dc5980ab7e coments 2023-01-31 08:04:25 -07:00
be22256765 edits 2023-01-31 07:44:23 -07:00
e7bcdc63e5 add instructions for running 2-water QMMM PySCF problem 2023-01-31 07:43:20 -07:00
3b2647917f add PySCF to renamed examples/QUANTUM dir 2023-01-30 15:45:07 -07:00
092a67ab93 debug 2023-01-30 15:41:25 -07:00
243fcbf47d more debugging 2023-01-30 14:08:18 -07:00
8bc8f3eb4c debugging 2023-01-27 12:20:30 -07:00
bc567ac406 added more MM suppport for direct method 2023-01-25 16:23:17 -07:00
07c17d4e63 debugging on coupled mode 2023-01-20 15:49:29 -07:00
2695ecbc07 updates to fix mdi/qmmm 2023-01-20 14:22:20 -07:00
4d7a5fb225 support two modes of QMMM coupling 2023-01-18 16:19:19 -07:00
25a8e08703 Merge branch 'develop' into fix-mdi-qmmm 2023-01-18 15:19:57 -07:00
420606658b Merge branch 'develop' into granular-kokkos 2023-01-17 08:20:35 -07:00
f175a15627 Merge branch 'develop' into gran-temp 2023-01-10 09:58:50 -07:00
1234f7d16d more work on fix mdi/qmmm 2022-12-21 11:50:58 -07:00
249773e08c adding fix mdi/qmmm command 2022-12-21 10:11:20 -07:00
0f9a36a171 Merge branch 'develop' of github.com:lammps/lammps into develop 2022-12-09 10:40:54 +01:00
531912a3c8 Merge branch 'gran-temp' of github.com:jtclemm/lammps into gran-temp 2022-12-07 11:42:48 -07:00
f2d866420a Updated examples 2022-12-07 11:41:53 -07:00
6c3ebc19b7 Merge branch 'develop' into gran-temp 2022-11-30 08:54:19 -05:00
e8c271cc16 update python to version to 3.11 and disable png/jpeg for now 2022-11-29 17:54:27 -05:00
1a467233fb adding examples, fixing wall algebra, updating labels 2022-11-29 12:24:43 -07:00
8026845346 Merge branch 'develop' of github.com:lammps/lammps into develop 2022-11-21 15:26:17 +01:00
f51ab2c440 Restarting limit_damping, other minor simplifications/cleanups 2022-11-16 16:36:22 -07:00
5f0fff58ac fixing broken doc references 2022-11-14 21:16:03 -07:00
b2c5c1fda4 Fixing cmake style header 2022-11-10 21:06:47 -07:00
d6b5878dce Adding/removing underscores 2022-11-10 16:25:34 -07:00
d1dd8d3c11 Renaming files/classes, other small, misc updates 2022-11-10 16:06:36 -07:00
ea8ded470b Removing vectors to avoid resizing issues with coeff redefinitions 2022-11-09 10:17:07 -07:00
971b932387 Adding area flag for submodels 2022-11-07 17:39:40 -07:00
a1db5fda70 Simplifying variables and logic 2022-11-07 11:30:12 -07:00
cd658e6779 Fixing few bugs with histories, removing indices from granular model 2022-11-07 10:41:09 -07:00
bc74fef3f4 Fixing memory leaks, misc clean ups, adding cohesive flag to Tsuji 2022-11-02 21:11:30 -06:00
871efda589 a few formal changes and spelling updates 2022-11-02 20:39:10 -04:00
b5d57531d9 complete integration into the manual build process 2022-11-02 20:38:43 -04:00
3561bbe887 simplify 2022-11-02 20:20:56 -04:00
74122040a3 add cmake support for generating gsm style header file 2022-11-02 20:20:06 -04:00
4dcf8c99de Merge branch 'develop' into gran-temp 2022-11-02 19:53:27 -04:00
95a8d2cc25 Patching pair tracker 2022-11-02 15:38:12 -06:00
f671cd7765 Merge branch 'develop' into gran-temp 2022-11-01 14:10:28 -06:00
88be5a3781 Minor fixes to doc pages 2022-11-01 14:01:07 -06:00
c8347df494 Removing knfac from documentation 2022-11-01 13:34:07 -06:00
dca901617e Removing knfac, removing unnecessary global variables, updating dev ref text 2022-11-01 13:30:57 -06:00
5dcbbc084b Adding developers documentation page 2022-11-01 13:30:24 -06:00
f66179f336 Removing old contact files, fixing capitalization in dump_custom.cpp 2022-10-28 16:38:32 -06:00
1eb048ef93 Adding granular sub model style creator 2022-10-28 16:00:04 -06:00
955fbe46d1 Renaming classes, adjusting initialization 2022-10-26 22:25:58 -06:00
20fd34a55c Fix swapped buffer 2022-10-21 21:13:05 -06:00
ca34dccec0 Merge branch 'develop' of github.com:lammps/lammps into granular-kokkos 2022-10-20 15:03:54 -06:00
4f2e0147e0 Merge branch 'doc-fixes' of github.com:hammondkd/lammps into doc-fixes 2022-10-19 10:29:30 -05:00
c07f5e8339 Temporary(?) fix for highlighting overflow in labelmap.rst 2022-10-19 10:29:18 -05:00
e73d27cfa4 Fix runtime error 2022-10-14 15:56:22 -06:00
8242559377 A few more optimizations to pair_gran_hooke_history_kokkos 2022-10-14 15:22:18 -06:00
85726b7ce2 Optimize FixNeighHistoryKokkos 2022-10-14 14:22:08 -06:00
bf42f06a39 Optimizations for pair_gran_hooke_history_kokkos 2022-10-14 12:35:32 -06:00
dc6fc3ec03 Fix compile error 2022-10-13 12:35:13 -06:00
2f4fd62aed Whack errordocs 2022-10-12 17:23:57 -06:00
76220727c8 Whitespace, etc. 2022-10-12 17:20:16 -06:00
ba468fffcc Update to latest develop, fix merge conflicts 2022-10-12 17:08:48 -06:00
a3839cd07a Merge branch 'develop' of github.com:lammps/lammps into develop 2022-10-12 13:20:09 +02:00
57d2086a5c Merge branch 'develop' of github.com:lammps/lammps into develop 2022-09-28 10:04:00 +02:00
cca7a53132 Patching heat implementation and adding example 2022-09-25 14:53:53 -06:00
dc1b7d4cfe Fixing mathematical errors in force/torque calculations 2022-09-21 16:31:18 -06:00
13be68aece Fixing argument errors and adding note on datafiles to doc 2022-09-19 22:14:59 -06:00
7f16225ffb Removing leftover file 2022-09-16 16:57:32 -06:00
c9ba3f4157 Adding classic tangential models 2022-09-16 16:56:20 -06:00
71db9f5e75 Fixing tangential damping coefficient 2022-09-16 14:16:34 -06:00
b61cfb7480 Fixing errors in gran/wall reff calculation and adding heat capabilities 2022-09-16 09:06:52 -06:00
038f4a5210 Adding variable temperature to fix gran/wall, misc fixes/updates 2022-09-14 21:40:00 -06:00
06953bd67a Adding none submodels, further cleaning up mixing, misc edits 2022-09-09 17:12:51 -06:00
6a6291827f Simplifying mixing coeffs, other misc clean ups 2022-09-09 15:11:24 -06:00
3df0abd081 Debugging restarts 2022-09-09 14:13:52 -06:00
1cd18d2b37 Replacing # of models with macro, may revise... 2022-08-24 14:47:10 -06:00
c5da64ccea Fixing merge conflicts 2022-08-24 12:22:00 -06:00
92c10cc210 Fixing memory issues, passing lmp ptr to submodels, and other misc fixes/changes 2022-08-24 12:19:27 -06:00
12c1923511 Updating mixing 2022-08-12 17:36:53 -06:00
454f6b6c0d Merge branch 'develop' of github.com:lammps/lammps into develop 2022-08-09 15:05:41 +02:00
df22b91ac3 Updating coeff parsing, first pass on fix wall/gran, misc fixes 2022-08-08 08:01:48 -06:00
22de863da9 Fixing compilation errors and finishing model classes 2022-08-01 13:12:44 -06:00
673823dd82 Merge branch 'develop' of github.com:lammps/lammps into develop 2022-07-31 12:52:52 +02:00
8557ce7c97 Adding normal, damping, and tangential sub models 2022-07-15 17:57:38 -06:00
6a1a06d76c Take 2 2022-07-15 12:30:30 -06:00
6dae78f900 Merge pull request #2 from dsbolin/gran-modular
Pulling in Dan's re-refactor
2022-07-14 12:40:06 -06:00
6b40ae29e4 First stab 2022-07-14 11:29:13 -06:00
bb92dae6d3 Simplying conduction 2022-07-05 10:12:12 -06:00
ba1c4e8e81 Defining conduction from area, a 2022-06-29 15:34:39 -06:00
222c40ebcf Fixing memory errors 2022-06-29 15:02:05 -06:00
1faa7397d3 Fixing complier issues, adding dump options, initail conduction 2022-06-18 10:11:57 -06:00
468a6d9f29 creating ContactModel class 2022-06-16 14:27:57 -06:00
68e00a60bd Fixing rare bug in writing restart files with history 2022-06-15 12:37:02 -06:00
c0078fda05 Begin refactoring of pair granular 2022-06-14 09:27:14 -06:00
66188d9d57 unified naming scheme 2022-06-13 09:00:15 -06:00
c6d59fc526 adding documentation and integration fix 2022-06-12 10:09:26 -06:00
e01ef14025 Adding documentation and integration fix 2022-06-12 10:06:16 -06:00
783cb117c5 Merge branch 'develop' of github.com:lammps/lammps into develop 2022-06-09 14:21:27 +02:00
cb7db85096 Merge branch 'develop' of github.com:lammps/lammps into develop 2022-05-13 13:44:04 +02:00
15f0a63260 Merge branch 'develop' of github.com:lammps/lammps into develop 2022-05-06 10:04:49 +02:00
662cfca43b Merge branch 'develop' of github.com:lammps/lammps into develop 2022-05-02 13:07:26 +02:00
3d3cca2964 Merge branch 'develop' of github.com:lammps/lammps into develop 2022-04-28 22:50:54 +02:00
e0c0739b11 Merge branch 'develop' of github.com:lammps/lammps into develop 2022-02-15 15:15:59 +01:00
21c0702917 Merge pull request #1 from Bibobu/EAM_alloy_python_script
Added Python version of Zhou04_create_v2.f: create_eam.py and eamData…
2022-02-12 12:51:17 +01:00
7a457c143c Fixing missing template keyword when calling method. 2019-03-28 21:40:23 +00:00
661cfef0fb Merge branch 'master' of https://github.com/lammps/lammps into granular-kokkos 2019-03-28 19:34:17 +00:00
4349750e31 Fixing issue with destructor not verifying if pointer was null. 2019-03-28 19:20:49 +00:00
eb38f7404c Adding fix wall/gran for kokkos. Just hooke/history style for now. 2019-03-28 19:19:50 +00:00
4908f7f93a Fixing issue with FixNeighHistoryKokkos::unpack_exchange_kokkos not considering arbitrary pack sizes. 2019-03-28 19:18:03 +00:00
01399a4f09 Merge tag 'patch_28Feb2019' of https://github.com/lammps/lammps into granular-kokkos
patch 28Feb19
2019-03-15 14:33:50 +00:00
0bf48ac47f Implementing comm exchange on device for fixes. 2018-10-19 17:14:01 +01:00
93f149951e Merge branch 'granular-kokkos' of https://github.com/valleymouth/lammps into granular-kokkos 2018-10-15 15:34:28 +01:00
55cc76bac7 Merge branch 'comm_kokkos' into granular-kokkos 2018-10-15 15:33:59 +01:00
9cc72ab3a0 Implementing FixNeighHistoryKokkos using Kokkos communication. 2018-10-15 15:33:23 +01:00
3971 changed files with 233021 additions and 200724 deletions

9
.github/CODEOWNERS vendored
View File

@ -61,12 +61,14 @@ src/GPU/pair_vashishta_gpu.* @andeplane
src/KOKKOS/pair_vashishta_kokkos.* @andeplane
src/MANYBODY/pair_vashishta_table.* @andeplane
src/MANYBODY/pair_atm.* @sergeylishchuk
src/MANYBODY/pair_nb3b_screened.* @flodesani
src/REPLICA/*_grem.* @dstelter92
src/EXTRA-COMPUTE/compute_stress_mop*.* @RomainVermorel
src/EXTRA-COMPUTE/compute_born_matrix.* @Bibobu @athomps
src/MISC/*_tracker.* @jtclemm
src/MC/fix_gcmc.* @athomps
src/MC/fix_sgcmc.* @athomps
src/REPLICA/fix_pimd_langevin.* @Yi-FanLi
# core LAMMPS classes
src/lammps.* @sjplimp
@ -134,6 +136,7 @@ src/timer.* @akohlmey
src/utils.* @akohlmey @rbberger
src/verlet.* @sjplimp @stanmoore1
src/math_eigen_impl.h @jewettaij
src/fix_press_langevin.* @Bibobu
# tools
tools/coding_standard/* @akohlmey @rbberger
@ -150,12 +153,12 @@ tools/vim/* @hammondkd
unittest/* @akohlmey
# cmake
cmake/* @junghans @rbberger
cmake/* @akohlmey
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 @giacomofiorin
cmake/Modules/Packages/KIM.cmake @ellio167
cmake/presets/*.cmake @akohlmey
# python

View File

@ -1,13 +1,13 @@
# 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.
Thus please also have a look at:
* [The guide for submitting new features in the LAMMPS manual](https://www.lammps.org/doc/Modify_contribute.html)
* [The guide on programming style and requirement in the LAMMPS manual](https://www.lammps.org/doc/Modify_style.html)
* [The GitHub tutorial in the LAMMPS manual](http://lammps.sandia.gov/doc/Howto_github.html)
* [The guide for submitting new features in the LAMMPS manual](https://docs.lammps.org/Modify_contribute.html)
* [The guide on programming style and requirement in the LAMMPS manual](https://docs.lammps.org/Modify_requirements.html)
* [The GitHub tutorial in the LAMMPS manual](http://docs.lammps.org/Howto_github.html)
## Table of Contents
@ -27,17 +27,17 @@ __
## I don't want to read this whole thing I just have a question!
> **Note:** Please do not file an issue to ask a general question about LAMMPS, its features, how to use specific commands, or how perform simulations or analysis in LAMMPS. Instead post your question to either the ['lammps-users' mailing list](https://lammps.sandia.gov/mail.html) or the [LAMMPS Material Science Discourse forum](https://matsci.org/lammps). You do not need to be subscribed to post to the list (but a mailing list subscription avoids having your post delayed until it is approved by a mailing list moderator). Most posts to the mailing list receive a response within less than 24 hours. Before posting to the mailing list, please read the [mailing list guidelines](https://lammps.sandia.gov/guidelines.html). Following those guidelines will help greatly to get a helpful response. Always mention which LAMMPS version you are using. The LAMMPS forum was recently created as part of a larger effort to build a materials science community and have discussions not just about using LAMMPS. Thus the forum may be also used for discussions that would be off-topic for the mailing list. Those will just have to be posted to a more general category.
> **Note:** Please do not file an issue to ask a general question about LAMMPS, its features, how to use specific commands, or how perform simulations or analysis in LAMMPS. Instead post your question to the [LAMMPS Material Science Discourse forum](https://matsci.org/lammps). Before posting to the forum, please read the general [guidelines](https://www.lammps.org/guidelines.html) and the forum specific [suggestions](https://matsci.org/t/please-read-this-first-guidelines-and-suggestions-for-posting-lammps-questions/49913). Following those guidelines and suggestions will help greatly to get a helpful response. *Always* mention which LAMMPS version you are using. The MatSci website may be also used for discussions that would be off-topic for the LAMMPS categories. Those will just have to be posted to a different category.
## How Can I Contribute?
There are several ways how you can actively contribute to the LAMMPS project: you can discuss compiling and using LAMMPS, and solving LAMMPS related problems with other LAMMPS users on the lammps-users mailing list or the forum, you can report bugs or suggest enhancements by creating issues on GitHub (or posting them to the lammps-users mailing list or posting in the LAMMPS Materials Science Discourse forum), and you can contribute by submitting pull requests on GitHub or e-mail your code
to one of the [LAMMPS core developers](https://lammps.sandia.gov/authors.html). As you may see from the aforementioned developer page, the LAMMPS software package includes the efforts of a very large number of contributors beyond the principal authors and maintainers.
to one of the [LAMMPS core developers](https://www.lammps.org/authors.html). As you may see from the aforementioned developer page, the LAMMPS software package includes the efforts of a very large number of contributors beyond the principal authors and maintainers.
### Discussing How To Use LAMMPS
The LAMMPS mailing list is hosted at SourceForge. The mailing list began in 2005, and now includes tens of thousands of messages in thousands of threads. LAMMPS developers try to respond to posted questions in a timely manner, but there are no guarantees. Please consider that people live in different timezone and may not have time to answer e-mails outside of their work hours.
You can post to list by sending your email to lammps-users at lists.sourceforge.net (no subscription required), but before posting, please read the [mailing list guidelines](https://lammps.sandia.gov/guidelines.html) to maximize your chances to receive a helpful response.
You can post to list by sending your email to lammps-users at lists.sourceforge.net (no subscription required), but before posting, please read the [mailing list guidelines](https://www.lammps.org/guidelines.html) to maximize your chances to receive a helpful response.
Anyone can browse/search previous questions/answers in the archives. You do not have to subscribe to the list to post questions, receive answers (to your questions), or browse/search the archives. You **do** need to subscribe to the list if you want emails for **all** the posts (as individual messages or in digest form), or to answer questions yourself. Feel free to sign up and help us out! Answering questions from fellow LAMMPS users is a great way to pay back the community for providing you a useful tool for free, and to pass on the advice you have received yourself to others. It improves your karma and helps you understand your own research better.
@ -47,7 +47,7 @@ The LAMMPS Materials Science Discourse forum was created recently to facilitate
### Reporting Bugs
While developers writing code for LAMMPS are careful to test their code, LAMMPS is such a large and complex software, that it is impossible to test for all combinations of features under all normal and not so normal circumstances. Thus bugs do happen, and if you suspect, that you have encountered one, please try to document it and report it as an [Issue](https://github.com/lammps/lammps/issues) on the LAMMPS GitHub project web page. However, before reporting a bug, you need to check whether this is something that may have already been corrected. The [Latest Features and Bug Fixes in LAMMPS](https://lammps.sandia.gov/bug.html) web page lists all significant changes to LAMMPS over the years. It also tells you what the current latest development version of LAMMPS is, and you should test whether your issue still applies to that version.
While developers writing code for LAMMPS are careful to test their code, LAMMPS is such a large and complex software, that it is impossible to test for all combinations of features under all normal and not so normal circumstances. Thus bugs do happen, and if you suspect, that you have encountered one, please try to document it and report it as an [Issue](https://github.com/lammps/lammps/issues) on the LAMMPS GitHub project web page. However, before reporting a bug, you need to check whether this is something that may have already been corrected. The [Latest Features and Bug Fixes in LAMMPS](https://www.lammps.org/bug.html) web page lists all significant changes to LAMMPS over the years. It also tells you what the current latest development version of LAMMPS is, and you should test whether your issue still applies to that version.
When you click on the green "New Issue" button, you will be provided with a text field, where you can enter your message. That text field with contain a template with several headlines and some descriptions. Keep the headlines that are relevant to your reported potential bug and replace the descriptions with the information as suggested by the descriptions.
You can also attach small text files (please add the file name extension `.txt` or it will be rejected), images, or small compressed text files (using gzip, do not use RAR or 7-ZIP or similar tools that are uncommon outside of Windows machines). In many cases, bugs are best illustrated by providing a small input deck (do **not** attach your entire production input, but remove everything that is not required to reproduce the issue, and scale down your system size, that the resulting calculation runs fast and can be run on small desktop quickly).
@ -65,9 +65,9 @@ To be able to submit an issue on GitHub, you have to register for an account (fo
We encourage users to submit new features or modifications for LAMMPS. Instructions, guidelines, requirements,
and recommendations are in the following sections of the LAMMPS manual:
* [The guide for submitting new features in the LAMMPS manual](https://lammps.sandia.gov/doc/Modify_contribute.html)
* [The guide on programming style and requirement in the LAMMPS manual](https://lammps.sandia.gov/doc/Modify_contribute.html)
* [The GitHub tutorial in the LAMMPS manual](http://lammps.sandia.gov/doc/Howto_github.html)
* [The guide for submitting new features in the LAMMPS manual](https://docs.lammps.org/Modify_contribute.html)
* [The guide on programming style and requirement in the LAMMPS manual](https://docs.lammps.org/Modify_requirements.html)
* [The GitHub tutorial in the LAMMPS manual](http://docs.lammps.org/Howto_github.html)
## GitHub Workflows
@ -85,7 +85,7 @@ For bug reports, the next step is that one of the core LAMMPS developers will se
### Pull Requests
Pull requests are the **only** way that changes get made to the LAMMPS distribution. So also the LAMMPS core developers will submit pull requests for their own changes and discuss them on GitHub. Thus if you submit a pull request it will be treated in a similar fashion. When you submit a pull request you may opt to submit a "Draft" pull request. That means your changes are visible and will be subject to testing, but reviewers will not be (auto-)assigned and comments will take into account that this is not complete. On the other hand, this is a perfect way to ask the LAMMPS developers for comments on non-obvious changes and get feedback and possible suggestions for improvements or recommendations about what to avoid.
Immediately after the submission, the LAMMPS continuing integration server at ci.lammps.org will download your submitted branch and perform a number of tests: it will tests whether it compiles cleanly under various conditions, it will also do a check on whether your included documentation translates cleanly and run some unit tests and other checks. Whether these tests are successful or fail will be recorded. If a test fails, please inspect the corresponding output on the CI server and take the necessary steps, if needed, so that the code can compile cleanly again. The test will be re-run each time the pull request is updated with a push to the remote branch on GitHub. If you are unsure about what you need to change, ask a question in the discussion area of the pull request.
Immediately after the submission, the LAMMPS continuing integration server at https://ci.lammps.org will download your submitted branch and perform a number of tests: it will tests whether it compiles cleanly under various conditions, it will also do a check on whether your included documentation translates cleanly and run some unit tests and other checks. Whether these tests are successful or fail will be recorded. If a test fails, please inspect the corresponding output on the CI server and take the necessary steps, if needed, so that the code can compile cleanly again. The test will be re-run each time the pull request is updated with a push to the remote branch on GitHub. If you are unsure about what you need to change, ask a question in the discussion area of the pull request.
Next a LAMMPS core developer will self-assign and do an overall technical assessment of the submission. If you submitted a draft pull request, this will not happen unless you mark it "ready for review". If you are not yet invited as a LAMMPS collaborator, and your contribution seems significant, you may also receive an invitation for collaboration on the LAMMPS repository. As part of the assessment, the pull request will be categorized with labels. There are two special labels: `needs_work` (indicates that work from the submitter of the pull request is needed) and `work_in_progress` (indicates, that the assigned LAMMPS developer will make changes, if not done by the contributor who made the submit).
You may also receive comments and suggestions on the overall submission or specific details and on occasion specific requests for changes as part of the review. If permitted, also additional changes may be pushed into your pull request branch or a pull request may be filed in your LAMMPS fork on GitHub to include those changes.
The LAMMPS developer may then decide to assign the pull request to another developer (e.g. when that developer is more knowledgeable about the submitted feature or enhancement or has written the modified code). It may also happen, that additional developers are requested to provide a review and approve the changes. For submissions, that may change the general behavior of LAMMPS, or where a possibility of unwanted side effects exists, additional tests may be requested by the assigned developer.

View File

@ -25,7 +25,7 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 2

View File

@ -19,7 +19,7 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 2

View File

@ -16,7 +16,7 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 2

View File

@ -21,7 +21,7 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 2

3
.gitignore vendored
View File

@ -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

View File

@ -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.

View File

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

View File

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

View File

@ -1,8 +1,8 @@
# -*- CMake -*- master configuration file for building LAMMPS
########################################
# CMake build system
# This file is part of LAMMPS
# Created by Christoph Junghans and Richard Berger
cmake_minimum_required(VERSION 3.10)
cmake_minimum_required(VERSION 3.16)
########################################
# set policy to silence warnings about ignoring <PackageName>_ROOT but use it
if(POLICY CMP0074)
@ -12,22 +12,11 @@ endif()
if(POLICY CMP0075)
cmake_policy(SET CMP0075 NEW)
endif()
# set policy to silence warnings about missing executable permissions in
# pythonx.y-config when cross-compiling. review occasionally if it may be set to NEW
if(POLICY CMP0109)
cmake_policy(SET CMP0109 OLD)
endif()
# set policy to silence warnings about timestamps of downloaded files. review occasionally if it may be set to NEW
if(POLICY CMP0135)
cmake_policy(SET CMP0135 OLD)
endif()
########################################
# Use CONFIGURE_DEPENDS as option for file(GLOB...) when available
if(CMAKE_VERSION VERSION_LESS 3.12)
unset(CONFIGURE_DEPENDS)
else()
set(CONFIGURE_DEPENDS CONFIGURE_DEPENDS)
endif()
########################################
project(lammps CXX)
@ -116,7 +105,7 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
if(CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 17.3 OR CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 17.4)
set(CMAKE_TUNE_DEFAULT "-xCOMMON-AVX512")
else()
set(CMAKE_TUNE_DEFAULT "-xHost -fp-model fast=2 -no-prec-div -qoverride-limits -diag-disable=10441 -diag-disable=2196")
set(CMAKE_TUNE_DEFAULT "-xHost -fp-model fast=2 -no-prec-div -qoverride-limits -diag-disable=10441 -diag-disable=11074 -diag-disable=11076 -diag-disable=2196")
endif()
endif()
endif()
@ -136,15 +125,15 @@ if((PKG_KOKKOS) AND (Kokkos_ENABLE_CUDA) AND NOT (CMAKE_CXX_COMPILER_ID STREQUAL
set(CMAKE_TUNE_DEFAULT "${CMAKE_TUNE_DEFAULT} -Xcudafe --diag_suppress=unrecognized_pragma")
endif()
# we require C++11 without extensions. Kokkos requires at least C++14 (currently)
# we require C++11 without extensions. Kokkos requires at least C++17 (currently)
if(NOT CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 11)
endif()
if(CMAKE_CXX_STANDARD LESS 11)
message(FATAL_ERROR "C++ standard must be set to at least 11")
endif()
if(PKG_KOKKOS AND (CMAKE_CXX_STANDARD LESS 14))
set(CMAKE_CXX_STANDARD 14)
if(PKG_KOKKOS AND (CMAKE_CXX_STANDARD LESS 17))
set(CMAKE_CXX_STANDARD 17)
endif()
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF CACHE BOOL "Use compiler extensions")
@ -155,6 +144,7 @@ if(MSVC)
add_compile_options(/Zc:__cplusplus)
add_compile_options(/wd4244)
add_compile_options(/wd4267)
add_compile_options(/wd4250)
add_compile_options(/EHsc)
endif()
add_compile_definitions(_CRT_SECURE_NO_WARNINGS)
@ -168,17 +158,20 @@ endif()
########################################################################
# User input options #
########################################################################
# set path to python interpreter and thus enforcing python version when
# in a virtual environment and PYTHON_EXECUTABLE is not set on command line
if(DEFINED ENV{VIRTUAL_ENV} AND NOT PYTHON_EXECUTABLE)
if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows")
set(PYTHON_EXECUTABLE "$ENV{VIRTUAL_ENV}/Scripts/python.exe")
else()
set(PYTHON_EXECUTABLE "$ENV{VIRTUAL_ENV}/bin/python")
endif()
# backward compatibility with CMake before 3.12 and older LAMMPS documentation
if (PYTHON_EXECUTABLE)
set(Python_EXECUTABLE "${PYTHON_EXECUTABLE}")
endif()
# set path to python interpreter and thus enforcing python version when
# in a virtual environment and Python_EXECUTABLE is not set on command line
if(DEFINED ENV{VIRTUAL_ENV} AND NOT Python_EXECUTABLE)
if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows")
set(Python_EXECUTABLE "$ENV{VIRTUAL_ENV}/Scripts/python.exe")
else()
set(Python_EXECUTABLE "$ENV{VIRTUAL_ENV}/bin/python")
endif()
message(STATUS "Running in virtual environment: $ENV{VIRTUAL_ENV}\n"
" Setting Python interpreter to: ${PYTHON_EXECUTABLE}")
" Setting Python interpreter to: ${Python_EXECUTABLE}")
endif()
set(LAMMPS_MACHINE "" CACHE STRING "Suffix to append to lmp binary (WON'T enable any features automatically")
@ -192,6 +185,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")
@ -202,8 +196,8 @@ else()
endif()
include(GNUInstallDirs)
file(GLOB ALL_SOURCES ${CONFIGURE_DEPENDS} ${LAMMPS_SOURCE_DIR}/[^.]*.cpp)
file(GLOB MAIN_SOURCES ${CONFIGURE_DEPENDS} ${LAMMPS_SOURCE_DIR}/main.cpp)
file(GLOB ALL_SOURCES CONFIGURE_DEPENDS ${LAMMPS_SOURCE_DIR}/[^.]*.cpp)
file(GLOB MAIN_SOURCES CONFIGURE_DEPENDS ${LAMMPS_SOURCE_DIR}/main.cpp)
list(REMOVE_ITEM ALL_SOURCES ${MAIN_SOURCES})
add_library(lammps ${ALL_SOURCES})
@ -257,7 +251,6 @@ set(STANDARD_PACKAGES
KIM
KSPACE
LATBOLTZ
LATTE
LEPTON
MACHDYN
MANIFOLD
@ -278,8 +271,6 @@ set(STANDARD_PACKAGES
MOFFF
MOLECULE
MOLFILE
MPIIO
MSCG
NETCDF
ORIENT
PERI
@ -385,15 +376,9 @@ if(NOT ${LAMMPS_MEMALIGN} STREQUAL "0")
target_compile_definitions(lammps PRIVATE -DLAMMPS_MEMALIGN=${LAMMPS_MEMALIGN})
endif()
option(LAMMPS_EXCEPTIONS "enable the use of C++ exceptions for error messages (useful for library interface)" ${ENABLE_TESTING})
if(LAMMPS_EXCEPTIONS)
target_compile_definitions(lammps PUBLIC -DLAMMPS_EXCEPTIONS)
endif()
# "hard" dependencies between packages resulting
# in an error instead of skipping over files
pkg_depends(ML-IAP ML-SNAP)
pkg_depends(MPIIO MPI)
pkg_depends(ATC MANYBODY)
pkg_depends(LATBOLTZ MPI)
pkg_depends(SCAFACOS MPI)
@ -404,6 +389,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,14 +427,26 @@ 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)
# lower C++ standard for fmtlib sources when using Intel classic compiler
if((CMAKE_CXX_COMPILER_ID STREQUAL "Intel") AND (CMAKE_CXX_STANDARD GREATER_EQUAL 17)
AND (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 2021.10))
message(STATUS "Lowering C++ standard for compiling fmtlib sources with Intel Classic compiler")
get_filename_component(LMP_UTILS_SRC "${LAMMPS_SOURCE_DIR}/utils.cpp" ABSOLUTE)
get_filename_component(LMP_VARIABLE_SRC "${LAMMPS_SOURCE_DIR}/variable.cpp" ABSOLUTE)
get_filename_component(FMT_FORMAT_SRC "${LAMMPS_SOURCE_DIR}/fmtlib_format.cpp" ABSOLUTE)
get_filename_component(FMT_OS_SRC "${LAMMPS_SOURCE_DIR}/fmtlib_os.cpp" ABSOLUTE)
set_source_files_properties("${FMT_FORMAT_SRC}" "${FMT_OS_SRC}" "${LMP_VARIABLE_SRC}" "${LMP_UTILS_SRC}"
PROPERTIES COMPILE_OPTIONS "-std=c++14")
endif()
if(PKG_ATC OR PKG_AWPMD OR PKG_ML-QUIP OR PKG_ML-POD OR PKG_ELECTRODE OR BUILD_TOOLS)
enable_language(C)
if (NOT USE_INTERNAL_LINALG)
find_package(LAPACK)
find_package(BLAS)
endif()
if(NOT LAPACK_FOUND OR NOT BLAS_FOUND OR USE_INTERNAL_LINALG)
file(GLOB LINALG_SOURCES ${CONFIGURE_DEPENDS} ${LAMMPS_LIB_SOURCE_DIR}/linalg/[^.]*.cpp)
file(GLOB LINALG_SOURCES CONFIGURE_DEPENDS ${LAMMPS_LIB_SOURCE_DIR}/linalg/[^.]*.cpp)
add_library(linalg STATIC ${LINALG_SOURCES})
set_target_properties(linalg PROPERTIES OUTPUT_NAME lammps_linalg${LAMMPS_MACHINE})
set(BLAS_LIBRARIES "$<TARGET_FILE:linalg>")
@ -466,13 +464,8 @@ option(WITH_JPEG "Enable JPEG support" ${JPEG_FOUND})
if(WITH_JPEG)
find_package(JPEG REQUIRED)
target_compile_definitions(lammps PRIVATE -DLAMMPS_JPEG)
if(CMAKE_VERSION VERSION_LESS 3.12)
target_include_directories(lammps PRIVATE ${JPEG_INCLUDE_DIRS})
target_link_libraries(lammps PRIVATE ${JPEG_LIBRARIES})
else()
target_link_libraries(lammps PRIVATE JPEG::JPEG)
endif()
endif()
find_package(PNG QUIET)
find_package(ZLIB QUIET)
@ -521,7 +514,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 COMPRESS ML-PACE LEPTON)
if(PKG_${PKG_WITH_INCL})
include(Packages/${PKG_WITH_INCL})
endif()
@ -538,7 +531,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})
# 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) #
@ -580,8 +576,8 @@ endforeach()
foreach(PKG ${STANDARD_PACKAGES})
set(${PKG}_SOURCES_DIR ${LAMMPS_SOURCE_DIR}/${PKG})
file(GLOB ${PKG}_SOURCES ${CONFIGURE_DEPENDS} ${${PKG}_SOURCES_DIR}/[^.]*.cpp)
file(GLOB ${PKG}_HEADERS ${CONFIGURE_DEPENDS} ${${PKG}_SOURCES_DIR}/[^.]*.h)
file(GLOB ${PKG}_SOURCES CONFIGURE_DEPENDS ${${PKG}_SOURCES_DIR}/[^.]*.cpp)
file(GLOB ${PKG}_HEADERS CONFIGURE_DEPENDS ${${PKG}_SOURCES_DIR}/[^.]*.h)
# check for package files in src directory due to old make system
DetectBuildSystemConflict(${LAMMPS_SOURCE_DIR} ${${PKG}_SOURCES} ${${PKG}_HEADERS})
@ -597,19 +593,12 @@ foreach(PKG ${STANDARD_PACKAGES})
RegisterPackages(${${PKG}_SOURCES_DIR})
endforeach()
# packages that need defines set
foreach(PKG MPIIO)
if(PKG_${PKG})
target_compile_definitions(lammps PRIVATE -DLMP_${PKG})
endif()
endforeach()
# dedicated check for entire contents of accelerator packages
foreach(PKG ${SUFFIX_PACKAGES})
set(${PKG}_SOURCES_DIR ${LAMMPS_SOURCE_DIR}/${PKG})
file(GLOB ${PKG}_SOURCES ${CONFIGURE_DEPENDS} ${${PKG}_SOURCES_DIR}/[^.]*.cpp)
file(GLOB ${PKG}_HEADERS ${CONFIGURE_DEPENDS} ${${PKG}_SOURCES_DIR}/[^.]*.h)
file(GLOB ${PKG}_SOURCES CONFIGURE_DEPENDS ${${PKG}_SOURCES_DIR}/[^.]*.cpp)
file(GLOB ${PKG}_HEADERS CONFIGURE_DEPENDS ${${PKG}_SOURCES_DIR}/[^.]*.h)
# check for package files in src directory due to old make system
DetectBuildSystemConflict(${LAMMPS_SOURCE_DIR} ${${PKG}_SOURCES} ${${PKG}_HEADERS})
@ -623,7 +612,7 @@ endforeach()
foreach(PKG_LIB POEMS ATC AWPMD H5MD)
if(PKG_${PKG_LIB})
string(TOLOWER "${PKG_LIB}" PKG_LIB)
file(GLOB_RECURSE ${PKG_LIB}_SOURCES ${CONFIGURE_DEPENDS}
file(GLOB_RECURSE ${PKG_LIB}_SOURCES CONFIGURE_DEPENDS
${LAMMPS_LIB_SOURCE_DIR}/${PKG_LIB}/[^.]*.c ${LAMMPS_LIB_SOURCE_DIR}/${PKG_LIB}/[^.]*.cpp)
add_library(${PKG_LIB} STATIC ${${PKG_LIB}_SOURCES})
set_target_properties(${PKG_LIB} PROPERTIES OUTPUT_NAME lammps_${PKG_LIB}${LAMMPS_MACHINE})
@ -793,9 +782,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})
@ -816,20 +807,8 @@ install(
# This is primarily for people that only want to use the Python wrapper.
###############################################################################
if(BUILD_SHARED_LIBS)
if(CMAKE_VERSION VERSION_LESS 3.12)
# adjust so we find Python 3 versions before Python 2 on old systems with old CMake
set(Python_ADDITIONAL_VERSIONS 3.12 3.11 3.10 3.9 3.8 3.7 3.6)
find_package(PythonInterp) # Deprecated since version 3.12
if(PYTHONINTERP_FOUND)
set(Python_EXECUTABLE ${PYTHON_EXECUTABLE})
endif()
else()
# backward compatibility
if(PYTHON_EXECUTABLE)
set(Python_EXECUTABLE ${PYTHON_EXECUTABLE})
endif()
find_package(Python COMPONENTS Interpreter)
endif()
if(BUILD_IS_MULTI_CONFIG)
set(MY_BUILD_DIR ${CMAKE_BINARY_DIR}/$<CONFIG>)
else()
@ -838,9 +817,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 +831,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 +867,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
###############################################################################
@ -968,12 +927,10 @@ if(_index GREATER -1)
endif()
message(STATUS "<<< Linker flags: >>>")
message(STATUS "Executable name: ${LAMMPS_BINARY}")
if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.13)
get_target_property(OPTIONS lammps LINK_OPTIONS)
if(OPTIONS)
message(STATUS "Linker options: ${OPTIONS}")
endif()
endif()
if(CMAKE_EXE_LINKER_FLAGS)
message(STATUS "Executable linker flags: ${CMAKE_EXE_LINKER_FLAGS}")
endif()
@ -1053,6 +1010,14 @@ endif()
if(BUILD_LAMMPS_SHELL)
message(STATUS "<<< Building LAMMPS Shell >>>")
endif()
if(BUILD_LAMMPS_GUI)
message(STATUS "<<< Building LAMMPS GUI >>>")
if(LAMMPS_GUI_USE_PLUGIN)
message(STATUS "Loading LAMMPS library as plugin at run time")
else()
message(STATUS "Linking LAMMPS library at compile time")
endif()
endif()
if(ENABLE_TESTING)
message(STATUS "<<< Building Unit Tests >>>")
if(ENABLE_COVERAGE)

View File

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

View File

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

View File

@ -1,15 +1,11 @@
if(CMAKE_VERSION VERSION_LESS 3.12)
find_package(PythonInterp 3.5 QUIET) # Deprecated since version 3.12
if(PYTHONINTERP_FOUND)
set(Python3_EXECUTABLE ${PYTHON_EXECUTABLE})
set(Python3_VERSION ${PYTHON_VERSION_STRING})
endif()
else()
find_package(Python3 COMPONENTS Interpreter QUIET)
# use default (or custom) Python executable, if version is sufficient
if(Python_VERSION VERSION_GREATER_EQUAL 3.6)
set(Python3_EXECUTABLE ${Python_EXECUTABLE})
endif()
find_package(Python3 COMPONENTS Interpreter)
if(Python3_EXECUTABLE)
if(Python3_VERSION VERSION_GREATER_EQUAL 3.5)
if(Python3_VERSION VERSION_GREATER_EQUAL 3.6)
add_custom_target(
check-whitespace
${Python3_EXECUTABLE} ${LAMMPS_TOOLS_DIR}/coding_standard/whitespace.py .

View File

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

View File

@ -4,21 +4,19 @@
option(BUILD_DOC "Build LAMMPS HTML documentation" OFF)
if(BUILD_DOC)
# Sphinx 3.x requires at least Python 3.5
if(CMAKE_VERSION VERSION_LESS 3.12)
find_package(PythonInterp 3.5 REQUIRED)
set(VIRTUALENV ${PYTHON_EXECUTABLE} -m venv)
else()
# Current Sphinx versions require at least Python 3.8
# use default (or custom) Python executable, if version is sufficient
if(Python_VERSION VERSION_GREATER_EQUAL 3.8)
set(Python3_EXECUTABLE ${Python_EXECUTABLE})
endif()
find_package(Python3 REQUIRED COMPONENTS Interpreter)
if(Python3_VERSION VERSION_LESS 3.5)
message(FATAL_ERROR "Python 3.5 and up is required to build the HTML documentation")
if(Python3_VERSION VERSION_LESS 3.8)
message(FATAL_ERROR "Python 3.8 and up is required to build the HTML documentation")
endif()
set(VIRTUALENV ${Python3_EXECUTABLE} -m venv)
endif()
find_package(Doxygen 1.8.10 REQUIRED)
file(GLOB DOC_SOURCES ${CONFIGURE_DEPENDS} ${LAMMPS_DOC_DIR}/src/[^.]*.rst)
file(GLOB DOC_SOURCES CONFIGURE_DEPENDS ${LAMMPS_DOC_DIR}/src/[^.]*.rst)
add_custom_command(
OUTPUT docenv
@ -76,7 +74,7 @@ if(BUILD_DOC)
message(STATUS "Using already downloaded archive ${CMAKE_BINARY_DIR}/libpace.tar.gz")
endif()
execute_process(COMMAND ${CMAKE_COMMAND} -E tar xzf mathjax.tar.gz WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
file(GLOB MATHJAX_VERSION_DIR ${CONFIGURE_DEPENDS} ${CMAKE_CURRENT_BINARY_DIR}/MathJax-*)
file(GLOB MATHJAX_VERSION_DIR CONFIGURE_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/MathJax-*)
execute_process(COMMAND ${CMAKE_COMMAND} -E rename ${MATHJAX_VERSION_DIR} ${DOC_BUILD_STATIC_DIR}/mathjax)
endif()

View File

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

View File

@ -7,15 +7,7 @@
# adapted from https://github.com/cmarshall108/cython-cmake-example/blob/master/cmake/FindCython.cmake
#=============================================================================
if(CMAKE_VERSION VERSION_LESS 3.12)
set(Python_ADDITIONAL_VERSIONS 3.12 3.11 3.10 3.9 3.8 3.7 3.6)
find_package(PythonInterp 3.6 QUIET) # Deprecated since version 3.12
if(PYTHONINTERP_FOUND)
set(Python_EXECUTABLE ${PYTHON_EXECUTABLE})
endif()
else()
find_package(Python 3.6 COMPONENTS Interpreter QUIET)
endif()
# Use the Cython executable that lives next to the Python executable
# if it is a local installation.

View File

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

View File

@ -41,7 +41,7 @@ endfunction()
# helper function for getting the most recently modified file or folder from a glob pattern
function(get_newest_file path variable)
file(GLOB _dirs ${CONFIGURE_DEPENDS} ${path})
file(GLOB _dirs CONFIGURE_DEPENDS ${path})
set(_besttime 2000-01-01T00:00:00)
set(_bestfile "<unknown>")
foreach(_dir ${_dirs})
@ -80,15 +80,15 @@ endfunction()
function(check_for_autogen_files source_dir)
message(STATUS "Running check for auto-generated files from make-based build system")
file(GLOB SRC_AUTOGEN_FILES ${CONFIGURE_DEPENDS} ${source_dir}/style_*.h)
file(GLOB SRC_AUTOGEN_PACKAGES ${CONFIGURE_DEPENDS} ${source_dir}/packages_*.h)
file(GLOB SRC_AUTOGEN_FILES CONFIGURE_DEPENDS ${source_dir}/style_*.h)
file(GLOB SRC_AUTOGEN_PACKAGES CONFIGURE_DEPENDS ${source_dir}/packages_*.h)
list(APPEND SRC_AUTOGEN_FILES ${SRC_AUTOGEN_PACKAGES} ${source_dir}/lmpinstalledpkgs.h ${source_dir}/lmpgitversion.h)
list(APPEND SRC_AUTOGEN_FILES ${SRC_AUTOGEN_PACKAGES} ${source_dir}/mliap_model_python_couple.h ${source_dir}/mliap_model_python_couple.cpp)
list(APPEND SRC_AUTOGEN_FILES ${source_dir}/mliap_model_python_couple.h ${source_dir}/mliap_model_python_couple.cpp)
foreach(_SRC ${SRC_AUTOGEN_FILES})
get_filename_component(FILENAME "${_SRC}" NAME)
if(EXISTS ${source_dir}/${FILENAME})
message(FATAL_ERROR "\n########################################################################\n"
"Found header file(s) generated by the make-based build system\n"
"Found header file ${source_dir}/${FILENAME} generated by the make-based build system\n"
"\n"
"Please run\n"
"make -C ${source_dir} purge\n"
@ -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)

View File

@ -1,6 +1,6 @@
set(COLVARS_SOURCE_DIR ${LAMMPS_LIB_SOURCE_DIR}/colvars)
file(GLOB COLVARS_SOURCES ${CONFIGURE_DEPENDS} ${COLVARS_SOURCE_DIR}/[^.]*.cpp)
file(GLOB COLVARS_SOURCES CONFIGURE_DEPENDS ${COLVARS_SOURCE_DIR}/[^.]*.cpp)
option(COLVARS_DEBUG "Enable debugging messages for Colvars (quite verbose)" OFF)

View File

@ -39,7 +39,7 @@ if (PKG_AMOEBA)
${GPU_SOURCES_DIR}/amoeba_convolution_gpu.cpp)
endif()
file(GLOB GPU_LIB_SOURCES ${CONFIGURE_DEPENDS} ${LAMMPS_LIB_SOURCE_DIR}/gpu/[^.]*.cpp)
file(GLOB GPU_LIB_SOURCES CONFIGURE_DEPENDS ${LAMMPS_LIB_SOURCE_DIR}/gpu/[^.]*.cpp)
file(MAKE_DIRECTORY ${LAMMPS_LIB_BINARY_DIR}/gpu)
if(GPU_API STREQUAL "CUDA")
@ -60,15 +60,17 @@ if(GPU_API STREQUAL "CUDA")
option(CUDA_MPS_SUPPORT "Enable tweaks to support CUDA Multi-process service (MPS)" OFF)
if(CUDA_MPS_SUPPORT)
if(CUDPP_OPT)
message(FATAL_ERROR "Must use -DCUDPP_OPT=OFF with -DGPU_CUDA_MPS_SUPPORT=ON")
message(FATAL_ERROR "Must use -DCUDPP_OPT=OFF with -DCUDA_MPS_SUPPORT=ON")
endif()
set(GPU_CUDA_MPS_FLAGS "-DCUDA_PROXY")
set(GPU_CUDA_MPS_FLAGS "-DCUDA_MPS_SUPPORT")
endif()
option(CUDA_BUILD_MULTIARCH "Enable building CUDA kernels for all supported GPU architectures" ON)
mark_as_advanced(GPU_BUILD_MULTIARCH)
set(GPU_ARCH "sm_50" CACHE STRING "LAMMPS GPU CUDA SM primary architecture (e.g. sm_60)")
# ensure that no *cubin.h files exist from a compile in the lib/gpu folder
file(GLOB GPU_LIB_OLD_CUBIN_HEADERS ${CONFIGURE_DEPENDS} ${LAMMPS_LIB_SOURCE_DIR}/gpu/*_cubin.h)
file(GLOB GPU_LIB_OLD_CUBIN_HEADERS CONFIGURE_DEPENDS ${LAMMPS_LIB_SOURCE_DIR}/gpu/*_cubin.h)
if(GPU_LIB_OLD_CUBIN_HEADERS)
message(FATAL_ERROR "########################################################################\n"
"Found file(s) generated by the make-based build system in lib/gpu\n"
@ -78,29 +80,32 @@ if(GPU_API STREQUAL "CUDA")
"########################################################################")
endif()
file(GLOB GPU_LIB_CU ${CONFIGURE_DEPENDS} ${LAMMPS_LIB_SOURCE_DIR}/gpu/[^.]*.cu ${CMAKE_CURRENT_SOURCE_DIR}/gpu/[^.]*.cu)
file(GLOB GPU_LIB_CU CONFIGURE_DEPENDS ${LAMMPS_LIB_SOURCE_DIR}/gpu/[^.]*.cu ${CMAKE_CURRENT_SOURCE_DIR}/gpu/[^.]*.cu)
list(REMOVE_ITEM GPU_LIB_CU ${LAMMPS_LIB_SOURCE_DIR}/gpu/lal_pppm.cu)
cuda_include_directories(${LAMMPS_LIB_SOURCE_DIR}/gpu ${LAMMPS_LIB_BINARY_DIR}/gpu)
if(CUDPP_OPT)
cuda_include_directories(${LAMMPS_LIB_SOURCE_DIR}/gpu/cudpp_mini)
file(GLOB GPU_LIB_CUDPP_SOURCES ${CONFIGURE_DEPENDS} ${LAMMPS_LIB_SOURCE_DIR}/gpu/cudpp_mini/[^.]*.cpp)
file(GLOB GPU_LIB_CUDPP_CU ${CONFIGURE_DEPENDS} ${LAMMPS_LIB_SOURCE_DIR}/gpu/cudpp_mini/[^.]*.cu)
file(GLOB GPU_LIB_CUDPP_SOURCES CONFIGURE_DEPENDS ${LAMMPS_LIB_SOURCE_DIR}/gpu/cudpp_mini/[^.]*.cpp)
file(GLOB GPU_LIB_CUDPP_CU CONFIGURE_DEPENDS ${LAMMPS_LIB_SOURCE_DIR}/gpu/cudpp_mini/[^.]*.cu)
endif()
# build arch/gencode commands for nvcc based on CUDA toolkit version and use choice
# --arch translates directly instead of JIT, so this should be for the preferred or most common architecture
set(GPU_CUDA_GENCODE "-arch=${GPU_ARCH}")
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 "12.0")
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"))
@ -143,6 +148,7 @@ if(GPU_API STREQUAL "CUDA")
string(APPEND GPU_CUDA_GENCODE " -gencode arch=compute_90,code=[sm_90,compute_90]")
endif()
endif()
endif()
cuda_compile_fatbin(GPU_GEN_OBJS ${GPU_LIB_CU} OPTIONS ${CUDA_REQUEST_PIC}
-DUNIX -O3 --use_fast_math -Wno-deprecated-gpu-targets -DNV_KERNEL -DUCL_CUDADR ${GPU_CUDA_GENCODE} -D_${GPU_PREC_SETTING} -DLAMMPS_${LAMMPS_SIZES})
@ -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})
@ -201,7 +205,7 @@ elseif(GPU_API STREQUAL "OPENCL")
include(OpenCLUtils)
set(OCL_COMMON_HEADERS ${LAMMPS_LIB_SOURCE_DIR}/gpu/lal_preprocessor.h ${LAMMPS_LIB_SOURCE_DIR}/gpu/lal_aux_fun1.h)
file(GLOB GPU_LIB_CU ${CONFIGURE_DEPENDS} ${LAMMPS_LIB_SOURCE_DIR}/gpu/[^.]*.cu)
file(GLOB GPU_LIB_CU CONFIGURE_DEPENDS ${LAMMPS_LIB_SOURCE_DIR}/gpu/[^.]*.cu)
list(REMOVE_ITEM GPU_LIB_CU
${LAMMPS_LIB_SOURCE_DIR}/gpu/lal_gayberne.cu
${LAMMPS_LIB_SOURCE_DIR}/gpu/lal_gayberne_lj.cu
@ -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")
@ -346,7 +335,7 @@ elseif(GPU_API STREQUAL "HIP")
endif()
endif()
file(GLOB GPU_LIB_CU ${CONFIGURE_DEPENDS} ${LAMMPS_LIB_SOURCE_DIR}/gpu/[^.]*.cu ${CMAKE_CURRENT_SOURCE_DIR}/gpu/[^.]*.cu)
file(GLOB GPU_LIB_CU CONFIGURE_DEPENDS ${LAMMPS_LIB_SOURCE_DIR}/gpu/[^.]*.cu ${CMAKE_CURRENT_SOURCE_DIR}/gpu/[^.]*.cu)
list(REMOVE_ITEM GPU_LIB_CU ${LAMMPS_LIB_SOURCE_DIR}/gpu/lal_pppm.cu)
set(GPU_LIB_CU_HIP "")
@ -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,34 +451,24 @@ 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()
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)
endif()
set_property(GLOBAL PROPERTY "GPU_SOURCES" "${GPU_SOURCES}")
# detect styles which have a GPU version

View File

@ -1,12 +1,7 @@
set(KIM-API_MIN_VERSION 2.1.3)
find_package(CURL)
if(CURL_FOUND)
if(CMAKE_VERSION VERSION_LESS 3.12)
target_include_directories(lammps PRIVATE ${CURL_INCLUDE_DIRS})
target_link_libraries(lammps PRIVATE ${CURL_LIBRARIES})
else()
target_link_libraries(lammps PRIVATE CURL::libcurl)
endif()
target_compile_definitions(lammps PRIVATE -DLMP_KIM_CURL)
set(LMP_DEBUG_CURL OFF CACHE STRING "Set libcurl verbose mode on/off. If on, it displays a lot of verbose information about its operations.")
mark_as_advanced(LMP_DEBUG_CURL)
@ -19,7 +14,7 @@ if(CURL_FOUND)
target_compile_definitions(lammps PRIVATE -DLMP_NO_SSL_CHECK)
endif()
endif()
set(KIM_EXTRA_UNITTESTS OFF CACHE STRING "Set extra unit tests verbose mode on/off. If on, extra tests are included.")
option(KIM_EXTRA_UNITTESTS "Enable extra unit tests for the KIM package." OFF)
mark_as_advanced(KIM_EXTRA_UNITTESTS)
find_package(PkgConfig QUIET)
set(DOWNLOAD_KIM_DEFAULT ON)

View File

@ -1,7 +1,8 @@
########################################################################
# As of version 3.3.0 Kokkos requires C++14
if(CMAKE_CXX_STANDARD LESS 14)
message(FATAL_ERROR "The KOKKOS package requires the C++ standard to be set to at least C++14")
# As of version 4.0.0 Kokkos requires C++17
if(CMAKE_CXX_STANDARD LESS 17)
message(FATAL_ERROR "The KOKKOS package requires the C++ standard to
be set to at least C++17")
endif()
########################################################################
@ -16,8 +17,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 +50,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/4.1.00.tar.gz" CACHE STRING "URL for KOKKOS tarball")
set(KOKKOS_MD5 "a5f096bd8ad01b97fdc7a32583b17a33" CACHE STRING "MD5 checksum of KOKKOS tarball")
mark_as_advanced(KOKKOS_URL)
mark_as_advanced(KOKKOS_MD5)
GetFallbackURL(KOKKOS_URL KOKKOS_FALLBACK)
@ -72,13 +73,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 4.1.00 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 +89,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 +97,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 +122,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 +138,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()
@ -151,7 +156,7 @@ if(PKG_ML-IAP)
# Add KOKKOS version of ML-IAP Python coupling if non-KOKKOS version is included
if(MLIAP_ENABLE_PYTHON AND Cythonize_EXECUTABLE)
file(GLOB MLIAP_KOKKOS_CYTHON_SRC ${CONFIGURE_DEPENDS} ${LAMMPS_SOURCE_DIR}/KOKKOS/*.pyx)
file(GLOB MLIAP_KOKKOS_CYTHON_SRC CONFIGURE_DEPENDS ${LAMMPS_SOURCE_DIR}/KOKKOS/*.pyx)
foreach(MLIAP_CYTHON_FILE ${MLIAP_KOKKOS_CYTHON_SRC})
get_filename_component(MLIAP_CYTHON_BASE ${MLIAP_CYTHON_FILE} NAME_WE)
add_custom_command(OUTPUT ${MLIAP_BINARY_DIR}/${MLIAP_CYTHON_BASE}.cpp ${MLIAP_BINARY_DIR}/${MLIAP_CYTHON_BASE}.h

View File

@ -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()

View File

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

View File

@ -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)
@ -26,30 +26,10 @@ if(DOWNLOAD_MDI)
# detect if we have python development support and thus can enable python plugins
set(MDI_USE_PYTHON_PLUGINS OFF)
if(CMAKE_VERSION VERSION_LESS 3.12)
if(NOT PYTHON_VERSION_STRING)
set(Python_ADDITIONAL_VERSIONS 3.12 3.11 3.10 3.9 3.8 3.7 3.6)
# search for interpreter first, so we have a consistent library
find_package(PythonInterp) # Deprecated since version 3.12
if(PYTHONINTERP_FOUND)
set(Python_EXECUTABLE ${PYTHON_EXECUTABLE})
endif()
endif()
# search for the library matching the selected interpreter
set(Python_ADDITIONAL_VERSIONS ${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR})
find_package(PythonLibs QUIET) # Deprecated since version 3.12
if(PYTHONLIBS_FOUND)
if(NOT (PYTHON_VERSION_STRING STREQUAL PYTHONLIBS_VERSION_STRING))
message(FATAL_ERROR "Python Library version ${PYTHONLIBS_VERSION_STRING} does not match Interpreter version ${PYTHON_VERSION_STRING}")
endif()
set(MDI_USE_PYTHON_PLUGINS ON)
endif()
else()
find_package(Python QUIET COMPONENTS Development)
if(Python_Development_FOUND)
set(MDI_USE_PYTHON_PLUGINS ON)
endif()
endif()
# python plugins are not supported and thus must be always off on Windows
if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
unset(Python_Development_FOUND)
@ -102,13 +82,9 @@ if(DOWNLOAD_MDI)
# if compiling with python plugins we need
# to add python libraries as dependency.
if(MDI_USE_PYTHON_PLUGINS)
if(CMAKE_VERSION VERSION_LESS 3.12)
list(APPEND MDI_DEP_LIBS ${PYTHON_LIBRARIES})
else()
list(APPEND MDI_DEP_LIBS Python::Python)
endif()
endif()
# need to add support for dlopen/dlsym, except when compiling for Windows.
if(NOT (CMAKE_SYSTEM_NAME STREQUAL "Windows"))
list(APPEND MDI_DEP_LIBS "${CMAKE_DL_LIBS}")

View File

@ -2,12 +2,7 @@
set(MLIAP_ENABLE_PYTHON_DEFAULT OFF)
if(PKG_PYTHON)
find_package(Cythonize QUIET)
if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.14)
find_package(Python COMPONENTS NumPy QUIET)
else()
# assume we have NumPy
set(Python_NumPy_FOUND ON)
endif()
if(Cythonize_FOUND AND Python_NumPy_FOUND)
set(MLIAP_ENABLE_PYTHON_DEFAULT ON)
endif()
@ -17,24 +12,16 @@ option(MLIAP_ENABLE_PYTHON "Build ML-IAP package with Python support" ${MLIAP_EN
if(MLIAP_ENABLE_PYTHON)
find_package(Cythonize REQUIRED)
if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.14)
find_package(Python COMPONENTS NumPy REQUIRED)
endif()
if(NOT PKG_PYTHON)
message(FATAL_ERROR "Must enable PYTHON package for including Python support in ML-IAP")
endif()
if(CMAKE_VERSION VERSION_LESS 3.12)
if(PYTHONLIBS_VERSION_STRING VERSION_LESS 3.6)
message(FATAL_ERROR "Python support in ML-IAP requires Python 3.6 or later")
endif()
else()
if(Python_VERSION VERSION_LESS 3.6)
message(FATAL_ERROR "Python support in ML-IAP requires Python 3.6 or later")
endif()
endif()
set(MLIAP_BINARY_DIR ${CMAKE_BINARY_DIR}/cython)
file(GLOB MLIAP_CYTHON_SRC ${CONFIGURE_DEPENDS} ${LAMMPS_SOURCE_DIR}/ML-IAP/*.pyx)
file(GLOB MLIAP_CYTHON_SRC CONFIGURE_DEPENDS ${LAMMPS_SOURCE_DIR}/ML-IAP/*.pyx)
file(MAKE_DIRECTORY ${MLIAP_BINARY_DIR})
foreach(MLIAP_CYTHON_FILE ${MLIAP_CYTHON_SRC})
get_filename_component(MLIAP_CYTHON_BASE ${MLIAP_CYTHON_FILE} NAME_WE)

View File

@ -1,6 +1,6 @@
set(PACELIB_URL "https://github.com/ICAMS/lammps-user-pace/archive/refs/tags/v.2023.01.3.fix.tar.gz" CACHE STRING "URL for PACE evaluator library sources")
set(PACELIB_URL "https://github.com/ICAMS/lammps-user-pace/archive/refs/tags/v.2023.10.04.tar.gz" CACHE STRING "URL for PACE evaluator library sources")
set(PACELIB_MD5 "4f0b3b5b14456fe9a73b447de3765caa" CACHE STRING "MD5 checksum of PACE evaluator library tarball")
set(PACELIB_MD5 "70ff79f4e59af175e55d24f3243ad1ff" CACHE STRING "MD5 checksum of PACE evaluator library tarball")
mark_as_advanced(PACELIB_URL)
mark_as_advanced(PACELIB_MD5)
GetFallbackURL(PACELIB_URL PACELIB_FALLBACK)

View File

@ -1,28 +0,0 @@
find_package(GSL REQUIRED)
find_package(MSCG QUIET)
if(MSGC_FOUND)
set(DOWNLOAD_MSCG_DEFAULT OFF)
else()
set(DOWNLOAD_MSCG_DEFAULT ON)
endif()
option(DOWNLOAD_MSCG "Download MSCG library instead of using an already installed one)" ${DOWNLOAD_MSCG_DEFAULT})
if(DOWNLOAD_MSCG)
set(MSCG_URL "https://github.com/uchicago-voth/MSCG-release/archive/1.7.3.1.tar.gz" CACHE STRING "URL for MSCG tarball")
set(MSCG_MD5 "8c45e269ee13f60b303edd7823866a91" CACHE STRING "MD5 checksum of MSCG tarball")
mark_as_advanced(MSCG_URL)
mark_as_advanced(MSCG_MD5)
include(ExternalCMakeProject)
ExternalCMakeProject(mscg ${MSCG_URL} ${MSCG_MD5} MSCG-release src/CMake "")
# set include and link library
target_include_directories(lammps PRIVATE "${CMAKE_BINARY_DIR}/_deps/mscg-src/src")
target_link_libraries(lammps PRIVATE mscg)
else()
find_package(MSCG)
if(NOT MSCG_FOUND)
message(FATAL_ERROR "MSCG not found, help CMake to find it by setting MSCG_LIBRARY and MSCG_INCLUDE_DIR, or set DOWNLOAD_MSCG=ON to download it")
endif()
target_link_libraries(lammps PRIVATE MSCG::MSCG)
endif()
target_link_libraries(lammps PRIVATE GSL::gsl ${LAPACK_LIBRARIES})

View File

@ -1,3 +1,83 @@
# Plumed2 support for PLUMED package
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()
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")
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()
message(FATAL_ERROR "Unsupported target system: ${CMAKE_SYSTEM_NAME}/${CMAKE_SYSTEM_PROCESSOR}")
endif()
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 ${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})
@ -31,20 +111,6 @@ endif()
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})
else()
set(PLUMED_CONFIG_MPI "--disable-mpi")
set(PLUMED_CONFIG_CC ${CMAKE_C_COMPILER})
set(PLUMED_CONFIG_CXX ${CMAKE_CXX_COMPILER})
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}")
@ -54,13 +120,6 @@ if(DOWNLOAD_PLUMED)
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)
include(ExternalProject)
ExternalProject_Add(plumed_build
URL ${PLUMED_URL} ${PLUMED_FALLBACK}
@ -69,6 +128,8 @@ if(DOWNLOAD_PLUMED)
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}
@ -103,4 +164,6 @@ else()
set_target_properties(LAMMPS::PLUMED PROPERTIES INTERFACE_LINK_LIBRARIES "${PLUMED_LOAD}")
set_target_properties(LAMMPS::PLUMED PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${PLUMED_INCLUDE_DIRS}")
endif()
endif()
target_link_libraries(lammps PRIVATE LAMMPS::PLUMED)

View File

@ -1,23 +1,6 @@
if(CMAKE_VERSION VERSION_LESS 3.12)
if(NOT PYTHON_VERSION_STRING)
set(Python_ADDITIONAL_VERSIONS 3.12 3.11 3.10 3.9 3.8 3.7 3.6)
# search for interpreter first, so we have a consistent library
find_package(PythonInterp) # Deprecated since version 3.12
if(PYTHONINTERP_FOUND)
set(Python_EXECUTABLE ${PYTHON_EXECUTABLE})
endif()
endif()
# search for the library matching the selected interpreter
set(Python_ADDITIONAL_VERSIONS ${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR})
find_package(PythonLibs REQUIRED) # Deprecated since version 3.12
if(NOT (PYTHON_VERSION_STRING STREQUAL PYTHONLIBS_VERSION_STRING))
message(FATAL_ERROR "Python Library version ${PYTHONLIBS_VERSION_STRING} does not match Interpreter version ${PYTHON_VERSION_STRING}")
endif()
target_include_directories(lammps PRIVATE ${PYTHON_INCLUDE_DIRS})
target_link_libraries(lammps PRIVATE ${PYTHON_LIBRARIES})
else()
if(NOT Python_INTERPRETER)
# backward compatibility
# backward compatibility with CMake before 3.12 and older LAMMPS documentation
if(PYTHON_EXECUTABLE)
set(Python_EXECUTABLE ${PYTHON_EXECUTABLE})
endif()
@ -25,5 +8,4 @@ else()
endif()
find_package(Python REQUIRED COMPONENTS Interpreter Development)
target_link_libraries(lammps PRIVATE Python::Python)
endif()
target_compile_definitions(lammps PRIVATE -DLMP_PYTHON)

View File

@ -1,5 +1,5 @@
function(FindStyleHeaders path style_class file_pattern headers)
file(GLOB files ${CONFIGURE_DEPENDS} "${path}/${file_pattern}*.h")
file(GLOB files CONFIGURE_DEPENDS "${path}/${file_pattern}*.h")
get_property(hlist GLOBAL PROPERTY ${headers})
foreach(file_name ${files})
@ -104,6 +104,7 @@ function(RegisterStyles search_path)
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
@ -127,6 +128,7 @@ function(RegisterStylesExt search_path extension 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})
@ -151,6 +153,7 @@ function(GenerateStyleHeaders output_path)
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
@ -184,7 +187,7 @@ endfunction(DetectBuildSystemConflict)
function(FindPackagesHeaders path style_class file_pattern headers)
file(GLOB files ${CONFIGURE_DEPENDS} "${path}/${file_pattern}*.h")
file(GLOB files CONFIGURE_DEPENDS "${path}/${file_pattern}*.h")
get_property(plist GLOBAL PROPERTY ${headers})
foreach(file_name ${files})

View File

@ -6,7 +6,7 @@ if(ENABLE_TESTING)
find_program(VALGRIND_BINARY NAMES valgrind)
# generate custom suppression file
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/lammps.supp "\n")
file(GLOB VALGRIND_SUPPRESSION_FILES ${CONFIGURE_DEPENDS} ${LAMMPS_TOOLS_DIR}/valgrind/[^.]*.supp)
file(GLOB VALGRIND_SUPPRESSION_FILES CONFIGURE_DEPENDS ${LAMMPS_TOOLS_DIR}/valgrind/[^.]*.supp)
foreach(SUPP ${VALGRIND_SUPPRESSION_FILES})
file(READ ${SUPP} SUPPRESSIONS)
file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/lammps.supp "${SUPPRESSIONS}")
@ -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)
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))
# 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_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")
@ -62,18 +66,10 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
option(ENABLE_COVERAGE "Enable collecting code coverage data" OFF)
mark_as_advanced(ENABLE_COVERAGE)
if(ENABLE_COVERAGE)
if(CMAKE_VERSION VERSION_LESS 3.13)
if(CMAKE_CXX_FLAGS)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --coverage")
else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_${CMAKE_BUILD_TYPE}_FLAGS} --coverage")
endif()
else()
target_compile_options(lammps PUBLIC --coverage)
target_link_options(lammps PUBLIC --coverage)
endif()
endif()
endif()
#######################################
# add custom target for IWYU analysis
@ -114,16 +110,8 @@ validate_option(ENABLE_SANITIZER ENABLE_SANITIZER_VALUES)
string(TOLOWER ${ENABLE_SANITIZER} ENABLE_SANITIZER)
if(NOT ENABLE_SANITIZER STREQUAL "none")
if((${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU") OR (${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang"))
if(CMAKE_VERSION VERSION_LESS 3.13)
if(CMAKE_CXX_FLAGS)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=${ENABLE_SANITIZER}")
else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_${CMAKE_BUILD_TYPE}_FLAGS} -fsanitize=${ENABLE_SANITIZER}")
endif()
else()
target_compile_options(lammps PUBLIC -fsanitize=${ENABLE_SANITIZER})
target_link_options(lammps PUBLIC -fsanitize=${ENABLE_SANITIZER})
endif()
else()
message(WARNING "ENABLE_SANITIZER option not supported by ${CMAKE_CXX_COMPILER_ID} compilers. Ignoring.")
set(ENABLE_SANITIZER "none")

View File

@ -26,21 +26,24 @@ if(BUILD_TOOLS)
enable_language(C)
get_filename_component(MSI2LMP_SOURCE_DIR ${LAMMPS_TOOLS_DIR}/msi2lmp/src ABSOLUTE)
file(GLOB MSI2LMP_SOURCES ${CONFIGURE_DEPENDS} ${MSI2LMP_SOURCE_DIR}/[^.]*.c)
file(GLOB MSI2LMP_SOURCES CONFIGURE_DEPENDS ${MSI2LMP_SOURCE_DIR}/[^.]*.c)
add_executable(msi2lmp ${MSI2LMP_SOURCES})
if(STANDARD_MATH_LIB)
target_link_libraries(msi2lmp PRIVATE ${STANDARD_MATH_LIB})
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)
message(WARNING "The LAMMPS shell needs LAMMPS_EXCEPTIONS enabled for full functionality")
endif()
# include resource compiler to embed icons into the executable on Windows
if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
@ -65,4 +68,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()

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

View File

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

View File

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

View File

@ -0,0 +1,77 @@
#!/bin/bash
APP_NAME=lammps-gui
DESTDIR=${PWD}/../LAMMPS_GUI
echo "Delete old files, if they exist"
rm -rf ${DESTDIR} ../LAMMPS_GUI-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_GUI-Linux-amd64.tar.gz LAMMPS_GUI
popd
echo "Cleanup dir"
rm -r ${DESTDIR}
exit 0

View File

@ -0,0 +1,111 @@
#!/bin/bash
APP_NAME=lammps-gui
echo "Delete old files, if they exist"
rm -f ${APP_NAME}.dmg ${APP_NAME}-rw.dmg LAMMPS_GUI-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_GUI.app
cd LAMMPS_GUI.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_GUI'.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_GUI-macOS-multiarch.dmg"
echo "Attach icon to .dmg file"
echo "read 'icns' (-16455) \"lammps-gui.app/Contents/Resources/lammps.icns\";" > icon.rsrc
Rez -a icon.rsrc -o LAMMPS_GUI-macOS-multiarch.dmg
SetFile -a C LAMMPS_GUI-macOS-multiarch.dmg
rm icon.rsrc
echo "Delete temporary disk images"
rm -f "${APP_NAME}-rw.dmg"
rm -f "${APP_NAME}.dmg"
exit 0

View File

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

View File

@ -0,0 +1,35 @@
# CMake script to be run post installation to build zipped package
# clean up old zipfile and deployment tree
file(REMOVE LAMMPS_GUI-Win10-amd64.zip)
file(REMOVE_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)
# download and uncompress static FFMpeg and gzip binaries
file(DOWNLOAD "https://download.lammps.org/thirdparty/ffmpeg-gzip.zip" ffmpeg-gzip.zip)
file(WRITE unpackzip.ps1 "Expand-Archive -Path ffmpeg-gzip.zip -DestinationPath LAMMPS_GUI")
execute_process(COMMAND powershell -ExecutionPolicy Bypass -File unpackzip.ps1)
file(REMOVE unpackzip.ps1)
file(REMOVE ffmpeg-gzip.zip)
# create zip archive
file(WRITE makearchive.ps1 "Compress-Archive -Path LAMMPS_GUI -CompressionLevel Optimal -DestinationPath LAMMPS_GUI-Win10-amd64.zip")
execute_process(COMMAND powershell -ExecutionPolicy Bypass -File makearchive.ps1)
file(REMOVE makearchive.ps1)
file(REMOVE_RECURSE LAMMPS_GUI)

Binary file not shown.

After

Width:  |  Height:  |  Size: 598 KiB

BIN
cmake/packaging/lammps.icns Normal file

Binary file not shown.

View File

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

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

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

View File

@ -43,7 +43,6 @@ set(ALL_PACKAGES
KOKKOS
KSPACE
LATBOLTZ
LATTE
LEPTON
MACHDYN
MANIFOLD
@ -64,8 +63,6 @@ set(ALL_PACKAGES
MOFFF
MOLECULE
MOLFILE
MPIIO
MSCG
NETCDF
OPENMP
OPT

View File

@ -45,7 +45,6 @@ set(ALL_PACKAGES
KOKKOS
KSPACE
LATBOLTZ
LATTE
LEPTON
MACHDYN
MANIFOLD
@ -66,8 +65,6 @@ set(ALL_PACKAGES
MOFFF
MOLECULE
MOLFILE
MPIIO
MSCG
NETCDF
OPENMP
OPT

View File

@ -1,16 +1,14 @@
# 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)
set(DOWNLOAD_EIGEN3 ON CACHE BOOL "" FORCE)
set(DOWNLOAD_PACE ON CACHE BOOL "" FORCE)

View File

@ -0,0 +1,12 @@
# 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)

View File

@ -35,7 +35,6 @@ set(WIN_PACKAGES
INTEL
INTERLAYER
KSPACE
LATTE
LEPTON
MACHDYN
MANIFOLD
@ -84,7 +83,6 @@ endforeach()
# these two packages require a full MPI implementation
if(BUILD_MPI)
set(PKG_MPIIO ON CACHE BOOL "" FORCE)
set(PKG_LATBOLTZ ON CACHE BOOL "" FORCE)
endif()

View File

@ -24,8 +24,8 @@ set(ALL_PACKAGES
DPD-REACT
DPD-SMOOTH
DRUDE
ELECTRODE
EFF
ELECTRODE
EXTRA-COMPUTE
EXTRA-DUMP
EXTRA-FIX

View File

@ -12,7 +12,6 @@ set(PACKAGES_WITH_LIB
KIM
KOKKOS
LATBOLTZ
LATTE
LEPTON
MACHDYN
MDI
@ -20,8 +19,6 @@ set(PACKAGES_WITH_LIB
ML-PACE
ML-QUIP
MOLFILE
MPIIO
MSCG
NETCDF
PLUMED
PYTHON

View File

@ -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

View File

@ -63,6 +63,7 @@ help:
@echo " anchor_check scan for duplicate anchor labels"
@echo " style_check check for complete and consistent style lists"
@echo " package_check check for complete and consistent package lists"
@echo " role_check check for misformatted role keywords"
@echo " spelling spell-check the manual"
# ------------------------------------------
@ -94,10 +95,12 @@ 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 ;\
env LC_ALL=C grep -n ':\(ref\|doc\):[^`]' $(RSTDIR)/*.rst ;\
$(PYTHON) $(BUILDDIR)/utils/check-styles.py -s ../src -d src ;\
echo "############################################" ;\
deactivate ;\
)
@ -174,10 +177,12 @@ 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 ;\
env LC_ALL=C grep -n ':\(ref\|doc\):[^`]' $(RSTDIR)/*.rst ;\
$(PYTHON) utils/check-styles.py -s ../src -d src ;\
echo "############################################" ;\
deactivate ;\
)
@ -208,14 +213,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 +229,15 @@ char_check :
role_check :
@( env LC_ALL=C grep -n ' :[a-z]\+`' $(RSTDIR)/*.rst && exit 1 || : )
@( env LC_ALL=C grep -n ' `[^`]\+<[a-z][^`]\+`[^_]' $(RSTDIR)/*.rst && exit 1 || : )
@( env LC_ALL=C grep -n ':\(ref\|doc\):[^`]' $(RSTDIR)/*.rst && exit 1 || : )
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

View File

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

View File

@ -1,7 +1,7 @@
.TH LAMMPS "1" "8 February 2023" "2023-02-08"
.TH LAMMPS "1" "21 November 2023" "2023-11-21"
.SH NAME
.B LAMMPS
\- Molecular Dynamics Simulator. Version 8 February 2023
\- Molecular Dynamics Simulator. Version 21 November 2023
.SH SYNOPSIS
.B lmp

View File

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

View File

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

View File

@ -90,7 +90,7 @@ standard. A more detailed discussion of that is below.
directory, or ``make`` from the ``src/STUBS`` dir. If the build
fails, you may need to edit the ``STUBS/Makefile`` for your
platform. The stubs library does not provide MPI/IO functions
required by some LAMMPS packages, e.g. ``MPIIO`` or ``LATBOLTZ``,
required by some LAMMPS packages, e.g. ``LATBOLTZ``,
and thus is not compatible with those packages.
.. note::
@ -129,13 +129,12 @@ 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.
support included as well. These are commands in the ``ML-SNAP``,
``DIFFRACTION``, and ``DPD-REACT`` packages. Furthermore, some packages
support OpenMP threading indirectly through the libraries they interface
to: e.g. ``KSPACE``, and ``COLVARS``. See the :doc:`Packages details
<Packages_details>` page for more info on these packages, and the pages
for their respective commands for OpenMP threading info.
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 +488,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 +504,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

View File

@ -16,8 +16,7 @@ environments is on a :doc:`separate page <Howto_cmake>`.
.. note::
LAMMPS currently requires that CMake version 3.10 or later is available;
version 3.12 or later is preferred.
LAMMPS currently requires that CMake version 3.16 or later is available.
.. warning::
@ -34,19 +33,18 @@ Advantages of using CMake
^^^^^^^^^^^^^^^^^^^^^^^^^
CMake is an alternative to compiling LAMMPS in the traditional way
through :doc:`(manually customized) makefiles <Build_make>` and a recent
addition to LAMMPS thanks to the efforts of Christoph Junghans (LANL)
and Richard Berger (Temple U). Using CMake has multiple advantages that
are specifically helpful for people with limited experience in compiling
software or for people that want to modify or extend LAMMPS.
through :doc:`(manually customized) makefiles <Build_make>`. Using
CMake has multiple advantages that are specifically helpful for
people with limited experience in compiling software or for people
that want to modify or extend LAMMPS.
- CMake can detect available hardware, tools, features, and libraries
and adapt the LAMMPS default build configuration accordingly.
- CMake can generate files for different build tools and integrated
development environments (IDE).
- CMake supports customization of settings with a command line, text
mode, or graphical user interface. No knowledge of file formats or
complex command line syntax is required.
mode, or graphical user interface. No manual editing of files,
knowledge of file formats or complex command line syntax is required.
- All enabled components are compiled in a single build operation.
- Automated dependency tracking for all files and configuration options.
- Support for true out-of-source compilation. Multiple configurations
@ -179,13 +177,13 @@ configuration is selected with the *-C* flag:
ctest -C Debug
The CMake scripts in LAMMPS have basic support for being compiled using a
multi-config build system, but not all of it has been ported. This is in
particular applicable to compiling packages that require additional libraries
that would be downloaded and compiled by CMake. The "windows" preset file
tries to keep track of which packages can be compiled natively with the
MSVC compilers out-of-the box. Not all of those external libraries are
portable to Windows, either.
The CMake scripts in LAMMPS have basic support for being compiled using
a multi-config build system, but not all of it has been ported. This is
in particular applicable to compiling packages that require additional
libraries that would be downloaded and compiled by CMake. The
``windows.cmake`` preset file tries to keep track of which packages can
be compiled natively with the MSVC compilers out-of-the box. Not all of
the external libraries are portable to Windows, either.
Installing CMake

View File

@ -523,6 +523,8 @@ The following options are available.
These should help to make source and documentation files conforming
to some the coding style preferences of the LAMMPS developers.
.. _clang-format:
Clang-format support
--------------------

View File

@ -43,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>`
@ -53,7 +52,6 @@ This is the list of packages that may require additional steps.
* :ref:`ML-POD <ml-pod>`
* :ref:`ML-QUIP <ml-quip>`
* :ref:`MOLFILE <molfile>`
* :ref:`MSCG <mscg>`
* :ref:`NETCDF <netcdf>`
* :ref:`OPENMP <openmp>`
* :ref:`OPT <opt>`
@ -141,6 +139,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 +159,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 +285,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
@ -624,6 +638,12 @@ They must be specified in uppercase.
* - VEGA90A
- GPU
- AMD GPU MI200 GFX90A
* - NAVI1030
- GPU
- AMD GPU V620/W6800
* - NAVI1100
- GPU
- AMD GPU RX7900XTX
* - INTEL_GEN
- GPU
- SPIR64-based devices, e.g. Intel GPUs, using JIT
@ -646,7 +666,7 @@ They must be specified in uppercase.
- GPU
- Intel GPU Ponte Vecchio
This list was last updated for version 3.7.1 of the Kokkos library.
This list was last updated for version 4.0.1 of the Kokkos library.
.. tabs::
@ -678,20 +698,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:
@ -711,9 +722,10 @@ This list was last updated for version 3.7.1 of the Kokkos library.
``cmake/presets`` folder, ``kokkos-serial.cmake``,
``kokkos-openmp.cmake``, ``kokkos-cuda.cmake``,
``kokkos-hip.cmake``, and ``kokkos-sycl.cmake``. They will enable
the KOKKOS package and enable some hardware choice. So to compile
with CUDA device parallelization (for GPUs with CC 5.0 and up)
with some common packages enabled, you can do the following:
the KOKKOS package and enable some hardware choices. For GPU
support those preset files must be customized to match the
hardware used. So to compile with CUDA device parallelization with
some common packages enabled, you can do the following:
.. code-block:: bash
@ -826,63 +838,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 +887,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
@ -982,59 +981,6 @@ Python version 3.6 or later.
----------
.. _mscg:
MSCG package
-----------------------
To build with this package, you must download and build the MS-CG
library. Building the MS-CG library requires that the GSL
(GNU Scientific Library) headers and libraries are installed on your
machine. See the ``lib/mscg/README`` and ``MSCG/Install`` files for
more details.
.. tabs::
.. tab:: CMake build
.. code-block:: bash
-D DOWNLOAD_MSCG=value # download MSCG for build, value = no (default) or yes
-D MSCG_LIBRARY=path # MSCG library file (only needed if a custom location)
-D MSCG_INCLUDE_DIR=path # MSCG include directory (only needed if a custom location)
If ``DOWNLOAD_MSCG`` is set, the MSCG library will be downloaded
and built inside the CMake build directory. If the MSCG library
is already on your system (in a location CMake cannot find it),
``MSCG_LIBRARY`` is the filename (plus path) of the MSCG library
file, not the directory the library file is in.
``MSCG_INCLUDE_DIR`` is the directory the MSCG include file is in.
.. tab:: Traditional make
You can download and build the MS-CG library manually if you
prefer; follow the instructions in ``lib/mscg/README``\ . You can
also do it in one step from the ``lammps/src`` dir, using a
command like these, which simply invokes the
``lib/mscg/Install.py`` script with the specified args:
.. code-block:: bash
make lib-mscg # print help message
make lib-mscg args="-b -m serial" # download and build in lib/mscg/MSCG-release-master
# with the settings compatible with "make serial"
make lib-mscg args="-b -m mpi" # download and build in lib/mscg/MSCG-release-master
# with the settings compatible with "make mpi"
make lib-mscg args="-p /usr/local/mscg-release" # use the existing MS-CG installation in /usr/local/mscg-release
Note that 2 symbolic (soft) links, ``includelink`` and ``liblink``,
will be created in ``lib/mscg`` to point to the MS-CG
``src/installation`` dir. When LAMMPS is built in src it will use
these links. You should not need to edit the
``lib/mscg/Makefile.lammps`` file.
----------
.. _opt:
OPT package
@ -1110,12 +1056,12 @@ additional details.
.. code-block:: bash
-D PYTHON_EXECUTABLE=path # path to Python executable to use
-D Python_EXECUTABLE=path # path to Python executable to use
Without this setting, CMake will guess the default Python version
on your system. To use a different Python version, you can either
create a virtualenv, activate it and then run cmake. Or you can
set the PYTHON_EXECUTABLE variable to specify which Python
set the Python_EXECUTABLE variable to specify which Python
interpreter should be used. Note note that you will also need to
have the development headers installed for this version,
e.g. python2-devel.
@ -1135,7 +1081,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 +1353,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 +1476,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 +1959,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 +2046,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 +2093,6 @@ To build with this package, you must download and build the
----------
.. _machdyn:
MACHDYN package
-------------------------------
To build with this package, you must download the Eigen3 library.
Eigen3 is a template library, so you do not need to build it.
.. tabs::
.. tab:: CMake build
.. code-block:: bash
-D DOWNLOAD_EIGEN3 # download Eigen3, value = no (default) or yes
-D EIGEN3_INCLUDE_DIR=path # path to Eigen library (only needed if a custom location)
If ``DOWNLOAD_EIGEN3`` is set, the Eigen3 library will be
downloaded and inside the CMake build directory. If the Eigen3
library is already on your system (in a location where CMake
cannot find it), set ``EIGEN3_INCLUDE_DIR`` to the directory the
``Eigen3`` include file is in.
.. tab:: Traditional make
You can download the Eigen3 library manually if you prefer; follow
the instructions in ``lib/smd/README``. You can also do it in one
step from the ``lammps/src`` dir, using a command like these,
which simply invokes the ``lib/smd/Install.py`` script with the
specified args:
.. code-block:: bash
make lib-smd # print help message
make lib-smd args="-b" # download to lib/smd/eigen3
make lib-smd args="-p /usr/include/eigen3" # use existing Eigen installation in /usr/include/eigen3
Note that a symbolic (soft) link named ``includelink`` is created
in ``lib/smd`` to point to the Eigen dir. When LAMMPS builds it
will use this link. You should not need to edit the
``lib/smd/Makefile.lammps`` file.
----------
.. _vtk:
VTK package

View File

@ -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

View File

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

View File

@ -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>`
@ -56,7 +55,6 @@ packages:
* :ref:`ML-POD <ml-pod>`
* :ref:`ML-QUIP <ml-quip>`
* :ref:`MOLFILE <molfile>`
* :ref:`MSCG <mscg>`
* :ref:`NETCDF <netcdf>`
* :ref:`OPENMP <openmp>`
* :ref:`OPT <opt>`
@ -184,6 +182,7 @@ make a copy of one of them and modify it to suit your needs.
cmake -C ../cmake/presets/all_on.cmake [OPTIONS] ../cmake # enable all packages
cmake -C ../cmake/presets/all_off.cmake [OPTIONS] ../cmake # disable all packages
mingw64-cmake -C ../cmake/presets/mingw-cross.cmake [OPTIONS] ../cmake # compile with MinGW cross-compilers
cmake -C ../cmake/presets/macos-multiarch.cmake [OPTIONS] ../cmake # compile serial multi-arch binaries on macOS
Presets that have names starting with "windows" are specifically for
compiling LAMMPS :doc:`natively on Windows <Build_windows>` and

View File

@ -459,27 +459,13 @@ those systems:
.. _exceptions:
Exception handling when using LAMMPS as a library
------------------------------------------------------------------
-------------------------------------------------
This setting is useful when external codes drive LAMMPS as a library.
With this option enabled, LAMMPS errors do not kill the calling code.
Instead, the call stack is unwound and control returns to the caller,
e.g. to Python. Of course, the calling code has to be set up to
*catch* exceptions thrown from within LAMMPS.
.. tabs::
.. tab:: CMake build
.. code-block:: bash
-D LAMMPS_EXCEPTIONS=value # yes or no (default)
.. tab:: Traditional make
.. code-block:: make
LMP_INC = -DLAMMPS_EXCEPTIONS <other LMP_INC settings>
LAMMPS errors do not kill the calling code, but throw an exception. In
the C-library interface, the call stack is unwound and control returns
to the caller, e.g. to Python or a code that is coupled to LAMMPS and
the error status can be queried. When using C++ directly, the calling
code has to be set up to *catch* exceptions thrown from within LAMMPS.
.. note::

View File

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

View File

@ -46,12 +46,15 @@ KOKKOS, o = OPENMP, t = OPT.
* :doc:`com/chunk <compute_com_chunk>`
* :doc:`contact/atom <compute_contact_atom>`
* :doc:`coord/atom (k) <compute_coord_atom>`
* :doc:`count/type <compute_count_type>`
* :doc:`damage/atom <compute_damage_atom>`
* :doc:`dihedral <compute_dihedral>`
* :doc:`dihedral/local <compute_dihedral_local>`
* :doc:`dilatation/atom <compute_dilatation_atom>`
* :doc:`dipole <compute_dipole>`
* :doc:`dipole/chunk <compute_dipole_chunk>`
* :doc:`dipole/tip4p <compute_dipole>`
* :doc:`dipole/tip4p/chunk <compute_dipole_chunk>`
* :doc:`displace/atom <compute_displace_atom>`
* :doc:`dpd <compute_dpd>`
* :doc:`dpd/atom <compute_dpd_atom>`
@ -61,7 +64,7 @@ KOKKOS, o = OPENMP, t = OPT.
* :doc:`entropy/atom <compute_entropy_atom>`
* :doc:`erotate/asphere <compute_erotate_asphere>`
* :doc:`erotate/rigid <compute_erotate_rigid>`
* :doc:`erotate/sphere <compute_erotate_sphere>`
* :doc:`erotate/sphere (k) <compute_erotate_sphere>`
* :doc:`erotate/sphere/atom <compute_erotate_sphere_atom>`
* :doc:`event/displace <compute_event_displace>`
* :doc:`fabric <compute_fabric>`
@ -88,6 +91,7 @@ KOKKOS, o = OPENMP, t = OPT.
* :doc:`ke/atom/eff <compute_ke_atom_eff>`
* :doc:`ke/eff <compute_ke_eff>`
* :doc:`ke/rigid <compute_ke_rigid>`
* :doc:`composition/atom (k) <compute_composition_atom>`
* :doc:`mliap <compute_mliap>`
* :doc:`momentum <compute_momentum>`
* :doc:`msd <compute_msd>`
@ -104,6 +108,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 +154,11 @@ KOKKOS, o = OPENMP, t = OPT.
* :doc:`sph/t/atom <compute_sph_t_atom>`
* :doc:`spin <compute_spin>`
* :doc:`stress/atom <compute_stress_atom>`
* :doc:`stress/cartesian <compute_stress_profile>`
* :doc:`stress/cylinder <compute_stress_profile>`
* :doc:`stress/cartesian <compute_stress_cartesian>`
* :doc:`stress/cylinder <compute_stress_curvilinear>`
* :doc:`stress/mop <compute_stress_mop>`
* :doc:`stress/mop/profile <compute_stress_mop>`
* :doc:`stress/spherical <compute_stress_profile>`
* :doc:`stress/spherical <compute_stress_curvilinear>`
* :doc:`stress/tally <compute_tally>`
* :doc:`tdpd/cc/atom <compute_tdpd_cc_atom>`
* :doc:`temp (k) <compute_temp>`

View File

@ -23,17 +23,14 @@ An alphabetic list of all LAMMPS :doc:`dump <dump>` commands.
* :doc:`atom <dump>`
* :doc:`atom/adios <dump_adios>`
* :doc:`atom/gz <dump>`
* :doc:`atom/mpiio <dump>`
* :doc:`atom/zstd <dump>`
* :doc:`cfg <dump>`
* :doc:`cfg/gz <dump>`
* :doc:`cfg/mpiio <dump>`
* :doc:`cfg/uef <dump_cfg_uef>`
* :doc:`cfg/zstd <dump>`
* :doc:`custom <dump>`
* :doc:`custom/adios <dump_adios>`
* :doc:`custom/gz <dump>`
* :doc:`custom/mpiio <dump>`
* :doc:`custom/zstd <dump>`
* :doc:`dcd <dump>`
* :doc:`grid <dump>`
@ -51,7 +48,6 @@ An alphabetic list of all LAMMPS :doc:`dump <dump>` commands.
* :doc:`xtc <dump>`
* :doc:`xyz <dump>`
* :doc:`xyz/gz <dump>`
* :doc:`xyz/mpiio <dump>`
* :doc:`xyz/zstd <dump>`
* :doc:`yaml <dump>`

View File

@ -29,6 +29,7 @@ OPT.
* :doc:`adapt/fep <fix_adapt_fep>`
* :doc:`addforce <fix_addforce>`
* :doc:`addtorque <fix_addtorque>`
* :doc:`alchemy <fix_alchemy>`
* :doc:`amoeba/bitorsion <fix_amoeba_bitorsion>`
* :doc:`amoeba/pitorsion <fix_amoeba_pitorsion>`
* :doc:`append/atoms <fix_append_atoms>`
@ -68,7 +69,8 @@ OPT.
* :doc:`drude/transform/inverse <fix_drude_transform>`
* :doc:`dt/reset (k) <fix_dt_reset>`
* :doc:`edpd/source <fix_dpd_source>`
* :doc:`efield <fix_efield>`
* :doc:`efield (k) <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,19 +104,18 @@ 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>`
* :doc:`momentum/chunk <fix_momentum>`
* :doc:`move <fix_move>`
* :doc:`mscg <fix_mscg>`
* :doc:`msst <fix_msst>`
* :doc:`mvv/dpd <fix_mvv_dpd>`
* :doc:`mvv/edpd <fix_mvv_dpd>`
@ -168,7 +170,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>`
@ -178,6 +181,7 @@ OPT.
* :doc:`pour <fix_pour>`
* :doc:`precession/spin <fix_precession_spin>`
* :doc:`press/berendsen <fix_press_berendsen>`
* :doc:`press/langevin <fix_press_langevin>`
* :doc:`print <fix_print>`
* :doc:`propel/self <fix_propel_self>`
* :doc:`property/atom (k) <fix_property_atom>`
@ -229,7 +233,7 @@ OPT.
* :doc:`spring <fix_spring>`
* :doc:`spring/chunk <fix_spring_chunk>`
* :doc:`spring/rg <fix_spring_rg>`
* :doc:`spring/self <fix_spring_self>`
* :doc:`spring/self (k) <fix_spring_self>`
* :doc:`srd <fix_srd>`
* :doc:`store/force <fix_store_force>`
* :doc:`store/state <fix_store_state>`
@ -257,12 +261,13 @@ OPT.
* :doc:`wall/body/polyhedron <fix_wall_body_polyhedron>`
* :doc:`wall/colloid <fix_wall>`
* :doc:`wall/ees <fix_wall_ees>`
* :doc:`wall/gran <fix_wall_gran>`
* :doc:`wall/gran (k) <fix_wall_gran>`
* :doc:`wall/gran/region <fix_wall_gran_region>`
* :doc:`wall/harmonic <fix_wall>`
* :doc:`wall/lj1043 <fix_wall>`
* :doc:`wall/lj126 <fix_wall>`
* :doc:`wall/lj93 (k) <fix_wall>`
* :doc:`wall/lepton <fix_wall>`
* :doc:`wall/morse <fix_wall>`
* :doc:`wall/piston <fix_wall_piston>`
* :doc:`wall/reflect (k) <fix_wall_reflect>`
@ -270,4 +275,5 @@ OPT.
* :doc:`wall/region <fix_wall_region>`
* :doc:`wall/region/ees <fix_wall_ees>`
* :doc:`wall/srd <fix_wall_srd>`
* :doc:`wall/table <fix_wall>`
* :doc:`widom <fix_widom>`

View File

@ -37,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>`
@ -215,7 +220,8 @@ OPT.
* :doc:`morse/soft <pair_fep_soft>`
* :doc:`multi/lucy <pair_multi_lucy>`
* :doc:`multi/lucy/rx (k) <pair_multi_lucy_rx>`
* :doc:`nb3b/harmonic <pair_nb3b_harmonic>`
* :doc:`nb3b/harmonic <pair_nb3b>`
* :doc:`nb3b/screened <pair_nb3b>`
* :doc:`nm/cut (o) <pair_nm>`
* :doc:`nm/cut/coul/cut (o) <pair_nm>`
* :doc:`nm/cut/coul/long (o) <pair_nm>`
@ -260,7 +266,7 @@ OPT.
* :doc:`smd/tri_surface <pair_smd_triangulated_surface>`
* :doc:`smd/ulsph <pair_smd_ulsph>`
* :doc:`smtbq <pair_smtbq>`
* :doc:`snap (k) <pair_snap>`
* :doc:`snap (ik) <pair_snap>`
* :doc:`soft (go) <pair_soft>`
* :doc:`sph/heatconduction <pair_sph_heatconduction>`
* :doc:`sph/idealgas <pair_sph_idealgas>`
@ -300,5 +306,5 @@ OPT.
* :doc:`wf/cut <pair_wf_cut>`
* :doc:`ylz <pair_ylz>`
* :doc:`yukawa (gko) <pair_yukawa>`
* :doc:`yukawa/colloid (go) <pair_yukawa_colloid>`
* :doc:`yukawa/colloid (gko) <pair_yukawa_colloid>`
* :doc:`zbl (gko) <pair_zbl>`

View File

@ -38,6 +38,20 @@ been folded into the :doc:`reset_atoms <reset_atoms>` command. If
present, LAMMPS will replace the commands accordingly and print a
warning.
LATTE package
-------------
.. deprecated:: 15Jun2023
The LATTE package with the fix latte command was removed from LAMMPS.
This functionality has been superseded by :doc:`fix mdi/qm <fix_mdi_qm>`
and :doc:`fix mdi/qmmm <fix_mdi_qmmm>` from the :ref:`MDI package
<PKG-MDI>`. These fixes are compatible with several quantum software
packages, including LATTE. See the ``examples/QUANTUM`` dir and the
:doc:`MDI coupling HOWTO <Howto_mdi>` page. MDI supports running LAMMPS
with LATTE as a plugin library (similar to the way fix latte worked), as
well as on a different set of MPI processors.
MEAM package
------------
@ -71,6 +85,35 @@ The same functionality is available through
:doc:`bond style mesocnt <bond_mesocnt>` and
:doc:`angle style mesocnt <angle_mesocnt>`.
MPIIO package
-------------
.. deprecated:: 21Nov2023
The MPIIO package has been removed from LAMMPS since it was unmaintained
for many years and thus not updated to incorporate required changes that
had been applied to the corresponding non-MPIIO commands. As a
consequence the MPIIO commands had become unreliable and sometimes
crashing LAMMPS or corrupting data. Similar functionality is available
through the :ref:`ADIOS package <PKG-ADIOS>` and the :ref:`NETCDF
package <PKG-NETCDF>`. Also, the :doc:`dump_modify nfile or dump_modify
fileper <dump_modify>` keywords may be used for an efficient way of
writing out dump files when running on large numbers of processors.
Similarly, the "nfile" and "fileper" keywords exist for restarts:
see :doc:`restart <restart>`, :doc:`read_restart <read_restart>`,
:doc:`write_restart <write_restart>`.
MSCG package
------------
.. deprecated:: 21Nov2023
The MSCG package has been removed from LAMMPS since it was unmaintained
for many years and instead superseded by the `OpenMSCG software
<https://software.rcc.uchicago.edu/mscg/>`_ of the Voth group at the
University of Chicago, which can be used independent from LAMMPS.
REAX package
------------

View File

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

View File

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

View File

@ -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*

View File

@ -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++

View File

@ -11,6 +11,7 @@ Available topics are:
- `Reading and parsing of text and text files`_
- `Requesting and accessing neighbor lists`_
- `Choosing between a custom atom style, fix property/atom, and fix STORE/ATOM`_
- `Fix contributions to instantaneous energy, virial, and cumulative energy`_
- `KSpace PPPM FFT grids`_
@ -73,6 +74,8 @@ when converting "12.5", while the ValueTokenizer class will throw an
:cpp:func:`ValueTokenizer::next_int()
<LAMMPS_NS::ValueTokenizer::next_int>` is called on the same string.
.. _request-neighbor-list:
Requesting and accessing neighbor lists
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -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
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

View File

@ -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()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

View File

@ -643,6 +643,8 @@ Tohoku University (under MIT license)
---------------------------
.. _communication_buffer_coding_with_ubuf:
Communication buffer coding with *ubuf*
---------------------------------------

View File

@ -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

View 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

File diff suppressed because it is too large Load Diff

View File

@ -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
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

View File

@ -7148,9 +7148,6 @@ keyword to allow for additional bonds to be formed
*Read_dump xyz fields do not have consistent scaling/wrapping*
Self-explanatory.
*Reading from MPI-IO filename when MPIIO package is not installed*
Self-explanatory.
*Reax_defs.h setting for NATDEF is too small*
Edit the setting in the ReaxFF library and re-compile the
library and re-build LAMMPS.
@ -8489,9 +8486,6 @@ keyword to allow for additional bonds to be formed
The write_restart command cannot be used before a read_data,
read_restart, or create_box command.
*Writing to MPI-IO filename when MPIIO package is not installed*
Self-explanatory.
*Zero length rotation vector with displace_atoms*
Self-explanatory.

View File

@ -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) |
@ -106,8 +104,6 @@ Lowercase directories
+-------------+------------------------------------------------------------------+
| min | energy minimization of 2d LJ melt |
+-------------+------------------------------------------------------------------+
| mscg | parameterize a multi-scale coarse-graining (MSCG) model |
+-------------+------------------------------------------------------------------+
| msst | MSST shock dynamics |
+-------------+------------------------------------------------------------------+
| multi | multi neighboring for systems with large interaction disparities |

View File

@ -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
@ -205,12 +194,14 @@ Below is an example demonstrating some of the possible uses.
PROGRAM testprop
USE LIBLAMMPS
USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_double, c_int64_t
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
REAL(KIND=c_double), POINTER :: dt
INTEGER(KIND=c_int64_t), POINTER :: ntimestep
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()
@ -222,6 +213,26 @@ Below is an example demonstrating some of the possible uses.
lmp%extract_setting('ntypes'), ' atom types'
CALL lmp%command('run 2 post no')
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
dt = lmp%extract_global('dt')
ntimestep = lmp%extract_global('ntimestep')
WRITE(OUTPUT_UNIT,'(A,I0,A,F4.1,A)') 'At step: ', ntimestep, &
@ -232,8 +243,8 @@ Below is an example demonstrating some of the possible uses.
WRITE(OUTPUT_UNIT,'(A,I0)') 'At step: ', ntimestep
pe = lmp%get_thermo('pe')
ke = lmp%get_thermo('ke')
PRINT*, 'PE = ', pe
PRINT*, 'KE = ', 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.
@ -2172,19 +2278,13 @@ Procedures Bound to the :f:type:`lammps` Derived Type
.. versionadded:: 3Nov2022
In case of an error, LAMMPS will either abort or throw a C++ exception.
The latter has to be :ref:`enabled at compile time <exceptions>`.
This function checks if exceptions were enabled.
When using the library interface with C++ exceptions enabled, the library
interface functions will "catch" them, and the error status can then be
checked by calling :f:func:`has_error`. The most recent error message can be
retrieved via :f:func:`get_last_error_message`.
This can allow one to restart a calculation or delete and recreate
the LAMMPS instance when a C++ exception occurs. One application
of using exceptions this way is the :ref:`lammps_shell`. If C++
exceptions are disabled and an error happens during a call to
LAMMPS or the Fortran API, the application will terminate.
When using the library interface, the library interface functions
will "catch" exceptions, and then the error status can be checked by
calling :f:func:`has_error`. The most recent error message can be
retrieved via :f:func:`get_last_error_message`. This allows to
restart a calculation or delete and recreate the LAMMPS instance when
a C++ exception occurs. One application of using exceptions this way
is the :ref:`lammps_shell`.
:to: :cpp:func:`lammps_config_has_exceptions`
:r has_exceptions:

View File

@ -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

View File

@ -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

View File

@ -170,9 +170,9 @@ with this body style to compute body/body and body/non-body interactions.
The *rounded/polygon* body style represents body particles as a 2d
polygon with a variable number of N vertices. This style can only be
used for 2d models; see the :doc:`boundary <boundary>` command. See the
"pair_style body/rounded/polygon" page for a diagram of two
squares with rounded circles at the vertices. Special cases for N = 1
(circle) and N = 2 (rod with rounded ends) can also be specified.
:doc:`pair_style body/rounded/polygon <pair_body_rounded_polygon>` page for
a diagram of two squares with rounded circles at the vertices. Special cases
for N = 1 (circle) and N = 2 (rod with rounded ends) can also be specified.
One use of this body style is for 2d discrete element models, as
described in :ref:`Fraige <body-Fraige>`.

View File

@ -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

View File

@ -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.

View File

@ -1,11 +1,11 @@
Using CMake with LAMMPS tutorial
================================
Using CMake with LAMMPS
=======================
The support for building LAMMPS with CMake is a recent addition to
LAMMPS thanks to the efforts of Christoph Junghans (LANL) and Richard
Berger (Temple U). One of the key strengths of CMake is that it is not
tied to a specific platform or build system and thus generate the files
necessary to build and develop for different build systems and on
Berger (LANL). One of the key strengths of CMake is that it is not
tied to a specific platform or build system. Instead it generates the
files necessary to build and develop for different build systems and on
different platforms. Note, that this applies to the build system itself
not the LAMMPS code. In other words, without additional porting effort,
it is not possible - for example - to compile LAMMPS with Visual C++ on
@ -14,7 +14,7 @@ necessary to program LAMMPS as a project in integrated development
environments (IDE) like Eclipse, Visual Studio, QtCreator, Xcode,
CodeBlocks, Kate and others.
A second important feature of CMake is, that it can detect and validate
A second important feature of CMake is that it can detect and validate
available libraries, optimal settings, available support tools and so
on, so that by default LAMMPS will take advantage of available tools
without requiring to provide the details about how to enable/integrate
@ -32,8 +32,8 @@ program ``cmake`` (or ``cmake3``), a text mode interactive user
interface (TUI) program ``ccmake`` (or ``ccmake3``), or a graphical user
interface (GUI) program ``cmake-gui``. All of them are portable
software available on all supported platforms and can be used
interchangeably. The minimum supported CMake version is 3.10 (3.12 or
later is recommended).
interchangeably. As of LAMMPS version 2 August 2023, the minimum
required CMake version is 3.16.
All details about features and settings for CMake are in the `CMake
online documentation <https://cmake.org/documentation/>`_. We focus
@ -43,11 +43,20 @@ Prerequisites
-------------
This tutorial assumes that you are operating in a command-line environment
using a shell like Bash.
using a shell like Bash or Zsh.
- Linux: any Terminal window will work
- macOS: launch the Terminal application.
- Windows 10: install and run the :doc:`Windows Subsystem for Linux <Howto_wsl>`
- Linux: any Terminal window will work or text console
- macOS: launch the Terminal application
- Windows 10 or 11: install and run the :doc:`Windows Subsystem for Linux <Howto_wsl>`
- other Unix-like operating systems like FreeBSD
.. note::
It is also possible to use CMake on Windows 10 or 11 through either the Microsoft
Visual Studio IDE with the bundled CMake or from the Windows command prompt using
a separately installed CMake package, both using the native Microsoft Visual C++
compilers and (optionally) the Microsoft MPI SDK. This tutorial, however, only
covers unix-like command line interfaces.
We also assume that you have downloaded and unpacked a recent LAMMPS source code package
or used Git to create a clone of the LAMMPS sources on your compilation machine.
@ -338,8 +347,6 @@ Some common LAMMPS specific variables
- common compiler flags, for optimization or instrumentation (default:)
* - ``LAMMPS_MACHINE``
- when set to ``name`` the LAMMPS executable and library will be called ``lmp_name`` and ``liblammps_name.a``
* - ``LAMMPS_EXCEPTIONS``
- when set to ``on`` errors will throw a C++ exception instead of aborting (default: ``off``)
* - ``FFT``
- select which FFT library to use: ``FFTW3``, ``MKL``, ``KISS`` (default, unless FFTW3 is found)
* - ``FFT_SINGLE``
@ -412,9 +419,9 @@ interface (``ccmake`` or ``cmake-gui``).
Using a preset to select a compiler package (``clang.cmake``,
``gcc.cmake``, ``intel.cmake``, ``oneapi.cmake``, or ``pgi.cmake``)
are an exception to the mechanism of updating the configuration incrementally,
as they will trigger a reset of cached internal CMake settings and thus
reset settings to their default values.
are an exception to the mechanism of updating the configuration
incrementally, as they will trigger a reset of cached internal CMake
settings and thus reset settings to their default values.
Compilation and build targets
-----------------------------

View File

@ -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

View File

@ -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>`_

View File

@ -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>`.

View File

@ -0,0 +1,700 @@
Using the LAMMPS GUI
====================
This document describes **LAMMPS GUI version 1.5**.
-----
LAMMPS GUI is a graphical text editor customized for editing LAMMPS
input files that is linked to the :ref:`LAMMPS library <lammps_c_api>`
and thus can run LAMMPS directly using the contents of the editor's text
buffer as input. It can retrieve and display information from LAMMPS
while it is running, display visualizations created with the :doc:`dump
image command <dump_image>`, and is adapted specifically for editing
LAMMPS input files through text completion and reformatting, and linking
to the online LAMMPS documentation for known LAMMPS commands and styles.
.. note::
Pre-compiled, ready-to-use LAMMPS GUI executables for Linux (Ubuntu
20.04LTS or later and compatible), macOS (version 11 aka Big Sur or
later), and Windows (version 10 or later) :ref:`are available
<lammps_gui_install>` for download. They may be linked to a
development version of LAMMPS in case they need features not yet
available in a released version. Serial LAMMPS executables of the
same LAMMPS version are included as well. The source code for the
LAMMPS GUI is included in the LAMMPS source code and can be found in
the ``tools/lammps-gui`` folder. It can be compiled alongside LAMMPS
when :doc:`compiling with CMake <Build_cmake>`.
LAMMPS GUI tries to provide an experience similar to what people
traditionally would do to run LAMMPS using a command line window:
- editing inputs with a text editor
- run LAMMPS on the input with selected command line flags
- and then use or extract data from the created files and visualize it
That procedure is quite effective for people proficient in using the
command line, as that allows them to use tools for the individual steps
which they are most comfortable with. It is often required when running
LAMMPS on high-performance computing facilities.
The main benefit of using the LAMMPS GUI application instead is that
many basic tasks can be done directly from the GUI without switching to
a text console window or using external programs, let alone writing
scripts to extract data from the generated output. It also integrates
well with graphical desktop environments.
LAMMPS GUI thus makes it easier for beginners to get started running
simple LAMMPS simulations. It is very suitable for tutorials on LAMMPS
since you only need to learn how to use a single program for most tasks
and thus time can be saved and people can focus on learning LAMMPS. It
is also designed to keep the barrier low when you decide to switch to a
full featured, standalone programming editor and more sophisticated
visualization and analysis tools and run LAMMPS from a command line.
The following text provides a detailed tour of the features and
functionality of the LAMMPS GUI.
Suggestions for new features and reports of bugs are always welcome.
You can use the :doc:`the same channels as for LAMMPS itself
<Errors_bugs>` for that purpose.
-----
Main window
-----------
When LAMMPS GUI starts, it will show a main window with either an
empty buffer or the contents of a loaded file. In the latter case it
may look like the following:
.. image:: JPG/lammps-gui-main.png
:align: center
:scale: 50%
There is the typical menu bar at the top, then the main editor buffer,
and a status bar at the bottom. The input file contents are shown
with line numbers on the left and the input is colored according to
the LAMMPS input file syntax. The status bar shows the status of
LAMMPS execution on the left (e.g. "Ready." when idle) and the current
working directory on the right. The name of the current file in the
buffer is shown in the window title; the word `*modified*` is added if
the buffer edits have not yet saved to a file. The size of the main
window will be stored when exiting and restored when starting again.
Opening Files
^^^^^^^^^^^^^
The LAMMPS GUI application will try to open the first command line
argument as a LAMMPS input script, 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 graphical file manager into the editor window. Only one
file can be open at a time, so opening a new file with a filled buffer
will close the buffer. If the buffer has unsaved modifications, you
will be asked to either cancel the operation, discard the changes, or
save them.
Running LAMMPS
^^^^^^^^^^^^^^
From within the LAMMPS GUI main window LAMMPS can be started either from
the ``Run`` menu using the ``Run LAMMPS from Editor Buffer`` entry, by
the keyboard shortcut `Ctrl-Enter` (`Command-Enter` on macOS), or by
clicking on the green "Run" button in the status bar. All of these
operations will cause LAMMPS to process the entire input script, which
may contain multiple :doc:`run <run>` or :doc:`minimize <minimize>`
commands.
LAMMPS runs in a separate thread, so the GUI stays responsive and is
able to interact with the running calculation and access data it
produces. It is important to note that running LAMMPS this way is
using the contents of the input buffer for the run (via the
:cpp:func:`lammps_commands_string()` function of the LAMMPS C-library
interface), and **not** the original file it was read from. Thus, if
there are unsaved changes in the buffer, they *will* be used. As an
alternative, it is also possible to run LAMMPS by reading the contents
of a file from the ``Run LAMMPS from File`` menu entry or with
`Ctrl-Shift-Enter`. This option may be required in some rare cases
where the input uses some functionality that is not compatible with
running LAMMPS from a string buffer. For consistency, any unsaved
changes in the buffer must be either saved to the file or undone
before LAMMPS can be run from a file.
.. 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 also show the number of active 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 for
the current :doc:`run command <run>`.
Also, the line number of the currently executed command will be
highlighted in green.
.. image:: JPG/lammps-gui-run-highlight.png
:align: center
:scale: 75%
If an error occurs (in the example below the command :doc:`label
<label>` was incorrectly capitalized as "Label"), an error message
dialog will be shown and the line of the input which triggered the
error will be highlighted. The state of LAMMPS in the status bar will
be set to "Failed." instead of "Ready."
.. image:: JPG/lammps-gui-run-error.png
:align: center
:scale: 75%
Up to three additional windows will open during a run:
- a log window with the captured screen output
- a chart window with a line graph created from the thermodynamic output of the run
- a slide show window with images created by a :doc:`dump image command <dump_image>`
More information on those windows and how to adjust their behavior and
contents is given below.
An active LAMMPS run can be stopped cleanly by using either the ``Stop
LAMMPS`` entry in the ``Run`` menu, the keyboard shortcut `Ctrl-/`
(`Command-/` on macOS), or by clicking on the red button in the status
bar. This will cause the running LAMMPS process to complete the current
timestep (or iteration for energy minimization) and then complete the
processing of the buffer while skipping all run or minimize commands.
This is equivalent to the input script command :doc:`timer timeout 0
<timer>` and is implemented by calling the
:cpp:func:`lammps_force_timeout()` function of the LAMMPS C-library
interface. Please see the corresponding documentation pages to
understand the implications of this operation.
Log Window
----------
By default, when starting a run, a "Log Window" will open that displays
the current screen output of the LAMMPS calculation, that would normally
be seen in the command line window, as shown below.
.. image:: JPG/lammps-gui-log.png
:align: center
:scale: 50%
LAMMPS GUI captures the screen output as it is generated and updates
the log window regularly during a run.
By default, the log window will be replaced each time a run is started.
The runs are counted and the run number for the current run is displayed
in the window title. It is possible to change the behavior of LAMMPS
GUI in the preferences dialog to create a *new* log window for every run
or to not show the current log window. It is also possible to show or
hide the *current* log window from the ``View`` menu.
The text in the log window is read-only and cannot be modified, but
keyboard shortcuts to select and copy all or parts of the text can be
used to transfer text to another program. Also, the keyboard shortcut
`Ctrl-S` (`Command-S` on macOS) is available to save the log buffer to a
file. The "Select All" and "Copy" functions, as well as a "Save Log to
File" option are also available from a context menu by clicking with the
right mouse button into the log window text area.
Chart Window
------------
By default, when starting a run, a "Chart Window" will open that
displays a plot of thermodynamic output of the LAMMPS calculation as
shown below.
.. image:: JPG/lammps-gui-chart.png
:align: center
:scale: 50%
The drop down menu on the top right allows selection of different
properties that are computed and written to thermo output. Only one
property can be shown at a time. The plots will be updated with new
data as the run progresses, so they can be used to visually monitor the
evolution of available properties. The window title will show the
current run number that this chart window corresponds to. Same as
explained for the log window above, by default, the chart window will
be replaced on each new run, but the behavior can be changed in the
preferences dialog.
From the ``File`` menu on the top left, it is possible to save an image
of the currently displayed plot or export the data in either plain text
columns (for use by plotting tools like `gnuplot
<http://www.gnuplot.info/>`_ or `grace
<https://plasma-gate.weizmann.ac.il/Grace/>`_), or as CSV data which can
be imported for further processing with Microsoft Excel or `pandas
<https://pandas.pydata.org/>`_
Thermo output data from successive run commands in the input script will
be combined into a single data set unless the format, number, or names
of output columns are changed with a :doc:`thermo_style <thermo_style>`
or a :doc:`thermo_modify <thermo_modify>` command, or the current time
step is reset with :doc:`reset_timestep <reset_timestep>`, or if a
:doc:`clear <clear>` command is issued.
Image Slide Show
----------------
By default, if the LAMMPS input contains a :doc:`dump image
<dump_image>` command, a "Slide Show" window will open which loads and
displays the images created by LAMMPS as they are written.
.. image:: JPG/lammps-gui-slideshow.png
:align: center
:scale: 50%
The various buttons at the bottom right of the window allow single
stepping through the sequence of images or playing an animation (as a
continuous loop or once from first to last). It is also possible to
zoom in or zoom out of the displayed images, and to export the slide
show animation to a movie file, if `ffmpeg <https://ffmpeg.org/>`_ is
installed.
Variable Info
-------------
During a run, it may be of interest to monitor the value of input script
variables, for example to monitor the progress of loops. This can be
done by enabling the "Variables Window" in the ``View`` menu or by using
the `Ctrl-Shift-W` keyboard shortcut. This will show info similar to
the :doc:`info variables <info>` command in a separate window as shown
below.
.. image:: JPG/lammps-gui-variable-info.png
:align: center
:scale: 75%
Like the log and chart windows, its content is continuously updated
during a run. It will show "(none)" if there are no variables
defined. Note that it is also possible to *set* :doc:`index style
variables <variable>`, that would normally be set via command line
flags, via the "Set Variables..." dialog from the ``Run`` menu.
LAMMPS GUI will automatically set the variable "gui_run" to the
current value of the run counter. That way it would be possible
to automatically record a log for each run attempt by using the
command
.. code-block:: LAMMPS
log logfile-${gui_run}.txt
at the beginning of an input file. That would record logs to files
``logfile-1.txt``, ``logfile-2.txt``, and so on for successive runs.
Viewing Snapshot Images
-----------------------
By selecting the ``Create Image`` entry in the ``Run`` menu, or by
hitting the `Ctrl-I` (`Command-I` on macOS) keyboard shortcut, or by
clicking on the "palette" button in the status bar, LAMMPS GUI will send
a custom :doc:`write_dump image <dump_image>` command to LAMMPS and read
the resulting snapshot image with the current state of the system into
an image viewer window. This functionality is not available *during* an
ongoing run. When LAMMPS is not yet initialized, LAMMPS GUI will try to
identify the line with the first run or minimize command and execute all
command up to that line from the input buffer and then add a "run 0"
command. This will initialize the system so an image of the initial
state of the system can be rendered. If there was an error, the
snapshot image viewer will not appear.
When possible, LAMMPS GUI will try to detect which elements the atoms
correspond to (via their mass) and then colorize them in the image
accordingly. Otherwise the default predefined sequence of colors is
assigned to the 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 (SSAO) rendering, anti-aliasing, view
style, display of box or axes, zoom factor. The view of the system
can be rotated horizontally and vertically. It is also possible to
only display the atoms within a group defined in the input script
(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 new image; it will be
grayed out when it is finished. When there are many atoms to render
and high quality images with anti-aliasing are requested, re-rendering
may take several seconds. From the ``File`` menu of the image window,
the current image can be saved to a file or copied into the
cut-n-paste buffer for pasting into another application.
Editor Functions
----------------
The editor has most of the usual functionality that similar programs
have: text selection via mouse or with cursor moves while holding the
Shift key, Cut (`Ctrl-X`), Copy (`Ctrl-C`), Paste (`Ctrl-V`), Undo
(`Ctrl-Z`), Redo (`Ctrl-Shift-Z`), Select All (`Ctrl-A`). When trying
to exit the editor with a modified buffer, a dialog will pop up asking
whether to cancel the exit operation, or to save or not save the buffer
contents to a file.
Context Specific Word Completion
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
By default, LAMMPS GUI will display a small pop-up frame with possible
choices for LAMMPS input script commands or styles after 2 characters of
a word have been typed.
.. image:: JPG/lammps-gui-complete.png
:align: center
:scale: 75%
The word can then be completed through selecting an entry by scrolling
up and down with the cursor keys and selecting with the 'Enter' key or
by clicking on the entry with the mouse. The automatic completion
pop-up can be disabled in the ``Preferences`` dialog, but the completion
can still be requested manually by either hitting the 'Shift-TAB' key or
by right-clicking with the mouse and selecting the option from the
context menu. Most of the completion information is taken from the
LAMMPS instance and thus it will be adjusted to only show available
options that have been enabled while compiling LAMMPS. That, however,
excludes accelerated styles and commands; for improved clarity, only the
non-suffix version of styles are shown.
Line Reformatting
^^^^^^^^^^^^^^^^^
The editor supports reformatting lines according to the syntax in order
to have consistently aligned lines. This primarily means adding
whitespace padding to commands, type specifiers, IDs and names. This
reformatting is performed by default when hitting the 'Enter' key to
start a new line. This feature can be turned on or off in the
``Preferences`` dialog, but it can still be manually performed by
hitting the 'TAB' key. The amount of padding can also be changed in the
``Preferences`` dialog.
Internally this functionality is achieved by splitting the line into
"words" and then putting it back together with padding added where the
context can be detected; otherwise a single space is used between words.
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 done by
either clicking the right mouse button or by using the `Ctrl-?` keyboard
shortcut. 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 keyboard, the first of
those entries will be chosen directly.
Menu
----
The menu bar has 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, the key
corresponding the underlined letters can again be used to select entries
instead of using 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 operation, or to save or not save the
edited file.
In addition, up to 5 recent file names will be listed after the
``Open`` entry that allows re-opening 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``. It can also open a
``Preferences`` dialog (keyboard shortcut `Ctrl-P`) and allows deletion
of all stored preferences so they will be reset to default values.
Run
^^^
The ``Run`` menu has options 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`. The buffer contents then executed 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. As an alternative, it is also
possible to run LAMMPS using the contents of the edited file by
reading the file. This is mainly provided as a fallback option in
case the input uses some feature that is not available when running
from a string buffer.
The LAMMPS calculation will be run in a concurrent thread so that the
GUI can stay responsive and 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, if the built-in parser can detect them. New
rows for additional variables can be added through the ``Add Row``
button and existing rows can be deleted by clicking on the ``X`` icons
on the right.
The ``Create 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>` containing 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 launch VMD with a :doc:`data file
<write_data>` containing 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 additional windows with log
output, charts, slide show, variables, or snapshot images. The
default settings for their visibility 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`` 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. The ``LAMMPS GUI Howto``
entry will open this documentation page from the online documentation
in a web browser window. The ``LAMMPS Manual`` entry will open the
main page of the LAMMPS documentation in the web browser.
-----
Preferences
-----------
The ``Preferences`` dialog allows customization of the behavior and
look 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: 24%
.. |guiprefs2| image:: JPG/lammps-gui-prefs-accel.png
:width: 24%
.. |guiprefs3| image:: JPG/lammps-gui-prefs-image.png
:width: 24%
.. |guiprefs4| image:: JPG/lammps-gui-prefs-editor.png
:width: 24%
|guiprefs1| |guiprefs2| |guiprefs3| |guiprefs4|
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 by default, since LAMMPS GUI 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.
- *Show slide show window by default:* when checked, a slide show
window will be shown with images from a dump image command, if
present, in the LAMMPS input.
- *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 option is only visible
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.
- *GUI update interval:* Allows to set the time interval between GUI
and data updates during a LAMMPS run in milliseconds. The default is
to update the GUI every 100 milliseconds. This is good for most cases.
For LAMMPS runs that run very fast, however, data may be missed and
through lowering this interval, this can be corrected. However, this
will make the GUI use more resources, which may be a problem on some
computers with slower CPUs. The default value is 100 milliseconds.
Accelerators:
^^^^^^^^^^^^^
This tab enables selection of an accelerator package for LAMMPS to use
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 setting
the maximum number of threads for the accelerator packages that use
threads.
Snapshot Image:
^^^^^^^^^^^^^^^
This tab allows setting defaults for the snapshot images displayed in
the ``Image Viewer`` window, such as its dimensions and the zoom
factor applied. The *Antialias* switch will render images with twice
the number of pixels for width and height and then smoothly scale 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 screen space
ambient occlusion (SSAO) mode when rendering images. This is also
more time consuming, but produces a more 'spatial' representation of
the system shading of atoms by their depth. The *VDW Style* checkbox
selects whether atoms are represented by space filling spheres when
checked or by smaller spheres and sticks. Finally there are a couple
of drop down lists to select the background and box colors.
Editor Settings:
^^^^^^^^^^^^^^^^
This tab allows tweaking settings of the editor window. Specifically
the amount of padding to be added to LAMMPS commands, types or type
ranges, IDs (e.g. for fixes), and names (e.g. for groups). The value
set is the minimum width for the text element and it can be chosen in
the range between 1 and 32.
The two settings which follow enable or disable the automatic
reformatting when hitting the 'Enter' key and the automatic display of
the completion pop-up window.
-----------
Keyboard Shortcuts
------------------
Almost all functionality is accessible from the menu of the editor
window or through keyboard shortcuts. The following shortcuts are
available (On macOS use the Command key instead of Ctrl/Control).
.. list-table::
:header-rows: 1
:widths: auto
* - Shortcut
- Function
- Shortcut
- Function
- Shortcut
- Function
* - Ctrl+N
- New File
- Ctrl+Z
- Undo edit
- Ctrl+Enter
- Run Input
* - Ctrl+O
- Open File
- Ctrl+Shift+Z
- Redo edit
- Ctrl+/
- Stop Active Run
* - Ctrl+S
- Save File
- Ctrl+C
- Copy text
- Ctrl+Shift+V
- Set Variables
* - Ctrl+Shift+S
- Save File As
- Ctrl+X
- Cut text
- Ctrl+I
- Snapshot Image
* - Ctrl+Q
- Quit Application
- Ctrl+V
- Paste text
- Ctrl+L
- Slide Show
* - Ctrl+W
- Close Window
- Ctrl+A
- Select All
- Ctrl+P
- Preferences
* - Ctrl+Shift+A
- About LAMMPS
- Ctrl+Shift+H
- Quick Help
- Ctrl+Shift+G
- LAMMPS GUI Howto
* - Ctrl+Shift+M
- LAMMPS Manual
- Ctrl+?
- Context Help
- Ctrl+Shift+W
- Show Variables
* - Ctrl+Shift+Enter
- Run File
- TAB
- Reformat line
- Shift+TAB
- Show Completions
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.
All other windows only support a subset of keyboard shortcuts listed
above. Typically, the shortcuts `Ctrl-/` (Stop Run), `Ctrl-W` (Close
Window), and `Ctrl-Q` (Quit Application) are supported.

View File

@ -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.

View File

@ -1,7 +1,7 @@
Output from LAMMPS (thermo, dumps, computes, fixes, variables)
==============================================================
There are four basic kinds of LAMMPS output:
There are four basic forms of LAMMPS output:
* :doc:`Thermodynamic output <thermo_style>`, which is a list of
quantities printed every few timesteps to the screen and logfile.
@ -20,18 +20,17 @@ output files, depending on what :doc:`dump <dump>` and :doc:`fix <fix>`
commands you specify.
As discussed below, LAMMPS gives you a variety of ways to determine
what quantities are computed and printed when the thermodynamics,
what quantities are calculated and printed when the thermodynamics,
dump, or fix commands listed above perform output. Throughout this
discussion, note that users can also :doc:`add their own computes and
fixes to LAMMPS <Modify>` which can then generate values that can then
be output with these commands.
fixes to LAMMPS <Modify>` which can generate values that can then be
output with these commands.
The following subsections discuss different LAMMPS commands related
to output and the kind of data they operate on and produce:
* :ref:`Global/per-atom/local/per-grid data <global>`
* :ref:`Scalar/vector/array data <scalar>`
* :ref:`Per-grid data <grid>`
* :ref:`Disambiguation <disambiguation>`
* :ref:`Thermodynamic output <thermo>`
* :ref:`Dump file output <dump>`
@ -48,34 +47,65 @@ to output and the kind of data they operate on and produce:
Global/per-atom/local/per-grid data
-----------------------------------
Various output-related commands work with four different styles of
Various output-related commands work with four different "styles" of
data: global, per-atom, local, and per-grid. A global datum is one or
more system-wide values, e.g. the temperature of the system. A
per-atom datum is one or more values per atom, e.g. the kinetic energy
of each atom. Local datums are calculated by each processor based on
the atoms it owns, but there may be zero or more per atom, e.g. a list
the atoms it owns, and there may be zero or more per atom, e.g. a list
of bond distances.
A per-grid datum is one or more values per grid cell, for a grid which
overlays the simulation domain. The grid cells and the data they
store are distributed across processors; each processor owns the grid
cells whose center point falls within its subdomain.
overlays the simulation domain. Similar to atoms and per-atom data,
the grid cells and the data they store are distributed across
processors; each processor owns the grid cells whose center points
fall within its subdomain.
.. _scalar:
Scalar/vector/array data
------------------------
Global, per-atom, and local datums can come in three kinds: a single
scalar value, a vector of values, or a 2d array of values. The doc
page for a "compute" or "fix" or "variable" that generates data will
specify both the style and kind of data it produces, e.g. a per-atom
vector.
Global, per-atom, local, and per-grid datums can come in three
"kinds": a single scalar value, a vector of values, or a 2d array of
values. More specifically these are the valid kinds for each style:
When a quantity is accessed, as in many of the output commands
discussed below, it can be referenced via the following bracket
notation, where ID in this case is the ID of a compute. The leading
"c\_" would be replaced by "f\_" for a fix, or "v\_" for a variable:
* global scalar
* global vector
* global array
* per-atom vector
* per-atom array
* local vector
* local array
* per-grid vector
* per-grid array
A per-atom vector means a single value per atom; the "vector" is the
length of the number of atoms. A per-atom array means multiple values
per atom. Similarly a local vector or array means one or multiple
values per entity (e.g. per bond in the system). And a per-grid
vector or array means one or multiple values per grid cell.
The doc page for a compute or fix or variable that generates data will
specify both the styles and kinds of data it produces, e.g. a per-atom
vector. Note that a compute or fix may generate multiple styles and
kinds of output. However, for per-atom data only a vector or array is
output, never both. Likewise for per-local and per-grid data. An
example of a fix which generates multiple styles and kinds of data is
the :doc:`fix mdi/qm <fix_mdi_qm>` command. It outputs a global
scalar, global vector, and per-atom array for the quantum mechanical
energy and virial of the system and forces on each atom.
By contrast, different variable styles generate only a single kind of
data: a global scalar for an equal-style variable, global vector for a
vector-style variable, and a per-atom vector for an atom-style
variable.
When data is accessed by another command, as in many of the output
commands discussed below, it can be referenced via the following
bracket notation, where ID in this case is the ID of a compute. The
leading "c\_" would be replaced by "f\_" for a fix, or "v\_" for a
variable (and ID would be the name of the variable):
+-------------+--------------------------------------------+
| c_ID | entire scalar, vector, or array |
@ -85,40 +115,56 @@ notation, where ID in this case is the ID of a compute. The leading
| c_ID[I][J] | one element of array |
+-------------+--------------------------------------------+
In other words, using one bracket reduces the dimension of the data
once (vector -> scalar, array -> vector). Using two brackets reduces
the dimension twice (array -> scalar). Thus a command that uses
scalar values as input can typically also process elements of a vector
or array.
Note that using one bracket reduces the dimension of the data once
(vector -> scalar, array -> vector). Using two brackets reduces the
dimension twice (array -> scalar). Thus a command that uses scalar
values as input can also conceptually operate on an element of a
vector or array.
.. _grid:
Per-grid data
------------------------
Per-grid data can come in two kinds: a vector of values (one per grid
cekk), or a 2d array of values (multiple values per grid ckk). The
doc page for a "compute" or "fix" that generates data will specify
names for both the grid(s) and datum(s) it produces, e.g. per-grid
vectors or arrays, which can be referenced by other commands. See the
:doc:`Howto grid <Howto_grid>` doc page for more details.
Per-grid vectors or arrays are accessed similarly, except that the ID
for the compute or fix includes a grid name and a data name. This is
because a fix or compute can create multiple grids (of different
sizes) and multiple sets of data (for each grid). The fix or compute
defines names for each grid and for each data set, so that all of them
can be accessed by other commands. See the :doc:`Howto grid
<Howto_grid>` doc page for more details.
.. _disambiguation:
Disambiguation
--------------
Some computes and fixes produce data in multiple styles, e.g. a global
scalar and a per-atom vector. Usually the context in which the input
script references the data determines which style is meant. Example:
if a compute provides both a global scalar and a per-atom vector, the
former will be accessed by using ``c_ID`` in an equal-style variable,
while the latter will be accessed by using ``c_ID`` in an atom-style
variable. Note that atom-style variable formulas can also access
global scalars, but in this case it is not possible to do this
directly because of the ambiguity. Instead, an equal-style variable
can be defined which accesses the global scalar, and that variable can
be used in the atom-style variable formula in place of ``c_ID``.
When a compute or fix produces data in multiple styles, e.g. global
and per-atom, a reference to the data can sometimes be ambiguous.
Usually the context in which the input script references the data
determines which style is meant.
For example, if a compute outputs a global vector and a per-atom
array, an element of the global vector will be accessed by using
``c_ID[I]`` in :doc:`thermodynamic output <thermo_style>`, while a
column of the per-atom array will be accessed by using ``c_ID[I]`` in
a :doc:`dump custom <dump>` command.
However, if a :doc:`atom-style variable <variable>` references
``c_ID[I]``, then it could be intended to refer to a single element of
the global vector or a column of the per-atom array. The doc page for
any command that has a potential ambiguity (variables are the most
common) will explain how to resolve the ambiguity.
In this case, an atom-style variables references per-atom data if it
exists. If access to an element of a global vector is needed (as in
this example), an equal-style variable which references the value can
be defined and used in the atom-style variable formula instead.
Similarly, :doc:`thermodynamic output <thermo_style>` can only
reference global data from a compute or fix. But you can indirectly
access per-atom data as follows. The reference ``c_ID[245][2]`` for
the ID of a :doc:`compute displace/atom <compute_displace_atom>`
command, refers to the y-component of displacement for the atom with
ID 245. While you cannot use that reference directly in the
:doc:`thermo_style <thermo_style>` command, you can use it an
equal-style variable formula, and then reference the variable in
thermodynamic output.
.. _thermo:
@ -389,7 +435,7 @@ output and input data types must match, e.g. global/per-atom/local
data and scalar/vector/array data.
Also note that, as described above, when a command takes a scalar as
input, that could be an element of a vector or array. Likewise a
input, that could also be an element of a vector or array. Likewise a
vector input could be a column of an array.
+--------------------------------------------------------+----------------------------------------------+----------------------------------------------------+

View File

@ -53,10 +53,10 @@ System-wide Installation
Step 1: Building LAMMPS as a shared library
"""""""""""""""""""""""""""""""""""""""""""
To use LAMMPS inside of Python it has to be compiled as shared library. This
library is then loaded by the Python interface. In this example we enable the
MOLECULE package and compile LAMMPS with C++ exceptions, PNG, JPEG and FFMPEG
output support enabled.
To use LAMMPS inside of Python it has to be compiled as shared
library. This library is then loaded by the Python interface. In this
example we enable the MOLECULE package and compile LAMMPS with PNG, JPEG
and FFMPEG output support enabled.
Step 1a: For the CMake based build system, the steps are:
@ -66,7 +66,7 @@ Step 1a: For the CMake based build system, the steps are:
cd $LAMMPS_DIR/build-shared
# MPI, PNG, Jpeg, FFMPEG are auto-detected
cmake ../cmake -DPKG_MOLECULE=yes -DLAMMPS_EXCEPTIONS=yes -DBUILD_LIB=yes -DBUILD_SHARED_LIBS=yes
cmake ../cmake -DPKG_MOLECULE=yes -DBUILD_LIB=yes -DBUILD_SHARED_LIBS=yes
make
Step 1b: For the legacy, make based build system, the steps are:
@ -79,7 +79,7 @@ Step 1b: For the legacy, make based build system, the steps are:
make yes-MOLECULE
# compile shared library using Makefile
make mpi mode=shlib LMP_INC="-DLAMMPS_PNG -DLAMMPS_JPEG -DLAMMPS_FFMPEG -DLAMMPS_EXCEPTIONS" JPG_LIB="-lpng -ljpeg"
make mpi mode=shlib LMP_INC="-DLAMMPS_PNG -DLAMMPS_JPEG -DLAMMPS_FFMPEG" JPG_LIB="-lpng -ljpeg"
Step 2: Installing the LAMMPS Python package
""""""""""""""""""""""""""""""""""""""""""""
@ -133,7 +133,7 @@ to the location in the virtual environment with:
.. code-block:: bash
cmake . -DPYTHON_EXECUTABLE=$(which python)
cmake . -DPython_EXECUTABLE=$(which python)
# install LAMMPS package in virtualenv
(testing) make install-python
@ -356,18 +356,16 @@ Together with matplotlib plotting data out of LAMMPS becomes simple:
Error handling with PyLammps
----------------------------
Compiling the shared library with C++ exception support provides a better error
handling experience. Without exceptions the LAMMPS code will terminate the
current Python process with an error message. C++ exceptions allow capturing
them on the C++ side and rethrowing them on the Python side. This way you
can handle LAMMPS errors through the Python exception handling mechanism.
Using C++ exceptions in LAMMPS for errors allows capturing them on the
C++ side and rethrowing them on the Python side. This way you can handle
LAMMPS errors through the Python exception handling mechanism.
.. warning::
Capturing a LAMMPS exception in Python can still mean that the
current LAMMPS process is in an illegal state and must be terminated. It is
advised to save your data and terminate the Python instance as quickly as
possible.
current LAMMPS process is in an illegal state and must be
terminated. It is advised to save your data and terminate the Python
instance as quickly as possible.
Using PyLammps in IPython notebooks and Jupyter
-----------------------------------------------

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