Merge remote-tracking branch 'refs/remotes/origin/develop' into mala

# Conflicts:
#	src/KOKKOS/kokkos_type.h
This commit is contained in:
Lenz Fiedler
2024-12-05 15:23:21 +01:00
5709 changed files with 600194 additions and 283536 deletions

43
.github/CODEOWNERS vendored
View File

@ -37,7 +37,8 @@ src/MESONT/* @iafoss
src/ML-HDNNP/* @singraber src/ML-HDNNP/* @singraber
src/ML-IAP/* @athomps src/ML-IAP/* @athomps
src/ML-PACE/* @yury-lysogorskiy src/ML-PACE/* @yury-lysogorskiy
src/ML-POD/* @exapde @rohskopf src/ML-POD/* @exapde
src/ML-UF3/* @monk-04
src/MOFFF/* @hheenen src/MOFFF/* @hheenen
src/MOLFILE/* @akohlmey src/MOLFILE/* @akohlmey
src/NETCDF/* @pastewka src/NETCDF/* @pastewka
@ -49,6 +50,7 @@ src/PTM/* @pmla
src/QMMM/* @akohlmey src/QMMM/* @akohlmey
src/REACTION/* @jrgissing src/REACTION/* @jrgissing
src/REAXFF/* @hasanmetin @stanmoore1 src/REAXFF/* @hasanmetin @stanmoore1
src/RHEO/* @jtclemm
src/SCAFACOS/* @rhalver src/SCAFACOS/* @rhalver
src/SNAP/* @athomps src/SNAP/* @athomps
src/SPIN/* @julient31 src/SPIN/* @julient31
@ -58,16 +60,26 @@ src/VTK/* @rbberger
# individual files in packages # individual files in packages
src/GPU/pair_vashishta_gpu.* @andeplane src/GPU/pair_vashishta_gpu.* @andeplane
src/KOKKOS/pair_vashishta_kokkos.* @andeplane src/KOKKOS/pair_vashishta_kokkos.* @andeplane @stanmoore1
src/KOSSOS/pair_pod_kokkos.* @exapde @stanmoore1
src/MANYBODY/pair_vashishta_table.* @andeplane src/MANYBODY/pair_vashishta_table.* @andeplane
src/MANYBODY/pair_atm.* @sergeylishchuk src/MANYBODY/pair_atm.* @sergeylishchuk
src/MANYBODY/pair_nb3b_screened.* @flodesani
src/REPLICA/*_grem.* @dstelter92 src/REPLICA/*_grem.* @dstelter92
src/EXTRA-COMMAND/geturl.* @akohlmey
src/EXTRA-COMMAND/group_ndx.* @akohlmey
src/EXTRA-COMMAND/ndx_group.* @akohlmey
src/EXTRA-COMPUTE/compute_stress_mop*.* @RomainVermorel src/EXTRA-COMPUTE/compute_stress_mop*.* @RomainVermorel
src/EXTRA-COMPUTE/compute_born_matrix.* @Bibobu @athomps src/EXTRA-COMPUTE/compute_born_matrix.* @Bibobu @athomps
src/EXTRA-FIX/fix_deform_pressure.* @jtclemm
src/MISC/*_tracker.* @jtclemm src/MISC/*_tracker.* @jtclemm
src/MC/fix_gcmc.* @athomps src/MC/fix_gcmc.* @athomps
src/MC/fix_sgcmc.* @athomps src/MC/fix_sgcmc.* @athomps
src/REAXFF/compute_reaxff_atom.* @rbberger
src/KOKKOS/compute_reaxff_atom_kokkos.* @rbberger
src/REPLICA/fix_pimd_langevin.* @Yi-FanLi src/REPLICA/fix_pimd_langevin.* @Yi-FanLi
src/DPD-BASIC/pair_dpd_coul_slater_long.* @Eddy-Barraud
src/GPU/pair_dpd_coul_slater_long.* @Eddy-Barraud
# core LAMMPS classes # core LAMMPS classes
src/lammps.* @sjplimp src/lammps.* @sjplimp
@ -79,7 +91,7 @@ src/bond.* @sjplimp
src/comm*.* @sjplimp src/comm*.* @sjplimp
src/compute.* @sjplimp src/compute.* @sjplimp
src/dihedral.* @sjplimp src/dihedral.* @sjplimp
src/domain.* @sjplimp src/domain.* @sjplimp @stanmoore1
src/dump*.* @sjplimp src/dump*.* @sjplimp
src/error.* @sjplimp src/error.* @sjplimp
src/finish.* @sjplimp src/finish.* @sjplimp
@ -87,9 +99,11 @@ src/fix.* @sjplimp
src/force.* @sjplimp src/force.* @sjplimp
src/group.* @sjplimp src/group.* @sjplimp
src/improper.* @sjplimp src/improper.* @sjplimp
src/info.* @akohlmey
src/kspace.* @sjplimp src/kspace.* @sjplimp
src/lmptyp.h @sjplimp src/lmptype.h @sjplimp
src/library.* @sjplimp src/label_map.* @jrgissing @akohlmey
src/library.* @sjplimp @akohlmey
src/main.cpp @sjplimp src/main.cpp @sjplimp
src/min_*.* @sjplimp src/min_*.* @sjplimp
src/memory.* @sjplimp src/memory.* @sjplimp
@ -97,12 +111,12 @@ src/modify.* @sjplimp @stanmoore1
src/molecule.* @sjplimp src/molecule.* @sjplimp
src/my_page.h @sjplimp src/my_page.h @sjplimp
src/my_pool_chunk.h @sjplimp src/my_pool_chunk.h @sjplimp
src/npair*.* @sjplimp src/npair*.* @sjplimp @jtclemm
src/ntopo*.* @sjplimp src/ntopo*.* @sjplimp @jtclemm
src/nstencil*.* @sjplimp src/nstencil*.* @sjplimp @jtclemm
src/neighbor.* @sjplimp src/neighbor.* @sjplimp @jtclemm
src/nbin*.* @sjplimp src/nbin*.* @sjplimp @jtclemm
src/neigh_*.* @sjplimp src/neigh_*.* @sjplimp @jtclemm
src/output.* @sjplimp src/output.* @sjplimp
src/pair.* @sjplimp src/pair.* @sjplimp
src/rcb.* @sjplimp src/rcb.* @sjplimp
@ -135,6 +149,7 @@ src/timer.* @akohlmey
src/utils.* @akohlmey @rbberger src/utils.* @akohlmey @rbberger
src/verlet.* @sjplimp @stanmoore1 src/verlet.* @sjplimp @stanmoore1
src/math_eigen_impl.h @jewettaij src/math_eigen_impl.h @jewettaij
src/fix_press_langevin.* @Bibobu
# tools # tools
tools/coding_standard/* @akohlmey @rbberger tools/coding_standard/* @akohlmey @rbberger
@ -151,12 +166,12 @@ tools/vim/* @hammondkd
unittest/* @akohlmey unittest/* @akohlmey
# cmake # cmake
cmake/* @rbberger cmake/* @akohlmey
cmake/Modules/LAMMPSInterfacePlugin.cmake @akohlmey cmake/Modules/LAMMPSInterfacePlugin.cmake @akohlmey
cmake/Modules/MPI4WIN.cmake @akohlmey cmake/Modules/MPI4WIN.cmake @akohlmey
cmake/Modules/OpenCLLoader.cmake @akohlmey cmake/Modules/OpenCLLoader.cmake @akohlmey
cmake/Modules/Packages/COLVARS.cmake @rbberger @giacomofiorin cmake/Modules/Packages/COLVARS.cmake @giacomofiorin
cmake/Modules/Packages/KIM.cmake @rbberger @ellio167 cmake/Modules/Packages/KIM.cmake @ellio167
cmake/presets/*.cmake @akohlmey cmake/presets/*.cmake @akohlmey
# python # python

View File

@ -1,13 +1,13 @@
# Contributing to LAMMPS via GitHub # 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. 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: 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 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://www.lammps.org/doc/Modify_style.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://lammps.sandia.gov/doc/Howto_github.html) * [The GitHub tutorial in the LAMMPS manual](http://docs.lammps.org/Howto_github.html)
## Table of Contents ## Table of Contents
@ -27,17 +27,17 @@ __
## I don't want to read this whole thing I just have a question! ## 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? ## 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 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 ### 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. 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. 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 ### 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. 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). 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, 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: 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 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://lammps.sandia.gov/doc/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://lammps.sandia.gov/doc/Howto_github.html) * [The GitHub tutorial in the LAMMPS manual](http://docs.lammps.org/Howto_github.html)
## GitHub Workflows ## 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
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. 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). 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. 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. 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.

108
.github/release_steps.md vendored Normal file
View File

@ -0,0 +1,108 @@
# LAMMPS Release Steps
The following notes chronicle the current steps for preparing and publishing LAMMPS releases. For
definitions of LAMMPS versions and releases mean, please refer to [the corresponding section in the
LAMMPS manual](https://docs.lammps.org/Manual_version.html).
## LAMMPS Feature Release
A LAMMPS feature release is currently prepared after about 500 to 750 commits to the 'develop'
branch or after a period of four weeks up to two months. This is not a fixed rule, though, since
external circumstances can cause delays in preparing a release, or pull requests that are desired to
be merged for the release are not yet completed.
### Preparing a 'next\_release' branch
Create a 'next\_release' branch off 'develop' and make the following changes:
- set the LAMMPS\_VERSION define to the planned release date in src/version.h in the format
"D Mmm YYYY" or "DD Mmm YYYY"
- remove the LAMMPS\_UPDATE define in src/version.h
- update the release date in doc/lammps.1
- update all TBD arguments for ..versionadded::, ..versionchanged:: ..deprecated:: to the
planned release date in the format "DMmmYYYY" or "DDMmmYYYY"
- check release notes for merged new features and check if ..versionadded:: or ..versionchanged::
are missing and need to be added
Submit this pull request, rebase if needed. This is the last pull request merged for the release
and should not contain any other changes. (Exceptions: this document, last minute trivial(!) changes).
This PR shall not be merged before **all** pending tests have completed and cleared. If needed, a
bugfix pull request should be created and merged to clear all tests.
### Create release on GitHub
When all pending pull requests for the release are merged and have cleared testing, the
'next\_release' branch is merged into 'develop'.
Check out 'develop' locally, pull the latest changes, merge them into 'release', apply a suitable
release tag (for historical reasons the tag starts with "patch_" followed by the date, and finally
push everything back to GitHub. Example:
```
git checkout develop
git pull
git checkout release
git pull
git merge --ff-only develop
git tag -s -m "LAMMPS feature release 19 November 2024" patch_19Nov2024
git push git@github.com:lammps/lammps.git --tags develop release
```
Go to https://github.com/lammps/lammps/releases and create a new (draft) release page or check the
existing draft for any necessary changes from pull requests that were merged but are not listed.
Then select the applied tag for the release in the "Choose a tag" dropdown list. Go to the bottom of
the list and select the "Set as pre-release" checkbox. The "Set as the latest release" button is
reserved for stable releases and updates to them.
If everything is in order, you can click on the "Publish release" button. Otherwise, click on "Save
draft" and finish pending tasks until you can return to edit the release page and publish it.
### Update download website, prepare pre-compiled packages, update packages to GitHub
Publishing the release on GitHub will trigger the Temple Jenkins cluster to update
the https://docs.lammps.org/ website with the documentation for the new feature release
and it will create a tarball for download (which contains the translated manual).
Build a fully static LAMMPS installation using a musl-libc cross-compiler, install into a
lammps-static folder, and create a tarball called lammps-linux-x86_64-19Nov2024.tar.gz (or using a
corresponding date with a future release) from the lammps-static folder and upload it to GitHub
with:
```
gh release upload patch_19Nov2024 ~/Downloads/lammps-linux-x86_64-19Nov2024.tar.gz
```
## LAMMPS Stable Release
A LAMMPS stable release is prepared about once per year in the months July, August, or September.
One (or two, if needed) feature releases before the stable release shall contain only bug fixes
or minor feature updates in optional packages. Also substantial changes to the core of the code
shall be applied rather toward the beginning of a development cycle between two stable releases
than toward the end. The intention is to stablilize significant change to the core and have
outside users and developers try them out during the development cycle; the sooner the changes
are included, the better chances for spotting peripheral bugs and issues.
### Prerequesites
Before making a stable release all remaining backported bugfixes shall be released as a (final)
stable update release (see below).
A LAMMPS stable release process starts like a feature release (see above), only that this feature
release is called a "Stable Release Candidate" and no assets are uploaded to GitHub.
### Synchronize 'maintenance' branch with 'release'
The state of the 'release' branch is then transferred to the 'maintenance' branch (which will
have diverged significantly from 'release' due to the selectively backported bug fixes).
### Fast-forward merge of 'maintenance' into 'stable' and apply tag
At this point it should be possible to do a fast-forward merge of 'maintenance' to 'stable'
and then apply the stable\_DMmmYYYY tag.
### Push branches and tags
## LAMMPS Stable Update Release

92
.github/workflows/check-cpp23.yml vendored Normal file
View File

@ -0,0 +1,92 @@
# GitHub action to build LAMMPS on Linux with gcc and C++23
name: "Check for C++23 Compatibility"
on:
push:
branches:
- develop
pull_request:
branches:
- develop
workflow_dispatch:
jobs:
build:
name: Build with C++23 support enabled
if: ${{ github.repository == 'lammps/lammps' }}
runs-on: ubuntu-latest
env:
CCACHE_DIR: ${{ github.workspace }}/.ccache
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Install extra packages
run: |
sudo apt-get update
sudo apt-get install -y ccache \
libeigen3-dev \
libcurl4-openssl-dev \
mold \
mpi-default-bin \
mpi-default-dev \
ninja-build \
python3-dev
- name: Create Build Environment
run: mkdir build
- name: Set up ccache
uses: actions/cache@v4
with:
path: ${{ env.CCACHE_DIR }}
key: linux-cpp23-ccache-${{ github.sha }}
restore-keys: linux-cpp23-ccache-
- name: Building LAMMPS via CMake
shell: bash
run: |
ccache -z
python3 -m venv linuxenv
source linuxenv/bin/activate
python3 -m pip install numpy
python3 -m pip install pyyaml
cmake -S cmake -B build \
-C cmake/presets/most.cmake \
-C cmake/presets/kokkos-openmp.cmake \
-D CMAKE_CXX_STANDARD=23 \
-D CMAKE_CXX_COMPILER=g++ \
-D CMAKE_C_COMPILER=gcc \
-D CMAKE_CXX_COMPILER_LAUNCHER=ccache \
-D CMAKE_C_COMPILER_LAUNCHER=ccache \
-D CMAKE_BUILD_TYPE=Debug \
-D CMAKE_CXX_FLAGS_DEBUG="-Og -g" \
-D DOWNLOAD_POTENTIALS=off \
-D BUILD_MPI=on \
-D BUILD_SHARED_LIBS=on \
-D BUILD_TOOLS=off \
-D ENABLE_TESTING=off \
-D MLIAP_ENABLE_ACE=on \
-D MLIAP_ENABLE_PYTHON=off \
-D PKG_AWPMD=on \
-D PKG_GPU=on \
-D GPU_API=opencl \
-D PKG_KOKKOS=on \
-D PKG_LATBOLTZ=on \
-D PKG_MDI=on \
-D PKG_MANIFOLD=on \
-D PKG_ML-PACE=on \
-D PKG_ML-RANN=off \
-D PKG_MOLFILE=on \
-D PKG_RHEO=on \
-D PKG_PTM=on \
-D PKG_PYTHON=on \
-D PKG_QTB=on \
-D PKG_SMTBQ=on \
-G Ninja
cmake --build build
ccache -s

89
.github/workflows/check-vla.yml vendored Normal file
View File

@ -0,0 +1,89 @@
# GitHub action to build LAMMPS on Linux with gcc and -Werror=vla
name: "Check for Variable Length Arrays"
on:
push:
branches:
- develop
pull_request:
branches:
- develop
workflow_dispatch:
jobs:
build:
name: Build with -Werror=vla
if: ${{ github.repository == 'lammps/lammps' }}
runs-on: ubuntu-latest
env:
CCACHE_DIR: ${{ github.workspace }}/.ccache
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Install extra packages
run: |
sudo apt-get update
sudo apt-get install -y ccache \
libeigen3-dev \
libcurl4-openssl-dev \
mold \
mpi-default-bin \
mpi-default-dev \
ninja-build \
python3-dev
- name: Create Build Environment
run: mkdir build
- name: Set up ccache
uses: actions/cache@v4
with:
path: ${{ env.CCACHE_DIR }}
key: linux-vla-ccache-${{ github.sha }}
restore-keys: linux-vla-ccache-
- name: Building LAMMPS via CMake
shell: bash
run: |
ccache -z
python3 -m venv linuxenv
source linuxenv/bin/activate
python3 -m pip install numpy
python3 -m pip install pyyaml
cmake -S cmake -B build \
-C cmake/presets/most.cmake \
-D CMAKE_CXX_COMPILER=g++ \
-D CMAKE_C_COMPILER=gcc \
-D CMAKE_CXX_COMPILER_LAUNCHER=ccache \
-D CMAKE_C_COMPILER_LAUNCHER=ccache \
-D CMAKE_BUILD_TYPE=Debug \
-D CMAKE_CXX_FLAGS_DEBUG="-Og -g -Werror=vla" \
-D DOWNLOAD_POTENTIALS=off \
-D BUILD_MPI=on \
-D BUILD_SHARED_LIBS=off \
-D BUILD_TOOLS=off \
-D ENABLE_TESTING=off \
-D MLIAP_ENABLE_ACE=on \
-D MLIAP_ENABLE_PYTHON=off \
-D PKG_AWPMD=on \
-D PKG_GPU=on \
-D GPU_API=opencl \
-D PKG_LATBOLTZ=on \
-D PKG_MDI=on \
-D PKG_MANIFOLD=on \
-D PKG_ML-PACE=on \
-D PKG_ML-RANN=off \
-D PKG_MOLFILE=on \
-D PKG_RHEO=on \
-D PKG_PTM=on \
-D PKG_PYTHON=on \
-D PKG_QTB=on \
-D PKG_SMTBQ=on \
-G Ninja
cmake --build build
ccache -s

View File

@ -25,17 +25,17 @@ jobs:
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v3 uses: actions/checkout@v4
with: with:
fetch-depth: 2 fetch-depth: 2
- name: Setup Python - name: Setup Python
uses: actions/setup-python@v4 uses: actions/setup-python@v5
with: with:
python-version: '3.x' python-version: '3.x'
- name: Initialize CodeQL - name: Initialize CodeQL
uses: github/codeql-action/init@v2 uses: github/codeql-action/init@v3
with: with:
languages: ${{ matrix.language }} languages: ${{ matrix.language }}
config-file: ./.github/codeql/${{ matrix.language }}.yml config-file: ./.github/codeql/${{ matrix.language }}.yml
@ -55,4 +55,4 @@ jobs:
cmake --build . --parallel 2 cmake --build . --parallel 2
- name: Perform CodeQL Analysis - name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2 uses: github/codeql-action/analyze@v3

View File

@ -1,5 +1,5 @@
# GitHub action to build LAMMPS on Windows with Visual C++ # GitHub action to test LAMMPS on Windows with Visual C++
name: "Native Windows Compilation and Unit Tests" name: "Windows Unit Tests"
on: on:
push: push:
@ -11,48 +11,59 @@ on:
workflow_dispatch: workflow_dispatch:
concurrency:
group: ${{ github.event_name }}-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{github.event_name == 'pull_request'}}
jobs: jobs:
build: build:
name: Windows Compilation Test name: Windows Compilation Test
if: ${{ github.repository == 'lammps/lammps' }} if: ${{ github.repository == 'lammps/lammps' }}
runs-on: windows-latest runs-on: windows-latest
env:
CCACHE_DIR: ${{ github.workspace }}/.ccache
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v3 uses: actions/checkout@v4
with: with:
fetch-depth: 2 fetch-depth: 2
- name: Enable MSVC++
uses: lammps/setup-msvc-dev@v3
with:
arch: x64
- name: Install Ccache
run: |
choco install ccache ninja -y
- name: Set up ccache
uses: actions/cache@v4
with:
path: ${{ env.CCACHE_DIR }}
key: win-unit-ccache-${{ github.sha }}
restore-keys: win-unit-ccache-
- name: Select Python version - name: Select Python version
uses: actions/setup-python@v4 uses: actions/setup-python@v5
with: with:
python-version: '3.11' python-version: '3.11'
- name: Building LAMMPS via CMake - name: Building LAMMPS via CMake
shell: bash
run: | run: |
ccache -z
python3 -m pip install numpy python3 -m pip install numpy
python3 -m pip install pyyaml python3 -m pip install pyyaml
nuget install MSMPIsdk cmake -C cmake\presets\windows.cmake -D CMAKE_CXX_COMPILER=cl -D CMAKE_CXX_COMPILER_LAUNCHER=ccache -D CMAKE_C_COMPILER=cl -D CMAKE_C_COMPILER_LAUNCHER=ccache -D CMAKE_Fortran_COMPILER="" -D DOWNLOAD_POTENTIALS=off -D PKG_PYTHON=on -D WITH_PNG=off -D WITH_JPEG=off -S cmake -B build -D BUILD_SHARED_LIBS=on -D ENABLE_TESTING=on -D CMAKE_BUILD_TYPE=Release -G Ninja
nuget install MSMPIDIST cmake --build build
cmake -C cmake/presets/windows.cmake \ ccache -s
-D DOWNLOAD_POTENTIALS=off \
-D PKG_PYTHON=on \
-D WITH_PNG=off \
-D WITH_JPEG=off \
-S cmake -B build \
-D BUILD_SHARED_LIBS=on \
-D LAMMPS_EXCEPTIONS=on \
-D ENABLE_TESTING=on
cmake --build build --config Release --parallel 2
- name: Run LAMMPS executable - name: Run LAMMPS executable
shell: bash
run: | run: |
./build/Release/lmp.exe -h build\lmp.exe -h
./build/Release/lmp.exe -in bench/in.lj build\lmp.exe -in bench\in.lj
- name: Run Unit Tests - name: Run Unit Tests
working-directory: build working-directory: build
shell: bash run: ctest -V -E FixTimestep:python_move_nve
run: ctest -V -C Release -E FixTimestep:python_move_nve

View File

@ -16,7 +16,7 @@ jobs:
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v3 uses: actions/checkout@v4
with: with:
fetch-depth: 2 fetch-depth: 2
@ -25,7 +25,7 @@ jobs:
- name: Cache Coverity - name: Cache Coverity
id: cache-coverity id: cache-coverity
uses: actions/cache@v3 uses: actions/cache@v4
with: with:
path: ./download/ path: ./download/
key: ${{ runner.os }}-download-${{ hashFiles('**/coverity_tool.*') }} key: ${{ runner.os }}-download-${{ hashFiles('**/coverity_tool.*') }}
@ -59,16 +59,13 @@ jobs:
-D BUILD_SHARED_LIBS=on \ -D BUILD_SHARED_LIBS=on \
-D LAMMPS_SIZES=SMALLBIG \ -D LAMMPS_SIZES=SMALLBIG \
-D LAMMPS_EXCEPTIONS=off \ -D LAMMPS_EXCEPTIONS=off \
-D PKG_MESSAGE=on \
-D PKG_MPIIO=on \
-D PKG_ATC=on \ -D PKG_ATC=on \
-D PKG_AWPMD=on \ -D PKG_AWPMD=on \
-D PKG_BOCS=on \
-D PKG_EFF=on \
-D PKG_H5MD=on \ -D PKG_H5MD=on \
-D PKG_INTEL=on \ -D PKG_INTEL=on \
-D PKG_LATBOLTZ=on \ -D PKG_LATBOLTZ=on \
-D PKG_MANIFOLD=on \ -D PKG_MANIFOLD=on \
-D PKG_MDI=on \
-D PKG_MGPT=on \ -D PKG_MGPT=on \
-D PKG_ML-PACE=on \ -D PKG_ML-PACE=on \
-D PKG_ML-RANN=on \ -D PKG_ML-RANN=on \
@ -77,7 +74,6 @@ jobs:
-D PKG_PTM=on \ -D PKG_PTM=on \
-D PKG_QTB=on \ -D PKG_QTB=on \
-D PKG_SMTBQ=on \ -D PKG_SMTBQ=on \
-D PKG_TALLY=on \
../cmake ../cmake
- name: Run Coverity Scan - name: Run Coverity Scan

109
.github/workflows/full-regression.yml vendored Normal file
View File

@ -0,0 +1,109 @@
# GitHub action to build LAMMPS on Linux and run regression tests
name: "Full Regression Test"
on:
push:
branches:
- develop
workflow_dispatch:
jobs:
build:
name: Build LAMMPS
# restrict to official LAMMPS repository
if: ${{ github.repository == 'lammps/lammps' }}
runs-on: ubuntu-latest
env:
CCACHE_DIR: ${{ github.workspace }}/.ccache
strategy:
max-parallel: 8
matrix:
idx: [ 0, 1, 2, 3, 4, 5, 6, 7 ]
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 2
show-progress: false
- name: Install extra packages
run: |
sudo apt-get update
sudo apt-get install -y ccache ninja-build libeigen3-dev \
libcurl4-openssl-dev python3-dev \
mpi-default-bin mpi-default-dev
- name: Create Build Environment
run: mkdir build
- name: Set up ccache
uses: actions/cache@v4
with:
path: ${{ env.CCACHE_DIR }}
key: linux-full-ccache-${{ github.sha }}
restore-keys: linux-full-ccache-
- name: Building LAMMPS via CMake
shell: bash
run: |
ccache -z
python3 -m venv linuxenv
source linuxenv/bin/activate
python3 -m pip install --upgrade pip
python3 -m pip install numpy pyyaml junit_xml
cmake -S cmake -B build \
-C cmake/presets/gcc.cmake \
-C cmake/presets/most.cmake \
-D CMAKE_CXX_COMPILER_LAUNCHER=ccache \
-D CMAKE_C_COMPILER_LAUNCHER=ccache \
-D BUILD_SHARED_LIBS=off \
-D DOWNLOAD_POTENTIALS=off \
-D PKG_MANIFOLD=on \
-D PKG_ML-PACE=on \
-D PKG_ML-RANN=on \
-D PKG_RHEO=on \
-D PKG_PTM=on \
-D PKG_PYTHON=on \
-D PKG_QTB=on \
-D PKG_SMTBQ=on \
-G Ninja
cmake --build build
ccache -s
- name: Run Full Regression Tests
shell: bash
run: |
source linuxenv/bin/activate
python3 tools/regression-tests/run_tests.py \
--lmp-bin=build/lmp \
--config-file=tools/regression-tests/config_serial.yaml \
--examples-top-level=examples --analyze --num-workers=8
python3 tools/regression-tests/run_tests.py \
--lmp-bin=build/lmp \
--config-file=tools/regression-tests/config_serial.yaml \
--list-input=input-list-${{ matrix.idx }}.txt \
--output-file=output-${{ matrix.idx }}.xml \
--progress-file=progress-${{ matrix.idx }}.yaml \
--log-file=run-${{ matrix.idx }}.log
tar -cvf full-regression-test-${{ matrix.idx }}.tar run-${{ matrix.idx }}.log progress-${{ matrix.idx }}.yaml output-${{ matrix.idx }}.xml
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: full-regression-test-artifact-${{ matrix.idx }}
path: full-regression-test-${{ matrix.idx }}.tar
merge:
runs-on: ubuntu-latest
needs: build
steps:
- name: Merge Artifacts
uses: actions/upload-artifact/merge@v4
with:
name: merged-full-regresssion-artifact
pattern: full-regression-test-artifact-*

126
.github/workflows/kokkos-regression.yaml vendored Normal file
View File

@ -0,0 +1,126 @@
# GitHub action to build LAMMPS on Linux and run selected regression tests
name: "Kokkos OpenMP Regression Test"
on:
push:
branches:
- develop
workflow_dispatch:
jobs:
build:
name: Build LAMMPS with Kokkos OpenMP
# restrict to official LAMMPS repository
if: ${{ github.repository == 'lammps/lammps' }}
runs-on: ubuntu-latest
env:
CCACHE_DIR: ${{ github.workspace }}/.ccache
strategy:
max-parallel: 6
matrix:
idx: [ 'pair-0', 'pair-1', 'fix-0', 'fix-1', 'compute', 'misc' ]
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 2
show-progress: false
- name: Install extra packages
run: |
sudo apt-get update
sudo apt-get install -y ccache ninja-build libeigen3-dev \
libcurl4-openssl-dev python3-dev \
mpi-default-bin mpi-default-dev
- name: Create Build Environment
run: mkdir build
- name: Set up ccache
uses: actions/cache@v4
with:
path: ${{ env.CCACHE_DIR }}
key: linux-kokkos-ccache-${{ github.sha }}
restore-keys: linux-kokkos-ccache-
- name: Building LAMMPS via CMake
shell: bash
run: |
ccache -z
python3 -m venv linuxenv
source linuxenv/bin/activate
python3 -m pip install --upgrade pip
python3 -m pip install numpy pyyaml junit_xml
cmake -S cmake -B build \
-C cmake/presets/gcc.cmake \
-C cmake/presets/basic.cmake \
-C cmake/presets/kokkos-openmp.cmake \
-D CMAKE_CXX_COMPILER_LAUNCHER=ccache \
-D CMAKE_C_COMPILER_LAUNCHER=ccache \
-D BUILD_SHARED_LIBS=off \
-D DOWNLOAD_POTENTIALS=off \
-D PKG_AMOEBA=on \
-D PKG_ASPHERE=on \
-D PKG_BROWNIAN=on \
-D PKG_CLASS2=on \
-D PKG_COLLOID=on \
-D PKG_CORESHELL=on \
-D PKG_DIPOLE=on \
-D PKG_DPD-BASIC=on \
-D PKG_EXTRA-COMPUTE=on \
-D PKG_EXTRA-FIX=on \
-D PKG_EXTRA-MOLECULE=on \
-D PKG_EXTRA-PAIR=on \
-D PKG_GRANULAR=on \
-D PKG_LEPTON=on \
-D PKG_MC=on \
-D PKG_MEAM=on \
-D PKG_POEMS=on \
-D PKG_PYTHON=on \
-D PKG_QEQ=on \
-D PKG_REAXFF=on \
-D PKG_REPLICA=on \
-D PKG_SRD=on \
-D PKG_SPH=on \
-D PKG_VORONOI=on \
-G Ninja
cmake --build build
ccache -s
- name: Run Regression Tests for Selected Examples
shell: bash
run: |
source linuxenv/bin/activate
python3 tools/regression-tests/get_kokkos_input.py \
--examples-top-level=examples --batch-size=50 \
--filter-out="balance;fire;gcmc;granregion;hyper;mc;mdi;mliap;neb;pace;prd;pour;python;rigid;snap;streitz;shear;ttm"
export OMP_PROC_BIND=false
python3 tools/regression-tests/run_tests.py \
--lmp-bin=build/lmp \
--config-file=tools/regression-tests/config_kokkos_openmp.yaml \
--list-input=input-list-${{ matrix.idx }}-kk.txt \
--output-file=output-${{ matrix.idx }}.xml \
--progress-file=progress-${{ matrix.idx }}.yaml \
--log-file=run-${{ matrix.idx }}.log \
--quick-max=100
tar -cvf kokkos-regression-test-${{ matrix.idx }}.tar run-${{ matrix.idx }}.log progress-${{ matrix.idx }}.yaml output-${{ matrix.idx }}.xml
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: kokkos-regression-test-artifact-${{ matrix.idx }}
path: kokkos-regression-test-${{ matrix.idx }}.tar
merge:
runs-on: ubuntu-latest
needs: build
steps:
- name: Merge Artifacts
uses: actions/upload-artifact/merge@v4
with:
name: merged-kokkos-regresssion-artifact
pattern: kokkos-regression-test-artifact-*

118
.github/workflows/quick-regression.yml vendored Normal file
View File

@ -0,0 +1,118 @@
# GitHub action to build LAMMPS on Linux and run selected regression tests
name: "Quick Regression Test"
on:
pull_request:
branches:
- develop
workflow_dispatch:
concurrency:
group: ${{ github.event_name }}-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{github.event_name == 'pull_request'}}
jobs:
build:
name: Build LAMMPS
# restrict to official LAMMPS repository
if: ${{ github.repository == 'lammps/lammps' }}
runs-on: ubuntu-latest
env:
CCACHE_DIR: ${{ github.workspace }}/.ccache
strategy:
max-parallel: 4
matrix:
idx: [ 0, 1, 2, 3 ]
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
show-progress: false
- name: Install extra packages
run: |
sudo apt-get update
sudo apt-get install -y ccache ninja-build libeigen3-dev \
libcurl4-openssl-dev python3-dev \
mpi-default-bin mpi-default-dev
- name: Create Build Environment
run: mkdir build
- name: Set up ccache
uses: actions/cache@v4
with:
path: ${{ env.CCACHE_DIR }}
key: linux-quick-ccache-${{ github.sha }}
restore-keys: linux-quick-ccache-
- name: Building LAMMPS via CMake
shell: bash
run: |
ccache -z
python3 -m venv linuxenv
source linuxenv/bin/activate
python3 -m pip install --upgrade pip
python3 -m pip install numpy pyyaml junit_xml
cmake -S cmake -B build \
-C cmake/presets/gcc.cmake \
-C cmake/presets/most.cmake \
-D CMAKE_CXX_COMPILER_LAUNCHER=ccache \
-D CMAKE_C_COMPILER_LAUNCHER=ccache \
-D BUILD_SHARED_LIBS=off \
-D DOWNLOAD_POTENTIALS=off \
-D PKG_MANIFOLD=on \
-D PKG_ML-PACE=on \
-D PKG_ML-RANN=on \
-D PKG_RHEO=on \
-D PKG_PTM=on \
-D PKG_PYTHON=on \
-D PKG_QTB=on \
-D PKG_SMTBQ=on \
-G Ninja
cmake --build build
ccache -s
- name: Run Regression Tests for Modified Styles
shell: bash
run: |
source linuxenv/bin/activate
python3 tools/regression-tests/run_tests.py \
--lmp-bin=build/lmp \
--config-file=tools/regression-tests/config_quick.yaml \
--examples-top-level=examples \
--quick-reference=tools/regression-tests/reference.yaml \
--quick --quick-branch=origin/develop --quick-max=100 --num-workers=4
if [ -f input-list-${{ matrix.idx }}.txt ]
then \
python3 tools/regression-tests/run_tests.py \
--lmp-bin=build/lmp \
--config-file=tools/regression-tests/config_quick.yaml \
--list-input=input-list-${{ matrix.idx }}.txt \
--output-file=output-${{ matrix.idx }}.xml \
--progress-file=progress-${{ matrix.idx }}.yaml \
--log-file=run-${{ matrix.idx }}.log
fi
tar -cvf quick-regression-test-${{ matrix.idx }}.tar run-${{ matrix.idx }}.log progress-${{ matrix.idx }}.yaml output-${{ matrix.idx }}.xml
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: quick-regression-test-artifact-${{ matrix.idx }}
path: quick-regression-test-${{ matrix.idx }}.tar
merge:
runs-on: ubuntu-latest
needs: build
steps:
- name: Merge Artifacts
uses: actions/upload-artifact/merge@v4
with:
name: merged-quick-regresssion-artifact
pattern: quick-regression-test-artifact-*

37
.github/workflows/style-check.yml vendored Normal file
View File

@ -0,0 +1,37 @@
# GitHub action to run checks from tools/coding_standard
name: "Check for Programming Style Conformance"
on:
push:
branches:
- develop
pull_request:
branches:
- develop
workflow_dispatch:
concurrency:
group: ${{ github.event_name }}-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{github.event_name == 'pull_request'}}
jobs:
build:
name: Programming Style Conformance
if: ${{ github.repository == 'lammps/lammps' }}
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Run Tests
working-directory: src
shell: bash
run: |
make check-whitespace
make check-permissions
make check-homepage
make check-errordocs

86
.github/workflows/unittest-linux.yml vendored Normal file
View File

@ -0,0 +1,86 @@
# GitHub action to build LAMMPS on Linux and run standard unit tests
name: "Unittest for Linux /w LAMMPS_BIGBIG"
on:
push:
branches:
- develop
pull_request:
branches:
- develop
workflow_dispatch:
concurrency:
group: ${{ github.event_name }}-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{github.event_name == 'pull_request'}}
jobs:
build:
name: Linux Unit Test
if: ${{ github.repository == 'lammps/lammps' }}
runs-on: ubuntu-latest
env:
CCACHE_DIR: ${{ github.workspace }}/.ccache
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Install extra packages
run: |
sudo apt-get update
sudo apt-get install -y ccache \
libeigen3-dev \
libcurl4-openssl-dev \
mold \
ninja-build \
python3-dev
- name: Create Build Environment
run: mkdir build
- name: Set up ccache
uses: actions/cache@v4
with:
path: ${{ env.CCACHE_DIR }}
key: linux-unit-ccache-${{ github.sha }}
restore-keys: linux-unit-ccache-
- name: Building LAMMPS via CMake
shell: bash
run: |
ccache -z
python3 -m venv linuxenv
source linuxenv/bin/activate
python3 -m pip install numpy
python3 -m pip install pyyaml
cmake -S cmake -B build \
-C cmake/presets/gcc.cmake \
-C cmake/presets/most.cmake \
-D CMAKE_CXX_COMPILER_LAUNCHER=ccache \
-D CMAKE_C_COMPILER_LAUNCHER=ccache \
-D BUILD_SHARED_LIBS=on \
-D LAMMPS_SIZES=bigbig \
-D DOWNLOAD_POTENTIALS=off \
-D ENABLE_TESTING=on \
-D MLIAP_ENABLE_ACE=on \
-D MLIAP_ENABLE_PYTHON=off \
-D PKG_MANIFOLD=on \
-D PKG_ML-PACE=on \
-D PKG_ML-RANN=on \
-D PKG_RHEO=on \
-D PKG_PTM=on \
-D PKG_PYTHON=on \
-D PKG_QTB=on \
-D PKG_SMTBQ=on \
-G Ninja
cmake --build build
ccache -s
- name: Run Tests
working-directory: build
shell: bash
run: ctest -V

View File

@ -11,17 +11,21 @@ on:
workflow_dispatch: workflow_dispatch:
concurrency:
group: ${{ github.event_name }}-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{github.event_name == 'pull_request'}}
jobs: jobs:
build: build:
name: MacOS Unit Test name: MacOS Unit Test
if: ${{ github.repository == 'lammps/lammps' }} if: ${{ github.repository == 'lammps/lammps' }}
runs-on: macos-latest runs-on: macos-13
env: env:
CCACHE_DIR: ${{ github.workspace }}/.ccache CCACHE_DIR: ${{ github.workspace }}/.ccache
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v3 uses: actions/checkout@v4
with: with:
fetch-depth: 2 fetch-depth: 2
@ -32,7 +36,7 @@ jobs:
run: mkdir build run: mkdir build
- name: Set up ccache - name: Set up ccache
uses: actions/cache@v3 uses: actions/cache@v4
with: with:
path: ${{ env.CCACHE_DIR }} path: ${{ env.CCACHE_DIR }}
key: macos-ccache-${{ github.sha }} key: macos-ccache-${{ github.sha }}
@ -43,6 +47,8 @@ jobs:
working-directory: build working-directory: build
run: | run: |
ccache -z ccache -z
python3 -m venv macosenv
source macosenv/bin/activate
python3 -m pip install numpy python3 -m pip install numpy
python3 -m pip install pyyaml python3 -m pip install pyyaml
cmake -C ../cmake/presets/clang.cmake \ cmake -C ../cmake/presets/clang.cmake \

14
.gitignore vendored
View File

@ -43,12 +43,12 @@ Thumbs.db
#cmake #cmake
/build* /build*
/CMakeCache.txt CMakeCache.txt
/CMakeFiles/ CMakeFiles
/Testing
/Makefile /Makefile
/Testing Testing
/cmake_install.cmake Temporary
cmake_install.cmake
/lmp /lmp
out/Debug out/Debug
out/RelWithDebInfo out/RelWithDebInfo
@ -57,3 +57,7 @@ out/x86
out/x64 out/x64
src/Makefile.package-e src/Makefile.package-e
src/Makefile.package.settings-e src/Makefile.package.settings-e
/cmake/build/x64-Debug-Clang
/install/x64-GUI-MSVC
/install
.Rhistory

View File

@ -1,8 +1,8 @@
# -*- CMake -*- master configuration file for building LAMMPS
######################################## ########################################
# CMake build system # CMake build system
# This file is part of LAMMPS # This file is part of LAMMPS
# Created by Christoph Junghans and Richard Berger cmake_minimum_required(VERSION 3.16)
cmake_minimum_required(VERSION 3.10)
######################################## ########################################
# set policy to silence warnings about ignoring <PackageName>_ROOT but use it # set policy to silence warnings about ignoring <PackageName>_ROOT but use it
if(POLICY CMP0074) if(POLICY CMP0074)
@ -12,8 +12,8 @@ endif()
if(POLICY CMP0075) if(POLICY CMP0075)
cmake_policy(SET CMP0075 NEW) cmake_policy(SET CMP0075 NEW)
endif() endif()
# set policy to silence warnings about missing executable permissions in # set policy to silence warnings about requiring execute permission for find_program
# pythonx.y-config when cross-compiling. review occasionally if it may be set to NEW # we use OLD because the python-config script for the Fedora MinGW cross-compiler requires it currently
if(POLICY CMP0109) if(POLICY CMP0109)
cmake_policy(SET CMP0109 OLD) cmake_policy(SET CMP0109 OLD)
endif() endif()
@ -21,19 +21,14 @@ endif()
if(POLICY CMP0135) if(POLICY CMP0135)
cmake_policy(SET CMP0135 OLD) cmake_policy(SET CMP0135 OLD)
endif() 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) project(lammps CXX)
set(SOVERSION 0) set(SOVERSION 0)
get_property(BUILD_IS_MULTI_CONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) get_property(BUILD_IS_MULTI_CONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
include(GNUInstallDirs)
get_filename_component(LAMMPS_DIR ${CMAKE_CURRENT_SOURCE_DIR}/.. ABSOLUTE) get_filename_component(LAMMPS_DIR ${CMAKE_CURRENT_SOURCE_DIR}/.. ABSOLUTE)
get_filename_component(LAMMPS_LIB_BINARY_DIR ${CMAKE_BINARY_DIR}/lib ABSOLUTE) get_filename_component(LAMMPS_LIB_BINARY_DIR ${CMAKE_BINARY_DIR}/lib ABSOLUTE)
# collect all executables and shared libs in the top level build folder # collect all executables and shared libs in the top level build folder
@ -116,14 +111,14 @@ 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) if(CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 17.3 OR CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 17.4)
set(CMAKE_TUNE_DEFAULT "-xCOMMON-AVX512") set(CMAKE_TUNE_DEFAULT "-xCOMMON-AVX512")
else() 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() endif()
endif() endif()
# silence excessive warnings for new Intel Compilers # silence excessive warnings for new Intel Compilers
if(CMAKE_CXX_COMPILER_ID STREQUAL "IntelLLVM") if(CMAKE_CXX_COMPILER_ID STREQUAL "IntelLLVM")
set(CMAKE_TUNE_DEFAULT "-Wno-tautological-constant-compare -Wno-unused-command-line-argument") set(CMAKE_TUNE_DEFAULT "-fp-model precise -Wno-tautological-constant-compare -Wno-unused-command-line-argument")
endif() endif()
# silence excessive warnings for PGI/NVHPC compilers # silence excessive warnings for PGI/NVHPC compilers
@ -131,20 +126,33 @@ if((CMAKE_CXX_COMPILER_ID STREQUAL "NVHPC") OR (CMAKE_CXX_COMPILER_ID STREQUAL "
set(CMAKE_TUNE_DEFAULT "-Minform=severe") set(CMAKE_TUNE_DEFAULT "-Minform=severe")
endif() endif()
# silence nvcc warnings # this hack is required to compile fmt lib with CrayClang version 15.0.2
if((PKG_KOKKOS) AND (Kokkos_ENABLE_CUDA) AND NOT (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")) # CrayClang is only directly recognized by version 3.28 and later
set(CMAKE_TUNE_DEFAULT "${CMAKE_TUNE_DEFAULT} -Xcudafe --diag_suppress=unrecognized_pragma") if(CMAKE_VERSION VERSION_LESS 3.28)
get_filename_component(_exe "${CMAKE_CXX_COMPILER}" NAME)
if((CMAKE_CXX_COMPILER_ID STREQUAL "Clang") AND (_exe STREQUAL "crayCC"))
set(CMAKE_TUNE_DEFAULT "-DFMT_STATIC_THOUSANDS_SEPARATOR")
endif()
else()
if(CMAKE_CXX_COMPILER_ID STREQUAL "CrayClang")
set(CMAKE_TUNE_DEFAULT "-DFMT_STATIC_THOUSANDS_SEPARATOR")
endif()
endif() endif()
# we require C++11 without extensions. Kokkos requires at least C++14 (currently) # silence nvcc warnings
if((PKG_KOKKOS) AND (Kokkos_ENABLE_CUDA) AND NOT (CMAKE_CXX_COMPILER_ID STREQUAL "Clang"))
set(CMAKE_TUNE_DEFAULT "${CMAKE_TUNE_DEFAULT}" "-Xcudafe --diag_suppress=unrecognized_pragma,--diag_suppress=128")
endif()
# we require C++11 without extensions. Kokkos requires at least C++17 (currently)
if(NOT CMAKE_CXX_STANDARD) if(NOT CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 11) set(CMAKE_CXX_STANDARD 11)
endif() endif()
if(CMAKE_CXX_STANDARD LESS 11) if(CMAKE_CXX_STANDARD LESS 11)
message(FATAL_ERROR "C++ standard must be set to at least 11") message(FATAL_ERROR "C++ standard must be set to at least 11")
endif() endif()
if(PKG_KOKKOS AND (CMAKE_CXX_STANDARD LESS 14)) if(PKG_KOKKOS AND (CMAKE_CXX_STANDARD LESS 17))
set(CMAKE_CXX_STANDARD 14) set(CMAKE_CXX_STANDARD 17)
endif() endif()
set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF CACHE BOOL "Use compiler extensions") set(CMAKE_CXX_EXTENSIONS OFF CACHE BOOL "Use compiler extensions")
@ -155,11 +163,29 @@ if(MSVC)
add_compile_options(/Zc:__cplusplus) add_compile_options(/Zc:__cplusplus)
add_compile_options(/wd4244) add_compile_options(/wd4244)
add_compile_options(/wd4267) add_compile_options(/wd4267)
add_compile_options(/wd4250)
add_compile_options(/EHsc) add_compile_options(/EHsc)
add_compile_options(/utf-8)
endif() endif()
add_compile_definitions(_CRT_SECURE_NO_WARNINGS) add_compile_definitions(_CRT_SECURE_NO_WARNINGS)
endif() endif()
# warn about potentially problematic GCC compiler versions
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
if (CMAKE_CXX_STANDARD GREATER_EQUAL 17)
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 9.0)
message(WARNING "Using ${CMAKE_CXX_COMPILER_ID} compiler version ${CMAKE_CXX_COMPILER_VERSION} "
"with C++17 is not recommended. Please use ${CMAKE_CXX_COMPILER_ID} compiler version 9.x or later")
endif()
endif()
if (CMAKE_CXX_STANDARD GREATER_EQUAL 11)
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0)
message(WARNING "Using ${CMAKE_CXX_COMPILER_ID} compiler version ${CMAKE_CXX_COMPILER_VERSION} "
"with C++11 is not recommended. Please use ${CMAKE_CXX_COMPILER_ID} compiler version 5.x or later")
endif()
endif()
endif()
# export all symbols when building a .dll file on windows # export all symbols when building a .dll file on windows
if((CMAKE_SYSTEM_NAME STREQUAL "Windows") AND BUILD_SHARED_LIBS) if((CMAKE_SYSTEM_NAME STREQUAL "Windows") AND BUILD_SHARED_LIBS)
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
@ -168,17 +194,20 @@ endif()
######################################################################## ########################################################################
# User input options # # User input options #
######################################################################## ########################################################################
# set path to python interpreter and thus enforcing python version when # backward compatibility with CMake before 3.12 and older LAMMPS documentation
# in a virtual environment and PYTHON_EXECUTABLE is not set on command line if (PYTHON_EXECUTABLE)
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()
set(Python_EXECUTABLE "${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" message(STATUS "Running in virtual environment: $ENV{VIRTUAL_ENV}\n"
" Setting Python interpreter to: ${PYTHON_EXECUTABLE}") " Setting Python interpreter to: ${Python_EXECUTABLE}")
endif() endif()
set(LAMMPS_MACHINE "" CACHE STRING "Suffix to append to lmp binary (WON'T enable any features automatically") set(LAMMPS_MACHINE "" CACHE STRING "Suffix to append to lmp binary (WON'T enable any features automatically")
@ -191,19 +220,19 @@ set(LAMMPS_BINARY lmp${LAMMPS_MACHINE})
option(BUILD_SHARED_LIBS "Build shared library" OFF) option(BUILD_SHARED_LIBS "Build shared library" OFF)
option(CMAKE_POSITION_INDEPENDENT_CODE "Create object compatible with shared libraries" ON) 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_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 # Support using clang-tidy for C++ files with selected options
set(ENABLE_CLANG_TIDY OFF CACHE BOOL "Include clang-tidy processing when compiling") set(ENABLE_CLANG_TIDY OFF CACHE BOOL "Include clang-tidy processing when compiling")
if(ENABLE_CLANG_TIDY) if(ENABLE_CLANG_TIDY)
set(CMAKE_CXX_CLANG_TIDY "clang-tidy;-checks=-*,performance-trivially-destructible,performance-unnecessary-copy-initialization,performance-unnecessary-value-param,readability-redundant-control-flow,readability-redundant-declaration,readability-redundant-function-ptr-dereference,readability-redundant-member-init,readability-redundant-string-cstr,readability-redundant-string-init,readability-simplify-boolean-expr,readability-static-accessed-through-instance,readability-static-definition-in-anonymous-namespace,modernize-use-override,modernize-use-bool-literals,modernize-use-emplace,modernize-return-braced-init-list,modernize-use-equals-default,modernize-use-equals-delete,modernize-replace-random-shuffle,modernize-deprecated-headers,modernize-use-nullptr,modernize-use-noexcept,modernize-redundant-void-arg;-fix;-header-filter=.*,header-filter=library.h,header-filter=fmt/*.h" CACHE STRING "clang-tidy settings") set(CMAKE_CXX_CLANG_TIDY "clang-tidy;-checks=-*,performance-trivially-destructible,performance-unnecessary-copy-initialization,performance-unnecessary-value-param,readability-redundant-control-flow,readability-redundant-declaration,readability-redundant-function-ptr-dereference,readability-redundant-member-init,readability-redundant-string-cstr,readability-redundant-string-init,readability-simplify-boolean-expr,readability-static-accessed-through-instance,readability-static-definition-in-anonymous-namespace,readability-qualified-auto,misc-unused-parameters,modernize-deprecated-ios-base-aliases,modernize-loop-convert,modernize-shrink-to-fit,modernize-use-auto,modernize-use-using,modernize-use-override,modernize-use-bool-literals,modernize-use-emplace,modernize-return-braced-init-list,modernize-use-equals-default,modernize-use-equals-delete,modernize-replace-random-shuffle,modernize-deprecated-headers,modernize-use-nullptr,modernize-use-noexcept,modernize-redundant-void-arg;-fix;-header-filter=.*,header-filter=library.h,header-filter=fmt/*.h" CACHE STRING "clang-tidy settings")
else() else()
unset(CMAKE_CXX_CLANG_TIDY CACHE) unset(CMAKE_CXX_CLANG_TIDY CACHE)
endif() endif()
include(GNUInstallDirs)
file(GLOB ALL_SOURCES ${CONFIGURE_DEPENDS} ${LAMMPS_SOURCE_DIR}/[^.]*.cpp) file(GLOB ALL_SOURCES CONFIGURE_DEPENDS ${LAMMPS_SOURCE_DIR}/[^.]*.cpp)
file(GLOB MAIN_SOURCES ${CONFIGURE_DEPENDS} ${LAMMPS_SOURCE_DIR}/main.cpp) file(GLOB MAIN_SOURCES CONFIGURE_DEPENDS ${LAMMPS_SOURCE_DIR}/main.cpp)
list(REMOVE_ITEM ALL_SOURCES ${MAIN_SOURCES}) list(REMOVE_ITEM ALL_SOURCES ${MAIN_SOURCES})
add_library(lammps ${ALL_SOURCES}) add_library(lammps ${ALL_SOURCES})
@ -215,6 +244,10 @@ endif()
add_executable(lmp ${MAIN_SOURCES}) add_executable(lmp ${MAIN_SOURCES})
target_link_libraries(lmp PRIVATE lammps) target_link_libraries(lmp PRIVATE lammps)
set_target_properties(lmp PROPERTIES OUTPUT_NAME ${LAMMPS_BINARY}) set_target_properties(lmp PROPERTIES OUTPUT_NAME ${LAMMPS_BINARY})
# re-export all symbols for plugins
if(PKG_PLUGIN AND (NOT ((CMAKE_SYSTEM_NAME STREQUAL "Windows"))))
set_target_properties(lmp PROPERTIES ENABLE_EXPORTS TRUE)
endif()
install(TARGETS lmp EXPORT LAMMPS_Targets DESTINATION ${CMAKE_INSTALL_BINDIR}) install(TARGETS lmp EXPORT LAMMPS_Targets DESTINATION ${CMAKE_INSTALL_BINDIR})
option(CMAKE_VERBOSE_MAKEFILE "Generate verbose Makefiles" OFF) option(CMAKE_VERBOSE_MAKEFILE "Generate verbose Makefiles" OFF)
@ -245,6 +278,7 @@ set(STANDARD_PACKAGES
DRUDE DRUDE
EFF EFF
ELECTRODE ELECTRODE
EXTRA-COMMAND
EXTRA-COMPUTE EXTRA-COMPUTE
EXTRA-DUMP EXTRA-DUMP
EXTRA-FIX EXTRA-FIX
@ -270,15 +304,14 @@ set(STANDARD_PACKAGES
ML-HDNNP ML-HDNNP
ML-IAP ML-IAP
ML-PACE ML-PACE
ML-POD
ML-QUIP ML-QUIP
ML-RANN ML-RANN
ML-SNAP ML-SNAP
ML-POD ML-UF3
MOFFF MOFFF
MOLECULE MOLECULE
MOLFILE MOLFILE
MPIIO
MSCG
NETCDF NETCDF
ORIENT ORIENT
PERI PERI
@ -294,6 +327,7 @@ set(STANDARD_PACKAGES
REACTION REACTION
REAXFF REAXFF
REPLICA REPLICA
RHEO
RIGID RIGID
SCAFACOS SCAFACOS
SHOCK SHOCK
@ -384,15 +418,9 @@ if(NOT ${LAMMPS_MEMALIGN} STREQUAL "0")
target_compile_definitions(lammps PRIVATE -DLAMMPS_MEMALIGN=${LAMMPS_MEMALIGN}) target_compile_definitions(lammps PRIVATE -DLAMMPS_MEMALIGN=${LAMMPS_MEMALIGN})
endif() 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 # "hard" dependencies between packages resulting
# in an error instead of skipping over files # in an error instead of skipping over files
pkg_depends(ML-IAP ML-SNAP) pkg_depends(ML-IAP ML-SNAP)
pkg_depends(MPIIO MPI)
pkg_depends(ATC MANYBODY) pkg_depends(ATC MANYBODY)
pkg_depends(LATBOLTZ MPI) pkg_depends(LATBOLTZ MPI)
pkg_depends(SCAFACOS MPI) pkg_depends(SCAFACOS MPI)
@ -403,6 +431,8 @@ pkg_depends(CG-DNA MOLECULE)
pkg_depends(CG-DNA ASPHERE) pkg_depends(CG-DNA ASPHERE)
pkg_depends(ELECTRODE KSPACE) pkg_depends(ELECTRODE KSPACE)
pkg_depends(EXTRA-MOLECULE MOLECULE) pkg_depends(EXTRA-MOLECULE MOLECULE)
pkg_depends(MESONT MOLECULE)
pkg_depends(RHEO BPM)
# detect if we may enable OpenMP support by default # detect if we may enable OpenMP support by default
set(BUILD_OMP_DEFAULT OFF) set(BUILD_OMP_DEFAULT OFF)
@ -428,6 +458,7 @@ if(BUILD_OMP)
(CMAKE_CXX_COMPILER_ID STREQUAL "IntelLLVM") OR (CMAKE_CXX_COMPILER_ID STREQUAL "XLClang") OR (CMAKE_CXX_COMPILER_ID STREQUAL "IntelLLVM") OR (CMAKE_CXX_COMPILER_ID STREQUAL "XLClang") OR
((CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang") AND (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 10.0)) OR ((CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang") AND (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 10.0)) OR
((CMAKE_CXX_COMPILER_ID STREQUAL "Clang") AND (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 10.0)) OR ((CMAKE_CXX_COMPILER_ID STREQUAL "Clang") AND (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 10.0)) OR
((CMAKE_CXX_COMPILER_ID STREQUAL "CrayClang") AND (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 10.0)) OR
((CMAKE_CXX_COMPILER_ID STREQUAL "Intel") AND (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 19.0))) ((CMAKE_CXX_COMPILER_ID STREQUAL "Intel") AND (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 19.0)))
# GCC 9.x and later plus Clang 10.x and later implement strict OpenMP 4.0 semantics for consts. # GCC 9.x and later plus Clang 10.x and later implement strict OpenMP 4.0 semantics for consts.
# Intel 18.0 was tested to support both, so we switch to OpenMP 4+ from 19.x onward to be safe. # Intel 18.0 was tested to support both, so we switch to OpenMP 4+ from 19.x onward to be safe.
@ -438,16 +469,43 @@ if(BUILD_OMP)
target_compile_definitions(lammps PRIVATE -DLAMMPS_OMP_COMPAT=${LAMMPS_OMP_COMPAT_LEVEL}) target_compile_definitions(lammps PRIVATE -DLAMMPS_OMP_COMPAT=${LAMMPS_OMP_COMPAT_LEVEL})
target_link_libraries(lammps PRIVATE OpenMP::OpenMP_CXX) target_link_libraries(lammps PRIVATE OpenMP::OpenMP_CXX)
target_link_libraries(lmp PRIVATE OpenMP::OpenMP_CXX) target_link_libraries(lmp PRIVATE OpenMP::OpenMP_CXX)
# this hack is required to correctly link with OpenMP support when using CrayClang version 15.0.2
# CrayClang is only directly recognized by version 3.28 and later
if(CMAKE_VERSION VERSION_LESS 3.28)
get_filename_component(_exe "${CMAKE_CXX_COMPILER}" NAME)
if((CMAKE_CXX_COMPILER_ID STREQUAL "Clang") AND (_exe STREQUAL "crayCC"))
set(CMAKE_SHARED_LINKER_FLAGS_${BTYPE} "${CMAKE_SHARED_LINKER_FLAGS_${BTYPE}} -fopenmp")
set(CMAKE_STATIC_LINKER_FLAGS_${BTYPE} "${CMAKE_STATIC_LINKER_FLAGS_${BTYPE}} -fopenmp")
endif()
else()
if(CMAKE_CXX_COMPILER_ID STREQUAL "CrayClang")
set(CMAKE_SHARED_LINKER_FLAGS_${BTYPE} "${CMAKE_SHARED_LINKER_FLAGS_${BTYPE}} -fopenmp")
set(CMAKE_STATIC_LINKER_FLAGS_${BTYPE} "${CMAKE_STATIC_LINKER_FLAGS_${BTYPE}} -fopenmp")
endif()
endif()
endif() endif()
if(PKG_MSCG OR PKG_ATC OR PKG_AWPMD OR PKG_ML-QUIP OR PKG_ML-POD OR PKG_ELECTRODE OR BUILD_TOOLS) # 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 PKG_RHEO OR BUILD_TOOLS)
enable_language(C) enable_language(C)
if (NOT USE_INTERNAL_LINALG) if (NOT USE_INTERNAL_LINALG)
find_package(LAPACK) find_package(LAPACK)
find_package(BLAS) find_package(BLAS)
endif() endif()
if(NOT LAPACK_FOUND OR NOT BLAS_FOUND OR USE_INTERNAL_LINALG) 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}) add_library(linalg STATIC ${LINALG_SOURCES})
set_target_properties(linalg PROPERTIES OUTPUT_NAME lammps_linalg${LAMMPS_MACHINE}) set_target_properties(linalg PROPERTIES OUTPUT_NAME lammps_linalg${LAMMPS_MACHINE})
set(BLAS_LIBRARIES "$<TARGET_FILE:linalg>") set(BLAS_LIBRARIES "$<TARGET_FILE:linalg>")
@ -465,12 +523,7 @@ option(WITH_JPEG "Enable JPEG support" ${JPEG_FOUND})
if(WITH_JPEG) if(WITH_JPEG)
find_package(JPEG REQUIRED) find_package(JPEG REQUIRED)
target_compile_definitions(lammps PRIVATE -DLAMMPS_JPEG) target_compile_definitions(lammps PRIVATE -DLAMMPS_JPEG)
if(CMAKE_VERSION VERSION_LESS 3.12) target_link_libraries(lammps PRIVATE JPEG::JPEG)
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() endif()
find_package(PNG QUIET) find_package(PNG QUIET)
@ -520,7 +573,7 @@ else()
endif() endif()
foreach(PKG_WITH_INCL KSPACE PYTHON ML-IAP VORONOI COLVARS ML-HDNNP MDI MOLFILE NETCDF foreach(PKG_WITH_INCL KSPACE PYTHON ML-IAP VORONOI COLVARS ML-HDNNP MDI MOLFILE NETCDF
PLUMED QMMM ML-QUIP SCAFACOS MACHDYN VTK KIM MSCG COMPRESS ML-PACE LEPTON) PLUMED QMMM ML-QUIP SCAFACOS MACHDYN VTK KIM COMPRESS ML-PACE LEPTON EXTRA-COMMAND)
if(PKG_${PKG_WITH_INCL}) if(PKG_${PKG_WITH_INCL})
include(Packages/${PKG_WITH_INCL}) include(Packages/${PKG_WITH_INCL})
endif() endif()
@ -535,22 +588,17 @@ endif()
set(CMAKE_TUNE_FLAGS "${CMAKE_TUNE_DEFAULT}" CACHE STRING "Compiler and machine specific optimization flags (compilation only)") set(CMAKE_TUNE_FLAGS "${CMAKE_TUNE_DEFAULT}" CACHE STRING "Compiler and machine specific optimization flags (compilation only)")
separate_arguments(CMAKE_TUNE_FLAGS) separate_arguments(CMAKE_TUNE_FLAGS)
foreach(_FLAG ${CMAKE_TUNE_FLAGS}) target_compile_options(lammps PRIVATE ${CMAKE_TUNE_FLAGS})
target_compile_options(lammps PRIVATE ${_FLAG}) target_compile_options(lmp PRIVATE ${CMAKE_TUNE_FLAGS})
# 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) # # Basic system tests (standard libraries, headers, functions, types) #
######################################################################## ########################################################################
foreach(HEADER cmath) if (NOT ((CMAKE_CXX_COMPILER_ID STREQUAL "Intel") OR (CMAKE_CXX_COMPILER_ID STREQUAL "IntelLLVM")))
check_include_file_cxx(${HEADER} FOUND_${HEADER}) check_include_file_cxx(cmath FOUND_CMATH)
if(NOT FOUND_${HEADER}) if(NOT FOUND_CMATH)
message(FATAL_ERROR "Could not find needed header - ${HEADER}") message(FATAL_ERROR "Could not find the required 'cmath' header")
endif(NOT FOUND_${HEADER}) endif(NOT FOUND_CMATH)
endforeach(HEADER) endif()
# make the standard math library overrideable and autodetected (for systems that don't have it) # make the standard math library overrideable and autodetected (for systems that don't have it)
find_library(STANDARD_MATH_LIB m DOC "Standard Math library") find_library(STANDARD_MATH_LIB m DOC "Standard Math library")
@ -582,8 +630,8 @@ endforeach()
foreach(PKG ${STANDARD_PACKAGES}) foreach(PKG ${STANDARD_PACKAGES})
set(${PKG}_SOURCES_DIR ${LAMMPS_SOURCE_DIR}/${PKG}) set(${PKG}_SOURCES_DIR ${LAMMPS_SOURCE_DIR}/${PKG})
file(GLOB ${PKG}_SOURCES ${CONFIGURE_DEPENDS} ${${PKG}_SOURCES_DIR}/[^.]*.cpp) file(GLOB ${PKG}_SOURCES CONFIGURE_DEPENDS ${${PKG}_SOURCES_DIR}/[^.]*.cpp)
file(GLOB ${PKG}_HEADERS ${CONFIGURE_DEPENDS} ${${PKG}_SOURCES_DIR}/[^.]*.h) file(GLOB ${PKG}_HEADERS CONFIGURE_DEPENDS ${${PKG}_SOURCES_DIR}/[^.]*.h)
# check for package files in src directory due to old make system # check for package files in src directory due to old make system
DetectBuildSystemConflict(${LAMMPS_SOURCE_DIR} ${${PKG}_SOURCES} ${${PKG}_HEADERS}) DetectBuildSystemConflict(${LAMMPS_SOURCE_DIR} ${${PKG}_SOURCES} ${${PKG}_HEADERS})
@ -599,19 +647,12 @@ foreach(PKG ${STANDARD_PACKAGES})
RegisterPackages(${${PKG}_SOURCES_DIR}) RegisterPackages(${${PKG}_SOURCES_DIR})
endforeach() 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 # dedicated check for entire contents of accelerator packages
foreach(PKG ${SUFFIX_PACKAGES}) foreach(PKG ${SUFFIX_PACKAGES})
set(${PKG}_SOURCES_DIR ${LAMMPS_SOURCE_DIR}/${PKG}) set(${PKG}_SOURCES_DIR ${LAMMPS_SOURCE_DIR}/${PKG})
file(GLOB ${PKG}_SOURCES ${CONFIGURE_DEPENDS} ${${PKG}_SOURCES_DIR}/[^.]*.cpp) file(GLOB ${PKG}_SOURCES CONFIGURE_DEPENDS ${${PKG}_SOURCES_DIR}/[^.]*.cpp)
file(GLOB ${PKG}_HEADERS ${CONFIGURE_DEPENDS} ${${PKG}_SOURCES_DIR}/[^.]*.h) file(GLOB ${PKG}_HEADERS CONFIGURE_DEPENDS ${${PKG}_SOURCES_DIR}/[^.]*.h)
# check for package files in src directory due to old make system # check for package files in src directory due to old make system
DetectBuildSystemConflict(${LAMMPS_SOURCE_DIR} ${${PKG}_SOURCES} ${${PKG}_HEADERS}) DetectBuildSystemConflict(${LAMMPS_SOURCE_DIR} ${${PKG}_SOURCES} ${${PKG}_HEADERS})
@ -625,7 +666,7 @@ endforeach()
foreach(PKG_LIB POEMS ATC AWPMD H5MD) foreach(PKG_LIB POEMS ATC AWPMD H5MD)
if(PKG_${PKG_LIB}) if(PKG_${PKG_LIB})
string(TOLOWER "${PKG_LIB}" 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) ${LAMMPS_LIB_SOURCE_DIR}/${PKG_LIB}/[^.]*.c ${LAMMPS_LIB_SOURCE_DIR}/${PKG_LIB}/[^.]*.cpp)
add_library(${PKG_LIB} STATIC ${${PKG_LIB}_SOURCES}) add_library(${PKG_LIB} STATIC ${${PKG_LIB}_SOURCES})
set_target_properties(${PKG_LIB} PROPERTIES OUTPUT_NAME lammps_${PKG_LIB}${LAMMPS_MACHINE}) set_target_properties(${PKG_LIB} PROPERTIES OUTPUT_NAME lammps_${PKG_LIB}${LAMMPS_MACHINE})
@ -669,7 +710,7 @@ endif()
# packages which selectively include variants based on enabled styles # packages which selectively include variants based on enabled styles
# e.g. accelerator packages # e.g. accelerator packages
###################################################################### ######################################################################
foreach(PKG_WITH_INCL CORESHELL DPD-SMOOTH MC MISC PHONON QEQ OPENMP KOKKOS OPT INTEL GPU) foreach(PKG_WITH_INCL CORESHELL DPD-BASIC DPD-SMOOTH MC MISC PHONON QEQ OPENMP KOKKOS OPT INTEL GPU)
if(PKG_${PKG_WITH_INCL}) if(PKG_${PKG_WITH_INCL})
include(Packages/${PKG_WITH_INCL}) include(Packages/${PKG_WITH_INCL})
endif() endif()
@ -777,9 +818,15 @@ foreach(_DEF ${LAMMPS_DEFINES})
set(LAMMPS_API_DEFINES "${LAMMPS_API_DEFINES} -D${_DEF}") set(LAMMPS_API_DEFINES "${LAMMPS_API_DEFINES} -D${_DEF}")
endforeach() endforeach()
if(BUILD_SHARED_LIBS) if(BUILD_SHARED_LIBS)
install(TARGETS lammps EXPORT LAMMPS_Targets LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) install(TARGETS lammps EXPORT LAMMPS_Targets
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
if(NOT BUILD_MPI) if(NOT BUILD_MPI)
install(TARGETS mpi_stubs EXPORT LAMMPS_Targets LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) install(TARGETS mpi_stubs EXPORT LAMMPS_Targets
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
endif() endif()
configure_file(pkgconfig/liblammps.pc.in ${CMAKE_CURRENT_BINARY_DIR}/liblammps${LAMMPS_MACHINE}.pc @ONLY) configure_file(pkgconfig/liblammps.pc.in ${CMAKE_CURRENT_BINARY_DIR}/liblammps${LAMMPS_MACHINE}.pc @ONLY)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/liblammps${LAMMPS_MACHINE}.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/liblammps${LAMMPS_MACHINE}.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
@ -795,9 +842,11 @@ include(Tools)
include(Documentation) 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}) install(DIRECTORY ${LAMMPS_POTENTIALS_DIR} DESTINATION ${LAMMPS_INSTALL_DATADIR})
if(BUILD_TOOLS) if(BUILD_TOOLS)
install(DIRECTORY ${LAMMPS_TOOLS_DIR}/msi2lmp/frc_files DESTINATION ${LAMMPS_INSTALL_DATADIR}) install(DIRECTORY ${LAMMPS_TOOLS_DIR}/msi2lmp/frc_files DESTINATION ${LAMMPS_INSTALL_DATADIR})
@ -818,20 +867,8 @@ install(
# This is primarily for people that only want to use the Python wrapper. # This is primarily for people that only want to use the Python wrapper.
############################################################################### ###############################################################################
if(BUILD_SHARED_LIBS) if(BUILD_SHARED_LIBS)
if(CMAKE_VERSION VERSION_LESS 3.12) # backward compatibility
# adjust so we find Python 3 versions before Python 2 on old systems with old CMake find_package(Python COMPONENTS Interpreter)
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) if(BUILD_IS_MULTI_CONFIG)
set(MY_BUILD_DIR ${CMAKE_BINARY_DIR}/$<CONFIG>) set(MY_BUILD_DIR ${CMAKE_BINARY_DIR}/$<CONFIG>)
else() else()
@ -857,7 +894,7 @@ endif()
include(Testing) include(Testing)
include(CodeCoverage) include(CodeCoverage)
include(CodingStandard) include(CodingStandard)
find_package(ClangFormat 8.0) find_package(ClangFormat 11.0)
if(ClangFormat_FOUND) if(ClangFormat_FOUND)
add_custom_target(format-src add_custom_target(format-src
@ -890,13 +927,23 @@ else()
endif() endif()
include(FeatureSummary) include(FeatureSummary)
feature_summary(DESCRIPTION "The following tools and libraries have been found and configured:" WHAT PACKAGES_FOUND) 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 >>> 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} Operating System: ${CMAKE_SYSTEM_NAME} ${CMAKE_LINUX_DISTRO} ${CMAKE_DISTRO_VERSION}
CMake Version: ${CMAKE_VERSION} CMake Version: ${CMAKE_VERSION}
Build type: ${LAMMPS_BUILD_TYPE} Build type: ${LAMMPS_BUILD_TYPE}
Install path: ${CMAKE_INSTALL_PREFIX} Install path: ${CMAKE_INSTALL_PREFIX}
Generator: ${CMAKE_GENERATOR} using ${CMAKE_MAKE_PROGRAM}") Generator: ${CMAKE_GENERATOR} using ${CMAKE_MAKE_PROGRAM}")
if(CMAKE_CROSSCOMPILING)
message(STATUS "Cross compiling on ${CMAKE_HOST_SYSTEM}")
endif()
############################################################################### ###############################################################################
# Print package summary # Print package summary
############################################################################### ###############################################################################
@ -917,8 +964,12 @@ message(STATUS "<<< Compilers and Flags: >>>
-- C++ Compiler: ${CMAKE_CXX_COMPILER} -- C++ Compiler: ${CMAKE_CXX_COMPILER}
Type: ${CMAKE_CXX_COMPILER_ID} Type: ${CMAKE_CXX_COMPILER_ID}
Version: ${CMAKE_CXX_COMPILER_VERSION} Version: ${CMAKE_CXX_COMPILER_VERSION}
C++ Standard: ${CMAKE_CXX_STANDARD}
C++ Flags: ${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_${BTYPE}} C++ Flags: ${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_${BTYPE}}
Defines: ${DEFINES}") Defines: ${DEFINES}")
if(CMAKE_CXX_COMPILER_LAUNCHER)
message(STATUS " Launcher: ${CMAKE_CXX_COMPILER_LAUNCHER}")
endif()
get_target_property(OPTIONS lammps COMPILE_OPTIONS) get_target_property(OPTIONS lammps COMPILE_OPTIONS)
if(OPTIONS) if(OPTIONS)
message(" Options: ${OPTIONS}") message(" Options: ${OPTIONS}")
@ -937,14 +988,15 @@ if(_index GREATER -1)
Type: ${CMAKE_C_COMPILER_ID} Type: ${CMAKE_C_COMPILER_ID}
Version: ${CMAKE_C_COMPILER_VERSION} Version: ${CMAKE_C_COMPILER_VERSION}
C Flags: ${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_${BTYPE}}") C Flags: ${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_${BTYPE}}")
if(CMAKE_C_COMPILER_LAUNCHER)
message(STATUS " Launcher: ${CMAKE_C_COMPILER_LAUNCHER}")
endif()
endif() endif()
message(STATUS "<<< Linker flags: >>>") message(STATUS "<<< Linker flags: >>>")
message(STATUS "Executable name: ${LAMMPS_BINARY}") message(STATUS "Executable name: ${LAMMPS_BINARY}")
if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.13) get_target_property(OPTIONS lammps LINK_OPTIONS)
get_target_property(OPTIONS lammps LINK_OPTIONS) if(OPTIONS)
if(OPTIONS) message(STATUS "Linker options: ${OPTIONS}")
message(STATUS "Linker options: ${OPTIONS}")
endif()
endif() endif()
if(CMAKE_EXE_LINKER_FLAGS) if(CMAKE_EXE_LINKER_FLAGS)
message(STATUS "Executable linker flags: ${CMAKE_EXE_LINKER_FLAGS}") message(STATUS "Executable linker flags: ${CMAKE_EXE_LINKER_FLAGS}")
@ -986,34 +1038,37 @@ if(PKG_KOKKOS)
endif() endif()
endif() endif()
if(PKG_KSPACE) if(PKG_KSPACE)
message(STATUS "<<< FFT settings >>> if (FFT_USE_HEFFTE)
message(STATUS "<<< FFT settings >>>
-- Primary FFT lib: heFFTe")
if (FFT_HEFFTE_BACKEND)
message(STATUS "heFFTe backend: ${FFT_HEFFTE_BACKEND}")
else()
message(STATUS "heFFTe backend: stock (builtin FFT implementation, tested for corrected but not optimized for production)")
endif()
message(STATUS "Using distributed FFT algorithms from heFTTe")
if(FFT_SINGLE)
message(STATUS "Using single precision FFTs")
else()
message(STATUS "Using double precision FFTs")
endif()
else()
message(STATUS "<<< FFT settings >>>
-- Primary FFT lib: ${FFT}") -- Primary FFT lib: ${FFT}")
if(FFT_SINGLE) if(FFT_SINGLE)
message(STATUS "Using single precision FFTs") message(STATUS "Using single precision FFTs")
else() else()
message(STATUS "Using double precision FFTs") message(STATUS "Using double precision FFTs")
endif() endif()
if(FFT_FFTW_THREADS OR FFT_MKL_THREADS) if(FFT_FFTW_THREADS OR FFT_MKL_THREADS)
message(STATUS "Using threaded FFTs") message(STATUS "Using threaded FFTs")
else() else()
message(STATUS "Using non-threaded FFTs") message(STATUS "Using non-threaded FFTs")
endif()
message(STATUS "Using builtin distributed FFT algorithms")
endif() endif()
if(PKG_KOKKOS) if(PKG_KOKKOS)
if(Kokkos_ENABLE_CUDA) message(STATUS "Kokkos FFT: ${FFT_KOKKOS}")
if(FFT STREQUAL "KISS")
message(STATUS "Kokkos FFT: KISS")
else()
message(STATUS "Kokkos FFT: cuFFT")
endif()
elseif(Kokkos_ENABLE_HIP)
if(FFT STREQUAL "KISS")
message(STATUS "Kokkos FFT: KISS")
else()
message(STATUS "Kokkos FFT: hipFFT")
endif()
else()
message(STATUS "Kokkos FFT: ${FFT}")
endif()
endif() endif()
endif() endif()
if(BUILD_DOC) if(BUILD_DOC)
@ -1022,8 +1077,13 @@ endif()
if(BUILD_TOOLS) if(BUILD_TOOLS)
message(STATUS "<<< Building Tools >>>") message(STATUS "<<< Building Tools >>>")
endif() endif()
if(BUILD_LAMMPS_SHELL) if(BUILD_LAMMPS_GUI)
message(STATUS "<<< Building LAMMPS Shell >>>") 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() endif()
if(ENABLE_TESTING) if(ENABLE_TESTING)
message(STATUS "<<< Building Unit Tests >>>") message(STATUS "<<< Building Unit Tests >>>")

View File

@ -63,6 +63,11 @@
"name": "ENABLE_TESTING", "name": "ENABLE_TESTING",
"value": "True", "value": "True",
"type": "BOOL" "type": "BOOL"
},
{
"name": "BUILD_LAMMPS_GUI",
"value": "False",
"type": "BOOL"
} }
] ]
}, },
@ -303,6 +308,54 @@
"type": "STRING" "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,19 +1,11 @@
if(CMAKE_VERSION VERSION_LESS 3.12) # use default (or custom) Python executable, if version is sufficient
find_package(PythonInterp 3.5 QUIET) # Deprecated since version 3.12 if(Python_VERSION VERSION_GREATER_EQUAL 3.6)
if(PYTHONINTERP_FOUND) set(Python3_EXECUTABLE ${Python_EXECUTABLE})
set(Python3_EXECUTABLE ${PYTHON_EXECUTABLE})
set(Python3_VERSION ${PYTHON_VERSION_STRING})
endif()
else()
# use default (or custom) Python executable, if version is sufficient
if(Python_VERSION VERSION_GREATER_EQUAL 3.5)
set(Python3_EXECUTABLE ${Python_EXECUTABLE})
endif()
find_package(Python3 COMPONENTS Interpreter QUIET)
endif() endif()
find_package(Python3 COMPONENTS Interpreter)
if(Python3_EXECUTABLE) if(Python3_EXECUTABLE)
if(Python3_VERSION VERSION_GREATER_EQUAL 3.5) if(Python3_VERSION VERSION_GREATER_EQUAL 3.6)
add_custom_target( add_custom_target(
check-whitespace check-whitespace
${Python3_EXECUTABLE} ${LAMMPS_TOOLS_DIR}/coding_standard/whitespace.py . ${Python3_EXECUTABLE} ${LAMMPS_TOOLS_DIR}/coding_standard/whitespace.py .

View File

@ -1,11 +1,3 @@
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 ROCM_PATH)
if(NOT DEFINED ENV{ROCM_PATH}) if(NOT DEFINED ENV{ROCM_PATH})
set(ROCM_PATH "/opt/rocm" CACHE PATH "Path to ROCm installation") set(ROCM_PATH "/opt/rocm" CACHE PATH "Path to ROCm installation")
@ -13,4 +5,4 @@ if(NOT DEFINED ROCM_PATH)
set(ROCM_PATH $ENV{ROCM_PATH} CACHE PATH "Path to ROCm installation") set(ROCM_PATH $ENV{ROCM_PATH} CACHE PATH "Path to ROCm installation")
endif() endif()
endif() endif()
list(APPEND CMAKE_PREFIX_PATH ${HIP_PATH} ${ROCM_PATH}) list(APPEND CMAKE_PREFIX_PATH ${ROCM_PATH})

View File

@ -4,33 +4,21 @@
option(BUILD_DOC "Build LAMMPS HTML documentation" OFF) option(BUILD_DOC "Build LAMMPS HTML documentation" OFF)
if(BUILD_DOC) if(BUILD_DOC)
option(BUILD_DOC_VENV "Build LAMMPS documentation virtual environment" ON)
mark_as_advanced(BUILD_DOC_VENV)
# Current Sphinx versions require at least Python 3.8 # Current Sphinx versions require at least Python 3.8
if(CMAKE_VERSION VERSION_LESS 3.12) # use default (or custom) Python executable, if version is sufficient
find_package(PythonInterp 3.8 REQUIRED) if(Python_VERSION VERSION_GREATER_EQUAL 3.8)
set(VIRTUALENV ${PYTHON_EXECUTABLE} -m venv) set(Python3_EXECUTABLE ${Python_EXECUTABLE})
else()
# use default (or custom) Python executable, if version is sufficient
if(Python_VERSION VERSION_GREATER_EQUAL 3.8)
set(Python3_EXECUTABLE ${Python_EXECUTABLE})
endif()
find_package(Python3 REQUIRED COMPONENTS Interpreter)
if(Python3_VERSION VERSION_LESS 3.8)
message(FATAL_ERROR "Python 3.8 and up is required to build the HTML documentation")
endif()
set(VIRTUALENV ${Python3_EXECUTABLE} -m venv)
endif() endif()
find_package(Python3 REQUIRED COMPONENTS Interpreter)
if(Python3_VERSION VERSION_LESS 3.8)
message(FATAL_ERROR "Python 3.8 and up is required to build the HTML documentation")
endif()
set(VIRTUALENV ${Python3_EXECUTABLE} -m venv)
find_package(Doxygen 1.8.10 REQUIRED) 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
COMMAND ${VIRTUALENV} docenv
)
set(DOCENV_BINARY_DIR ${CMAKE_BINARY_DIR}/docenv/bin)
set(DOCENV_REQUIREMENTS_FILE ${LAMMPS_DOC_DIR}/utils/requirements.txt)
set(SPHINX_CONFIG_DIR ${LAMMPS_DOC_DIR}/utils/sphinx-config) set(SPHINX_CONFIG_DIR ${LAMMPS_DOC_DIR}/utils/sphinx-config)
set(SPHINX_CONFIG_FILE_TEMPLATE ${SPHINX_CONFIG_DIR}/conf.py.in) set(SPHINX_CONFIG_FILE_TEMPLATE ${SPHINX_CONFIG_DIR}/conf.py.in)
@ -50,14 +38,32 @@ if(BUILD_DOC)
# configure paths in conf.py, since relative paths change when file is copied # configure paths in conf.py, since relative paths change when file is copied
configure_file(${SPHINX_CONFIG_FILE_TEMPLATE} ${DOC_BUILD_CONFIG_FILE}) configure_file(${SPHINX_CONFIG_FILE_TEMPLATE} ${DOC_BUILD_CONFIG_FILE})
add_custom_command( if(BUILD_DOC_VENV)
OUTPUT ${DOC_BUILD_DIR}/requirements.txt add_custom_command(
DEPENDS docenv ${DOCENV_REQUIREMENTS_FILE} OUTPUT docenv
COMMAND ${CMAKE_COMMAND} -E copy ${DOCENV_REQUIREMENTS_FILE} ${DOC_BUILD_DIR}/requirements.txt COMMAND ${VIRTUALENV} docenv
COMMAND ${DOCENV_BINARY_DIR}/pip $ENV{PIP_OPTIONS} install --upgrade pip )
COMMAND ${DOCENV_BINARY_DIR}/pip $ENV{PIP_OPTIONS} install --upgrade ${LAMMPS_DOC_DIR}/utils/converters
COMMAND ${DOCENV_BINARY_DIR}/pip $ENV{PIP_OPTIONS} install -r ${DOC_BUILD_DIR}/requirements.txt --upgrade set(DOCENV_BINARY_DIR ${CMAKE_BINARY_DIR}/docenv/bin)
) set(DOCENV_REQUIREMENTS_FILE ${LAMMPS_DOC_DIR}/utils/requirements.txt)
add_custom_command(
OUTPUT ${DOC_BUILD_DIR}/requirements.txt
DEPENDS docenv ${DOCENV_REQUIREMENTS_FILE}
COMMAND ${CMAKE_COMMAND} -E copy ${DOCENV_REQUIREMENTS_FILE} ${DOC_BUILD_DIR}/requirements.txt
COMMAND ${DOCENV_BINARY_DIR}/pip $ENV{PIP_OPTIONS} install --upgrade pip
COMMAND ${DOCENV_BINARY_DIR}/pip $ENV{PIP_OPTIONS} install --upgrade ${LAMMPS_DOC_DIR}/utils/converters
COMMAND ${DOCENV_BINARY_DIR}/pip $ENV{PIP_OPTIONS} install -r ${DOC_BUILD_DIR}/requirements.txt --upgrade
)
set(DOCENV_DEPS docenv ${DOC_BUILD_DIR}/requirements.txt)
if(NOT TARGET Sphinx::sphinx-build)
add_executable(Sphinx::sphinx-build IMPORTED GLOBAL)
set_target_properties(Sphinx::sphinx-build PROPERTIES IMPORTED_LOCATION "${DOCENV_BINARY_DIR}/sphinx-build")
endif()
else()
find_package(Sphinx)
endif()
set(MATHJAX_URL "https://github.com/mathjax/MathJax/archive/3.1.3.tar.gz" CACHE STRING "URL for MathJax tarball") set(MATHJAX_URL "https://github.com/mathjax/MathJax/archive/3.1.3.tar.gz" CACHE STRING "URL for MathJax tarball")
set(MATHJAX_MD5 "b81661c6e6ba06278e6ae37b30b0c492" CACHE STRING "MD5 checksum of MathJax tarball") set(MATHJAX_MD5 "b81661c6e6ba06278e6ae37b30b0c492" CACHE STRING "MD5 checksum of MathJax tarball")
@ -80,7 +86,7 @@ if(BUILD_DOC)
message(STATUS "Using already downloaded archive ${CMAKE_BINARY_DIR}/libpace.tar.gz") message(STATUS "Using already downloaded archive ${CMAKE_BINARY_DIR}/libpace.tar.gz")
endif() endif()
execute_process(COMMAND ${CMAKE_COMMAND} -E tar xzf mathjax.tar.gz WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) 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) execute_process(COMMAND ${CMAKE_COMMAND} -E rename ${MATHJAX_VERSION_DIR} ${DOC_BUILD_STATIC_DIR}/mathjax)
endif() endif()
@ -103,8 +109,9 @@ if(BUILD_DOC)
endif() endif()
add_custom_command( add_custom_command(
OUTPUT html OUTPUT html
DEPENDS ${DOC_SOURCES} docenv ${DOC_BUILD_DIR}/requirements.txt ${DOXYGEN_XML_DIR}/index.xml ${BUILD_DOC_CONFIG_FILE} DEPENDS ${DOC_SOURCES} ${DOCENV_DEPS} ${DOXYGEN_XML_DIR}/index.xml ${BUILD_DOC_CONFIG_FILE}
COMMAND ${DOCENV_BINARY_DIR}/sphinx-build ${SPHINX_EXTRA_OPTS} -b html -c ${DOC_BUILD_DIR} -d ${DOC_BUILD_DIR}/doctrees ${LAMMPS_DOC_DIR}/src ${DOC_BUILD_DIR}/html COMMAND ${Python3_EXECUTABLE} ${LAMMPS_DOC_DIR}/utils/make-globbed-tocs.py -d ${LAMMPS_DOC_DIR}/src
COMMAND Sphinx::sphinx-build ${SPHINX_EXTRA_OPTS} -b html -c ${DOC_BUILD_DIR} -d ${DOC_BUILD_DIR}/doctrees ${LAMMPS_DOC_DIR}/src ${DOC_BUILD_DIR}/html
COMMAND ${CMAKE_COMMAND} -E create_symlink Manual.html ${DOC_BUILD_DIR}/html/index.html COMMAND ${CMAKE_COMMAND} -E create_symlink Manual.html ${DOC_BUILD_DIR}/html/index.html
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LAMMPS_DOC_DIR}/src/PDF ${DOC_BUILD_DIR}/html/PDF COMMAND ${CMAKE_COMMAND} -E copy_directory ${LAMMPS_DOC_DIR}/src/PDF ${DOC_BUILD_DIR}/html/PDF
COMMAND ${CMAKE_COMMAND} -E remove -f ${DOXYGEN_XML_DIR}/run.stamp COMMAND ${CMAKE_COMMAND} -E remove -f ${DOXYGEN_XML_DIR}/run.stamp

View File

@ -43,5 +43,5 @@ function(ExternalCMakeProject target url hash basedir cmakedir cmakefile)
"${CMAKE_BINARY_DIR}/_deps/${target}-src/${cmakedir}/CMakeLists.txt") "${CMAKE_BINARY_DIR}/_deps/${target}-src/${cmakedir}/CMakeLists.txt")
endif() endif()
add_subdirectory("${CMAKE_BINARY_DIR}/_deps/${target}-src/${cmakedir}" add_subdirectory("${CMAKE_BINARY_DIR}/_deps/${target}-src/${cmakedir}"
"${CMAKE_BINARY_DIR}/_deps/${target}-build") "${CMAKE_BINARY_DIR}/_deps/${target}-build" EXCLUDE_FROM_ALL)
endfunction(ExternalCMakeProject) endfunction(ExternalCMakeProject)

View File

@ -1,5 +1,10 @@
# Find clang-format # Find clang-format
find_program(ClangFormat_EXECUTABLE NAMES clang-format find_program(ClangFormat_EXECUTABLE NAMES clang-format
clang-format-20.0
clang-format-19.0
clang-format-18.0
clang-format-17.0
clang-format-16.0
clang-format-15.0 clang-format-15.0
clang-format-14.0 clang-format-14.0
clang-format-13.0 clang-format-13.0
@ -19,7 +24,7 @@ if(ClangFormat_EXECUTABLE)
OUTPUT_VARIABLE clang_format_version OUTPUT_VARIABLE clang_format_version
ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE) 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: # Arch Linux output:
# clang-format version 10.0.0 # clang-format version 10.0.0
# #
@ -32,9 +37,15 @@ if(ClangFormat_EXECUTABLE)
# Ubuntu 22.04 LTS output: # Ubuntu 22.04 LTS output:
# Ubuntu clang-format version 14.0.0-1ubuntu1 # 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: # Fedora 36 output:
# clang-format version 14.0.5 (Fedora 14.0.5-1.fc36) # 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" "\\2"
ClangFormat_VERSION ClangFormat_VERSION
"${clang_format_version}") "${clang_format_version}")

View File

@ -7,15 +7,7 @@
# adapted from https://github.com/cmarshall108/cython-cmake-example/blob/master/cmake/FindCython.cmake # adapted from https://github.com/cmarshall108/cython-cmake-example/blob/master/cmake/FindCython.cmake
#============================================================================= #=============================================================================
if(CMAKE_VERSION VERSION_LESS 3.12) find_package(Python 3.6 COMPONENTS Interpreter QUIET)
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 # Use the Cython executable that lives next to the Python executable
# if it is a local installation. # if it is a local installation.

View File

@ -0,0 +1,29 @@
# Find sphinx-build
find_program(Sphinx_EXECUTABLE NAMES sphinx-build
PATH_SUFFIXES bin
DOC "Sphinx documenation build executable")
mark_as_advanced(Sphinx_EXECUTABLE)
if(Sphinx_EXECUTABLE)
execute_process(COMMAND ${Sphinx_EXECUTABLE} --version
OUTPUT_VARIABLE sphinx_version
OUTPUT_STRIP_TRAILING_WHITESPACE
RESULT_VARIABLE _sphinx_version_result)
if(_sphinx_version_result)
message(WARNING "Unable to determine sphinx-build verison: ${_sphinx_version_result}")
else()
string(REGEX REPLACE "sphinx-build ([0-9.]+).*"
"\\1"
Sphinx_VERSION
"${sphinx_version}")
endif()
if(NOT TARGET Sphinx::sphinx-build)
add_executable(Sphinx::sphinx-build IMPORTED GLOBAL)
set_target_properties(Sphinx::sphinx-build PROPERTIES IMPORTED_LOCATION "${Sphinx_EXECUTABLE}")
endif()
endif()
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Sphinx REQUIRED_VARS Sphinx_EXECUTABLE VERSION_VAR Sphinx_VERSION)

View File

@ -21,9 +21,9 @@ if(VORO_FOUND)
set(VORO_LIBRARIES ${VORO_LIBRARY}) set(VORO_LIBRARIES ${VORO_LIBRARY})
set(VORO_INCLUDE_DIRS ${VORO_INCLUDE_DIR}) set(VORO_INCLUDE_DIRS ${VORO_INCLUDE_DIR})
if(NOT TARGET VORO::VORO) if(NOT TARGET VORO::voro++)
add_library(VORO::VORO UNKNOWN IMPORTED) add_library(VORO::voro++ UNKNOWN IMPORTED)
set_target_properties(VORO::VORO PROPERTIES set_target_properties(VORO::voro++ PROPERTIES
IMPORTED_LOCATION "${VORO_LIBRARY}" IMPORTED_LOCATION "${VORO_LIBRARY}"
INTERFACE_INCLUDE_DIRECTORIES "${VORO_INCLUDE_DIR}") INTERFACE_INCLUDE_DIRECTORIES "${VORO_INCLUDE_DIR}")
endif() endif()

View File

@ -28,9 +28,8 @@ if(MSVC)
add_compile_options(/Zc:__cplusplus) add_compile_options(/Zc:__cplusplus)
add_compile_options(/wd4244) add_compile_options(/wd4244)
add_compile_options(/wd4267) add_compile_options(/wd4267)
if(LAMMPS_EXCEPTIONS) add_compile_options(/wd4250)
add_compile_options(/EHsc) add_compile_options(/EHsc)
endif()
endif() endif()
add_compile_definitions(_CRT_SECURE_NO_WARNINGS) add_compile_definitions(_CRT_SECURE_NO_WARNINGS)
endif() endif()
@ -65,7 +64,7 @@ endfunction(validate_option)
# helper function for getting the most recently modified file or folder from a glob pattern # helper function for getting the most recently modified file or folder from a glob pattern
function(get_newest_file path variable) 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(_besttime 2000-01-01T00:00:00)
set(_bestfile "<unknown>") set(_bestfile "<unknown>")
foreach(_dir ${_dirs}) foreach(_dir ${_dirs})

View File

@ -32,7 +32,13 @@ function(check_omp_h_include)
set(CMAKE_REQUIRED_INCLUDES ${OpenMP_CXX_INCLUDE_DIRS}) set(CMAKE_REQUIRED_INCLUDES ${OpenMP_CXX_INCLUDE_DIRS})
set(CMAKE_REQUIRED_LINK_OPTIONS ${OpenMP_CXX_FLAGS}) set(CMAKE_REQUIRED_LINK_OPTIONS ${OpenMP_CXX_FLAGS})
set(CMAKE_REQUIRED_LIBRARIES ${OpenMP_CXX_LIBRARIES}) set(CMAKE_REQUIRED_LIBRARIES ${OpenMP_CXX_LIBRARIES})
check_include_file_cxx(omp.h _have_omp_h) # there are all kinds of problems with finding omp.h
# for Clang and derived compilers so we pretend it is there.
if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
set(_have_omp_h TRUE)
else()
check_include_file_cxx(omp.h _have_omp_h)
endif()
else() else()
set(_have_omp_h FALSE) set(_have_omp_h FALSE)
endif() endif()
@ -41,7 +47,7 @@ endfunction()
# helper function for getting the most recently modified file or folder from a glob pattern # helper function for getting the most recently modified file or folder from a glob pattern
function(get_newest_file path variable) 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(_besttime 2000-01-01T00:00:00)
set(_bestfile "<unknown>") set(_bestfile "<unknown>")
foreach(_dir ${_dirs}) foreach(_dir ${_dirs})
@ -80,20 +86,20 @@ endfunction()
function(check_for_autogen_files source_dir) function(check_for_autogen_files source_dir)
message(STATUS "Running check for auto-generated files from make-based build system") 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_FILES CONFIGURE_DEPENDS ${source_dir}/style_*.h)
file(GLOB SRC_AUTOGEN_PACKAGES ${CONFIGURE_DEPENDS} ${source_dir}/packages_*.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}/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}) foreach(_SRC ${SRC_AUTOGEN_FILES})
get_filename_component(FILENAME "${_SRC}" NAME) get_filename_component(FILENAME "${_SRC}" NAME)
if(EXISTS ${source_dir}/${FILENAME}) if(EXISTS ${source_dir}/${FILENAME})
message(FATAL_ERROR "\n########################################################################\n" 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" "\n"
"Please run\n" "Please run\n"
"make -C ${source_dir} purge\n" "make -C ${source_dir} purge\n"
"to remove\n" "to remove\n"
"########################################################################") "########################################################################")
endif() endif()
endforeach() endforeach()
endfunction() endfunction()

View File

@ -1,6 +1,6 @@
message(STATUS "Downloading and building OpenCL loader library") message(STATUS "Downloading and building OpenCL loader library")
set(OPENCL_LOADER_URL "${LAMMPS_THIRDPARTY_URL}/opencl-loader-2022.01.04.tar.gz" CACHE STRING "URL for OpenCL loader tarball") set(OPENCL_LOADER_URL "${LAMMPS_THIRDPARTY_URL}/opencl-loader-2024.05.09.tar.gz" CACHE STRING "URL for OpenCL loader tarball")
set(OPENCL_LOADER_MD5 "8d3a801e87a2c6653bf0e27707063914" CACHE STRING "MD5 checksum of OpenCL loader tarball") set(OPENCL_LOADER_MD5 "e7796826b21c059224fabe997e0f2075" CACHE STRING "MD5 checksum of OpenCL loader tarball")
mark_as_advanced(OPENCL_LOADER_URL) mark_as_advanced(OPENCL_LOADER_URL)
mark_as_advanced(OPENCL_LOADER_MD5) mark_as_advanced(OPENCL_LOADER_MD5)
@ -8,4 +8,3 @@ set(INSTALL_LIBOPENCL OFF CACHE BOOL "" FORCE)
include(ExternalCMakeProject) include(ExternalCMakeProject)
ExternalCMakeProject(opencl_loader ${OPENCL_LOADER_URL} ${OPENCL_LOADER_MD5} opencl-loader . "") ExternalCMakeProject(opencl_loader ${OPENCL_LOADER_URL} ${OPENCL_LOADER_MD5} opencl-loader . "")
add_library(OpenCL::OpenCL ALIAS OpenCL)

View File

@ -1,6 +1,6 @@
set(COLVARS_SOURCE_DIR ${LAMMPS_LIB_SOURCE_DIR}/colvars) 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) option(COLVARS_DEBUG "Enable debugging messages for Colvars (quite verbose)" OFF)
@ -24,6 +24,12 @@ target_include_directories(colvars PUBLIC ${LAMMPS_LIB_SOURCE_DIR}/colvars)
target_include_directories(colvars PRIVATE ${LAMMPS_SOURCE_DIR}) target_include_directories(colvars PRIVATE ${LAMMPS_SOURCE_DIR})
target_link_libraries(lammps PRIVATE colvars) target_link_libraries(lammps PRIVATE colvars)
if(BUILD_OMP)
# Enable OpenMP for Colvars as well
target_compile_options(colvars PRIVATE ${OpenMP_CXX_FLAGS})
target_link_libraries(colvars PRIVATE OpenMP::OpenMP_CXX)
endif()
if(COLVARS_DEBUG) if(COLVARS_DEBUG)
# Need to export the define publicly to be valid in interface code # Need to export the define publicly to be valid in interface code
target_compile_definitions(colvars PUBLIC -DCOLVARS_DEBUG) target_compile_definitions(colvars PUBLIC -DCOLVARS_DEBUG)

View File

@ -0,0 +1,9 @@
# pair style dpd/coul/slater/long may only be installed if also KSPACE is installed
if(NOT PKG_KSPACE)
get_property(LAMMPS_PAIR_HEADERS GLOBAL PROPERTY PAIR)
list(REMOVE_ITEM LAMMPS_PAIR_HEADERS ${LAMMPS_SOURCE_DIR}/DPD-BASIC/pair_dpd_coul_slater_long.h)
set_property(GLOBAL PROPERTY PAIR "${LAMMPS_PAIR_HEADERS}")
get_target_property(LAMMPS_SOURCES lammps SOURCES)
list(REMOVE_ITEM LAMMPS_SOURCES ${LAMMPS_SOURCE_DIR}/DPD-BASIC/pair_dpd_coul_slater_long.cpp)
set_property(TARGET lammps PROPERTY SOURCES "${LAMMPS_SOURCES}")
endif()

View File

@ -0,0 +1,10 @@
# the geturl command needs libcurl
find_package(CURL QUIET COMPONENTS HTTP HTTPS)
option(WITH_CURL "Enable libcurl support" ${CURL_FOUND})
if(WITH_CURL)
find_package(CURL REQUIRED COMPONENTS HTTP HTTPS)
target_compile_definitions(lammps PRIVATE -DLAMMPS_CURL)
target_link_libraries(lammps PRIVATE CURL::libcurl)
endif()

View File

@ -1,3 +1,10 @@
# Silence CMake warnings about FindCUDA being obsolete.
# We may need to eventually rewrite this section to use enable_language(CUDA)
if(POLICY CMP0146)
cmake_policy(SET CMP0146 OLD)
endif()
set(GPU_SOURCES_DIR ${LAMMPS_SOURCE_DIR}/GPU) set(GPU_SOURCES_DIR ${LAMMPS_SOURCE_DIR}/GPU)
set(GPU_SOURCES ${GPU_SOURCES_DIR}/gpu_extra.h set(GPU_SOURCES ${GPU_SOURCES_DIR}/gpu_extra.h
${GPU_SOURCES_DIR}/fix_gpu.h ${GPU_SOURCES_DIR}/fix_gpu.h
@ -39,7 +46,7 @@ if (PKG_AMOEBA)
${GPU_SOURCES_DIR}/amoeba_convolution_gpu.cpp) ${GPU_SOURCES_DIR}/amoeba_convolution_gpu.cpp)
endif() 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) file(MAKE_DIRECTORY ${LAMMPS_LIB_BINARY_DIR}/gpu)
if(GPU_API STREQUAL "CUDA") if(GPU_API STREQUAL "CUDA")
@ -64,11 +71,13 @@ if(GPU_API STREQUAL "CUDA")
endif() endif()
set(GPU_CUDA_MPS_FLAGS "-DCUDA_MPS_SUPPORT") set(GPU_CUDA_MPS_FLAGS "-DCUDA_MPS_SUPPORT")
endif() 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)") 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 # 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) if(GPU_LIB_OLD_CUBIN_HEADERS)
message(FATAL_ERROR "########################################################################\n" message(FATAL_ERROR "########################################################################\n"
"Found file(s) generated by the make-based build system in lib/gpu\n" "Found file(s) generated by the make-based build system in lib/gpu\n"
@ -78,79 +87,81 @@ if(GPU_API STREQUAL "CUDA")
"########################################################################") "########################################################################")
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) 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) cuda_include_directories(${LAMMPS_LIB_SOURCE_DIR}/gpu ${LAMMPS_LIB_BINARY_DIR}/gpu)
if(CUDPP_OPT) if(CUDPP_OPT)
cuda_include_directories(${LAMMPS_LIB_SOURCE_DIR}/gpu/cudpp_mini) 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_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_CU CONFIGURE_DEPENDS ${LAMMPS_LIB_SOURCE_DIR}/gpu/cudpp_mini/[^.]*.cu)
endif() endif()
# build arch/gencode commands for nvcc based on CUDA toolkit version and use choice # 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 # --arch translates directly instead of JIT, so this should be for the preferred or most common architecture
set(GPU_CUDA_GENCODE "-arch=${GPU_ARCH}") set(GPU_CUDA_GENCODE "-arch=${GPU_ARCH}")
# apply the following to build "fat" CUDA binaries only for known CUDA toolkits since version 8.0 if(CUDA_BUILD_MULTIARCH)
# only the Kepler achitecture and beyond is supported # apply the following to build "fat" CUDA binaries only for known CUDA toolkits since version 8.0
# comparison chart according to: https://en.wikipedia.org/wiki/CUDA#GPUs_supported # only the Kepler achitecture and beyond is supported
if(CUDA_VERSION VERSION_LESS 8.0) # comparison chart according to: https://en.wikipedia.org/wiki/CUDA#GPUs_supported
message(FATAL_ERROR "CUDA Toolkit version 8.0 or later is required") if(CUDA_VERSION VERSION_LESS 8.0)
elseif(CUDA_VERSION VERSION_GREATER_EQUAL "13.0") message(FATAL_ERROR "CUDA Toolkit version 8.0 or later is required")
message(WARNING "Untested CUDA Toolkit version ${CUDA_VERSION}. Use at your own risk") elseif(CUDA_VERSION VERSION_GREATER_EQUAL "13.0")
set(GPU_CUDA_GENCODE "-arch=all") message(WARNING "Untested CUDA Toolkit version ${CUDA_VERSION}. Use at your own risk")
elseif(CUDA_VERSION VERSION_GREATER_EQUAL "12.0") set(GPU_CUDA_GENCODE "-arch=all")
set(GPU_CUDA_GENCODE "-arch=all") elseif(CUDA_VERSION VERSION_GREATER_EQUAL "12.0")
else() set(GPU_CUDA_GENCODE "-arch=all")
# Kepler (GPU Arch 3.0) is supported by CUDA 5 to CUDA 10.2 else()
if((CUDA_VERSION VERSION_GREATER_EQUAL "5.0") AND (CUDA_VERSION VERSION_LESS "11.0")) # Kepler (GPU Arch 3.0) is supported by CUDA 5 to CUDA 10.2
string(APPEND GPU_CUDA_GENCODE " -gencode arch=compute_30,code=[sm_30,compute_30] ") if((CUDA_VERSION VERSION_GREATER_EQUAL "5.0") AND (CUDA_VERSION VERSION_LESS "11.0"))
endif() string(APPEND GPU_CUDA_GENCODE " -gencode arch=compute_30,code=[sm_30,compute_30] ")
# Kepler (GPU Arch 3.5) is supported by CUDA 5 to CUDA 11 endif()
if((CUDA_VERSION VERSION_GREATER_EQUAL "5.0") AND (CUDA_VERSION VERSION_LESS "12.0")) # Kepler (GPU Arch 3.5) is supported by CUDA 5 to CUDA 11
string(APPEND GPU_CUDA_GENCODE " -gencode arch=compute_35,code=[sm_35,compute_35]") if((CUDA_VERSION VERSION_GREATER_EQUAL "5.0") AND (CUDA_VERSION VERSION_LESS "12.0"))
endif() string(APPEND GPU_CUDA_GENCODE " -gencode arch=compute_35,code=[sm_35,compute_35]")
# Maxwell (GPU Arch 5.x) is supported by CUDA 6 and later endif()
if(CUDA_VERSION VERSION_GREATER_EQUAL "6.0") # Maxwell (GPU Arch 5.x) is supported by CUDA 6 and later
string(APPEND GPU_CUDA_GENCODE " -gencode arch=compute_50,code=[sm_50,compute_50] -gencode arch=compute_52,code=[sm_52,compute_52]") if(CUDA_VERSION VERSION_GREATER_EQUAL "6.0")
endif() string(APPEND GPU_CUDA_GENCODE " -gencode arch=compute_50,code=[sm_50,compute_50] -gencode arch=compute_52,code=[sm_52,compute_52]")
# Pascal (GPU Arch 6.x) is supported by CUDA 8 and later endif()
if(CUDA_VERSION VERSION_GREATER_EQUAL "8.0") # Pascal (GPU Arch 6.x) is supported by CUDA 8 and later
string(APPEND GPU_CUDA_GENCODE " -gencode arch=compute_60,code=[sm_60,compute_60] -gencode arch=compute_61,code=[sm_61,compute_61]") if(CUDA_VERSION VERSION_GREATER_EQUAL "8.0")
endif() string(APPEND GPU_CUDA_GENCODE " -gencode arch=compute_60,code=[sm_60,compute_60] -gencode arch=compute_61,code=[sm_61,compute_61]")
# Volta (GPU Arch 7.0) is supported by CUDA 9 and later endif()
if(CUDA_VERSION VERSION_GREATER_EQUAL "9.0") # Volta (GPU Arch 7.0) is supported by CUDA 9 and later
string(APPEND GPU_CUDA_GENCODE " -gencode arch=compute_70,code=[sm_70,compute_70]") if(CUDA_VERSION VERSION_GREATER_EQUAL "9.0")
endif() string(APPEND GPU_CUDA_GENCODE " -gencode arch=compute_70,code=[sm_70,compute_70]")
# Turing (GPU Arch 7.5) is supported by CUDA 10 and later endif()
if(CUDA_VERSION VERSION_GREATER_EQUAL "10.0") # Turing (GPU Arch 7.5) is supported by CUDA 10 and later
string(APPEND GPU_CUDA_GENCODE " -gencode arch=compute_75,code=[sm_75,compute_75]") if(CUDA_VERSION VERSION_GREATER_EQUAL "10.0")
endif() string(APPEND GPU_CUDA_GENCODE " -gencode arch=compute_75,code=[sm_75,compute_75]")
# Ampere (GPU Arch 8.0) is supported by CUDA 11 and later endif()
if(CUDA_VERSION VERSION_GREATER_EQUAL "11.0") # Ampere (GPU Arch 8.0) is supported by CUDA 11 and later
string(APPEND GPU_CUDA_GENCODE " -gencode arch=compute_80,code=[sm_80,compute_80]") if(CUDA_VERSION VERSION_GREATER_EQUAL "11.0")
endif() string(APPEND GPU_CUDA_GENCODE " -gencode arch=compute_80,code=[sm_80,compute_80]")
# Ampere (GPU Arch 8.6) is supported by CUDA 11.1 and later endif()
if(CUDA_VERSION VERSION_GREATER_EQUAL "11.1") # Ampere (GPU Arch 8.6) is supported by CUDA 11.1 and later
string(APPEND GPU_CUDA_GENCODE " -gencode arch=compute_86,code=[sm_86,compute_86]") if(CUDA_VERSION VERSION_GREATER_EQUAL "11.1")
endif() string(APPEND GPU_CUDA_GENCODE " -gencode arch=compute_86,code=[sm_86,compute_86]")
# Lovelace (GPU Arch 8.9) is supported by CUDA 11.8 and later endif()
if(CUDA_VERSION VERSION_GREATER_EQUAL "11.8") # Lovelace (GPU Arch 8.9) is supported by CUDA 11.8 and later
string(APPEND GPU_CUDA_GENCODE " -gencode arch=compute_90,code=[sm_90,compute_90]") if(CUDA_VERSION VERSION_GREATER_EQUAL "11.8")
endif() string(APPEND GPU_CUDA_GENCODE " -gencode arch=compute_90,code=[sm_90,compute_90]")
# Hopper (GPU Arch 9.0) is supported by CUDA 12.0 and later endif()
if(CUDA_VERSION VERSION_GREATER_EQUAL "12.0") # Hopper (GPU Arch 9.0) is supported by CUDA 12.0 and later
string(APPEND GPU_CUDA_GENCODE " -gencode arch=compute_90,code=[sm_90,compute_90]") if(CUDA_VERSION VERSION_GREATER_EQUAL "12.0")
string(APPEND GPU_CUDA_GENCODE " -gencode arch=compute_90,code=[sm_90,compute_90]")
endif()
endif() endif()
endif() endif()
cuda_compile_fatbin(GPU_GEN_OBJS ${GPU_LIB_CU} OPTIONS ${CUDA_REQUEST_PIC} 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}) -DUNIX -O3 --use_fast_math -Wno-deprecated-gpu-targets -allow-unsupported-compiler -DNV_KERNEL -DUCL_CUDADR ${GPU_CUDA_GENCODE} -D_${GPU_PREC_SETTING} -DLAMMPS_${LAMMPS_SIZES})
cuda_compile(GPU_OBJS ${GPU_LIB_CUDPP_CU} OPTIONS ${CUDA_REQUEST_PIC} cuda_compile(GPU_OBJS ${GPU_LIB_CUDPP_CU} OPTIONS ${CUDA_REQUEST_PIC}
-DUNIX -O3 --use_fast_math -Wno-deprecated-gpu-targets -DUCL_CUDADR ${GPU_CUDA_GENCODE} -D_${GPU_PREC_SETTING} -DLAMMPS_${LAMMPS_SIZES}) -DUNIX -O3 --use_fast_math -Wno-deprecated-gpu-targets -allow-unsupported-compiler -DUCL_CUDADR ${GPU_CUDA_GENCODE} -D_${GPU_PREC_SETTING} -DLAMMPS_${LAMMPS_SIZES})
foreach(CU_OBJ ${GPU_GEN_OBJS}) foreach(CU_OBJ ${GPU_GEN_OBJS})
get_filename_component(CU_NAME ${CU_OBJ} NAME_WE) get_filename_component(CU_NAME ${CU_OBJ} NAME_WE)
@ -201,7 +212,7 @@ elseif(GPU_API STREQUAL "OPENCL")
include(OpenCLUtils) include(OpenCLUtils)
set(OCL_COMMON_HEADERS ${LAMMPS_LIB_SOURCE_DIR}/gpu/lal_preprocessor.h ${LAMMPS_LIB_SOURCE_DIR}/gpu/lal_aux_fun1.h) 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 list(REMOVE_ITEM GPU_LIB_CU
${LAMMPS_LIB_SOURCE_DIR}/gpu/lal_gayberne.cu ${LAMMPS_LIB_SOURCE_DIR}/gpu/lal_gayberne.cu
${LAMMPS_LIB_SOURCE_DIR}/gpu/lal_gayberne_lj.cu ${LAMMPS_LIB_SOURCE_DIR}/gpu/lal_gayberne_lj.cu
@ -331,7 +342,7 @@ elseif(GPU_API STREQUAL "HIP")
endif() endif()
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) list(REMOVE_ITEM GPU_LIB_CU ${LAMMPS_LIB_SOURCE_DIR}/gpu/lal_pppm.cu)
set(GPU_LIB_CU_HIP "") set(GPU_LIB_CU_HIP "")

View File

@ -3,7 +3,7 @@ enable_language(C)
# we don't use the parallel i/o interface. # we don't use the parallel i/o interface.
set(HDF5_PREFER_PARALLEL FALSE) set(HDF5_PREFER_PARALLEL FALSE)
find_package(HDF5 REQUIRED) find_package(HDF5 COMPONENTS C REQUIRED)
# parallel HDF5 will import incompatible MPI headers with a serial build # parallel HDF5 will import incompatible MPI headers with a serial build
if((NOT BUILD_MPI) AND HDF5_IS_PARALLEL) if((NOT BUILD_MPI) AND HDF5_IS_PARALLEL)

View File

@ -111,6 +111,9 @@ if(PKG_KSPACE)
list(APPEND INTEL_SOURCES ${INTEL_SOURCES_DIR}/verlet_lrt_intel.cpp) list(APPEND INTEL_SOURCES ${INTEL_SOURCES_DIR}/verlet_lrt_intel.cpp)
RegisterIntegrateStyle(${INTEL_SOURCES_DIR}/verlet_lrt_intel.h) RegisterIntegrateStyle(${INTEL_SOURCES_DIR}/verlet_lrt_intel.h)
endif() endif()
if(PKG_ML-SNAP)
list(APPEND INTEL_SOURCES ${INTEL_SOURCES_DIR}/sna_intel.cpp)
endif()
target_sources(lammps PRIVATE ${INTEL_SOURCES}) target_sources(lammps PRIVATE ${INTEL_SOURCES})
target_include_directories(lammps PRIVATE ${INTEL_SOURCES_DIR}) target_include_directories(lammps PRIVATE ${INTEL_SOURCES_DIR})

View File

@ -1,12 +1,7 @@
set(KIM-API_MIN_VERSION 2.1.3) set(KIM-API_MIN_VERSION 2.1.3)
find_package(CURL) find_package(CURL)
if(CURL_FOUND) if(CURL_FOUND)
if(CMAKE_VERSION VERSION_LESS 3.12) target_link_libraries(lammps PRIVATE CURL::libcurl)
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) 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.") 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) mark_as_advanced(LMP_DEBUG_CURL)

View File

@ -1,25 +1,46 @@
######################################################################## ########################################################################
# As of version 3.3.0 Kokkos requires C++14 # As of version 4.0.0 Kokkos requires C++17
if(CMAKE_CXX_STANDARD LESS 14) if(CMAKE_CXX_STANDARD LESS 17)
message(FATAL_ERROR "The KOKKOS package requires the C++ standard to be set to at least C++14") message(FATAL_ERROR "The KOKKOS package requires the C++ standard to
be set to at least C++17")
endif() endif()
######################################################################## ########################################################################
# consistency checks and Kokkos options/settings required by LAMMPS # consistency checks and Kokkos options/settings required by LAMMPS
if(Kokkos_ENABLE_CUDA) if(Kokkos_ENABLE_CUDA)
message(STATUS "KOKKOS: Enabling CUDA LAMBDA function support") option(Kokkos_ENABLE_IMPL_CUDA_MALLOC_ASYNC "CUDA asynchronous malloc support" OFF)
set(Kokkos_ENABLE_CUDA_LAMBDA ON CACHE BOOL "" FORCE) mark_as_advanced(Kokkos_ENABLE_IMPL_CUDA_MALLOC_ASYNC)
if(Kokkos_ENABLE_IMPL_CUDA_MALLOC_ASYNC)
message(STATUS "KOKKOS: CUDA malloc async support enabled")
else()
message(STATUS "KOKKOS: CUDA malloc async support disabled")
endif()
endif()
if(Kokkos_ENABLE_HIP)
option(Kokkos_ENABLE_HIP_MULTIPLE_KERNEL_INSTANTIATIONS "Enable multiple kernel instantiations with HIP" ON)
mark_as_advanced(Kokkos_ENABLE_HIP_MULTIPLE_KERNEL_INSTANTIATIONS)
option(Kokkos_ENABLE_ROCTHRUST "Use RoCThrust library" ON)
mark_as_advanced(Kokkos_ENABLE_ROCTHRUST)
if(Kokkos_ARCH_AMD_GFX942 OR Kokkos_ARCH_AMD_GFX940)
option(Kokkos_ENABLE_IMPL_HIP_UNIFIED_MEMORY "Enable unified memory with HIP" ON)
mark_as_advanced(Kokkos_ENABLE_IMPL_HIP_UNIFIED_MEMORY)
endif()
endif() endif()
# Adding OpenMP compiler flags without the checks done for # Adding OpenMP compiler flags without the checks done for
# BUILD_OMP can result in compile failures. Enforce consistency. # BUILD_OMP can result in compile failures. Enforce consistency.
if(Kokkos_ENABLE_OPENMP) if(Kokkos_ENABLE_OPENMP)
if(NOT BUILD_OMP) if(NOT BUILD_OMP)
message(FATAL_ERROR "Must enable BUILD_OMP with Kokkos_ENABLE_OPENMP") message(FATAL_ERROR "Must enable BUILD_OMP with Kokkos_ENABLE_OPENMP")
else() endif()
# NVHPC/(AMD)Clang does not seem to provide a detectable OpenMP version, but is far beyond version 3.1 endif()
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") if(Kokkos_ENABLE_SERIAL)
endif() if(NOT (Kokkos_ENABLE_OPENMP OR Kokkos_ENABLE_THREADS OR
Kokkos_ENABLE_CUDA OR Kokkos_ENABLE_HIP OR Kokkos_ENABLE_SYCL
OR Kokkos_ENABLE_OPENMPTARGET))
option(Kokkos_ENABLE_ATOMICS_BYPASS "Disable atomics for Kokkos Serial Backend" ON)
mark_as_advanced(Kokkos_ENABLE_ATOMICS_BYPASS)
endif() endif()
endif() endif()
######################################################################## ########################################################################
@ -49,8 +70,8 @@ if(DOWNLOAD_KOKKOS)
list(APPEND KOKKOS_LIB_BUILD_ARGS "-DCMAKE_CXX_EXTENSIONS=${CMAKE_CXX_EXTENSIONS}") list(APPEND KOKKOS_LIB_BUILD_ARGS "-DCMAKE_CXX_EXTENSIONS=${CMAKE_CXX_EXTENSIONS}")
list(APPEND KOKKOS_LIB_BUILD_ARGS "-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}") list(APPEND KOKKOS_LIB_BUILD_ARGS "-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}")
include(ExternalProject) include(ExternalProject)
set(KOKKOS_URL "https://github.com/kokkos/kokkos/archive/3.7.02.tar.gz" CACHE STRING "URL for KOKKOS tarball") set(KOKKOS_URL "https://github.com/kokkos/kokkos/archive/4.4.01.tar.gz" CACHE STRING "URL for KOKKOS tarball")
set(KOKKOS_MD5 "34d7860d548c06a4040236d959c9f99a" CACHE STRING "MD5 checksum of KOKKOS tarball") set(KOKKOS_MD5 "de6ee80d00b6212b02bfb7f1e71a8392" CACHE STRING "MD5 checksum of KOKKOS tarball")
mark_as_advanced(KOKKOS_URL) mark_as_advanced(KOKKOS_URL)
mark_as_advanced(KOKKOS_MD5) mark_as_advanced(KOKKOS_MD5)
GetFallbackURL(KOKKOS_URL KOKKOS_FALLBACK) GetFallbackURL(KOKKOS_URL KOKKOS_FALLBACK)
@ -75,7 +96,7 @@ if(DOWNLOAD_KOKKOS)
add_dependencies(LAMMPS::KOKKOSCORE kokkos_build) add_dependencies(LAMMPS::KOKKOSCORE kokkos_build)
add_dependencies(LAMMPS::KOKKOSCONTAINERS kokkos_build) add_dependencies(LAMMPS::KOKKOSCONTAINERS kokkos_build)
elseif(EXTERNAL_KOKKOS) elseif(EXTERNAL_KOKKOS)
find_package(Kokkos 3.7.02 REQUIRED CONFIG) find_package(Kokkos 4.4.01 REQUIRED CONFIG)
target_link_libraries(lammps PRIVATE Kokkos::kokkos) target_link_libraries(lammps PRIVATE Kokkos::kokkos)
else() else()
set(LAMMPS_LIB_KOKKOS_SRC_DIR ${LAMMPS_LIB_SOURCE_DIR}/kokkos) set(LAMMPS_LIB_KOKKOS_SRC_DIR ${LAMMPS_LIB_SOURCE_DIR}/kokkos)
@ -109,6 +130,7 @@ set(KOKKOS_PKG_SOURCES ${KOKKOS_PKG_SOURCES_DIR}/kokkos.cpp
${KOKKOS_PKG_SOURCES_DIR}/atom_vec_kokkos.cpp ${KOKKOS_PKG_SOURCES_DIR}/atom_vec_kokkos.cpp
${KOKKOS_PKG_SOURCES_DIR}/comm_kokkos.cpp ${KOKKOS_PKG_SOURCES_DIR}/comm_kokkos.cpp
${KOKKOS_PKG_SOURCES_DIR}/comm_tiled_kokkos.cpp ${KOKKOS_PKG_SOURCES_DIR}/comm_tiled_kokkos.cpp
${KOKKOS_PKG_SOURCES_DIR}/group_kokkos.cpp
${KOKKOS_PKG_SOURCES_DIR}/min_kokkos.cpp ${KOKKOS_PKG_SOURCES_DIR}/min_kokkos.cpp
${KOKKOS_PKG_SOURCES_DIR}/min_linesearch_kokkos.cpp ${KOKKOS_PKG_SOURCES_DIR}/min_linesearch_kokkos.cpp
${KOKKOS_PKG_SOURCES_DIR}/neighbor_kokkos.cpp ${KOKKOS_PKG_SOURCES_DIR}/neighbor_kokkos.cpp
@ -130,19 +152,45 @@ if(PKG_KSPACE)
list(APPEND KOKKOS_PKG_SOURCES ${KOKKOS_PKG_SOURCES_DIR}/fft3d_kokkos.cpp list(APPEND KOKKOS_PKG_SOURCES ${KOKKOS_PKG_SOURCES_DIR}/fft3d_kokkos.cpp
${KOKKOS_PKG_SOURCES_DIR}/grid3d_kokkos.cpp ${KOKKOS_PKG_SOURCES_DIR}/grid3d_kokkos.cpp
${KOKKOS_PKG_SOURCES_DIR}/remap_kokkos.cpp) ${KOKKOS_PKG_SOURCES_DIR}/remap_kokkos.cpp)
set(FFT_KOKKOS "KISS" CACHE STRING "FFT library for Kokkos-enabled KSPACE package")
set(FFT_KOKKOS_VALUES KISS FFTW3 MKL NVPL HIPFFT CUFFT MKL_GPU)
set_property(CACHE FFT_KOKKOS PROPERTY STRINGS ${FFT_KOKKOS_VALUES})
validate_option(FFT_KOKKOS FFT_KOKKOS_VALUES)
string(TOUPPER ${FFT_KOKKOS} FFT_KOKKOS)
if(Kokkos_ENABLE_CUDA) if(Kokkos_ENABLE_CUDA)
if(NOT (FFT STREQUAL "KISS")) if(NOT ((FFT_KOKKOS STREQUAL "KISS") OR (FFT_KOKKOS STREQUAL "CUFFT")))
target_compile_definitions(lammps PRIVATE -DFFT_CUFFT) message(FATAL_ERROR "The CUDA backend of Kokkos requires either KISS FFT or CUFFT.")
target_link_libraries(lammps PRIVATE cufft) elseif(FFT_KOKKOS STREQUAL "KISS")
message(WARNING "Using KISS FFT with the CUDA backend of Kokkos may be sub-optimal.")
elseif(FFT_KOKKOS STREQUAL "CUFFT")
find_package(CUDAToolkit REQUIRED)
target_link_libraries(lammps PRIVATE CUDA::cufft)
endif() endif()
elseif(Kokkos_ENABLE_HIP) elseif(Kokkos_ENABLE_HIP)
if(NOT (FFT STREQUAL "KISS")) if(NOT ((FFT_KOKKOS STREQUAL "KISS") OR (FFT_KOKKOS STREQUAL "HIPFFT")))
message(FATAL_ERROR "The HIP backend of Kokkos requires either KISS FFT or HIPFFT.")
elseif(FFT_KOKKOS STREQUAL "KISS")
message(WARNING "Using KISS FFT with the HIP backend of Kokkos may be sub-optimal.")
target_compile_definitions(lammps PRIVATE -DFFT_KOKKOS_KISS)
elseif(FFT_KOKKOS STREQUAL "HIPFFT")
include(DetectHIPInstallation) include(DetectHIPInstallation)
find_package(hipfft REQUIRED) find_package(hipfft REQUIRED)
target_compile_definitions(lammps PRIVATE -DFFT_HIPFFT)
target_link_libraries(lammps PRIVATE hip::hipfft) target_link_libraries(lammps PRIVATE hip::hipfft)
endif() endif()
elseif(FFT_KOKKOS STREQUAL "MKL_GPU")
if(NOT Kokkos_ENABLE_SYCL)
message(FATAL_ERROR "Using MKL_GPU FFT currently requires the SYCL backend of Kokkos.")
endif()
find_package(MKL REQUIRED)
target_link_libraries(lammps PRIVATE mkl_sycl_dft mkl_intel_ilp64 mkl_tbb_thread mkl_core tbb)
elseif(FFT_KOKKOS STREQUAL "MKL")
find_package(MKL REQUIRED)
elseif(FFT_KOKKOS STREQUAL "NVPL")
find_package(nvpl_fft REQUIRED)
target_link_libraries(lammps PRIVATE nvpl::fftw)
endif() endif()
target_compile_definitions(lammps PRIVATE -DFFT_KOKKOS_${FFT_KOKKOS})
endif() endif()
if(PKG_ML-IAP) if(PKG_ML-IAP)
@ -155,7 +203,7 @@ if(PKG_ML-IAP)
# Add KOKKOS version of ML-IAP Python coupling if non-KOKKOS version is included # Add KOKKOS version of ML-IAP Python coupling if non-KOKKOS version is included
if(MLIAP_ENABLE_PYTHON AND Cythonize_EXECUTABLE) 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}) foreach(MLIAP_CYTHON_FILE ${MLIAP_KOKKOS_CYTHON_SRC})
get_filename_component(MLIAP_CYTHON_BASE ${MLIAP_CYTHON_FILE} NAME_WE) 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 add_custom_command(OUTPUT ${MLIAP_BINARY_DIR}/${MLIAP_CYTHON_BASE}.cpp ${MLIAP_BINARY_DIR}/${MLIAP_CYTHON_BASE}.h

View File

@ -10,7 +10,7 @@ if(${FFTW}_FOUND)
else() else()
set(FFT "KISS" CACHE STRING "FFT library for KSPACE package") set(FFT "KISS" CACHE STRING "FFT library for KSPACE package")
endif() endif()
set(FFT_VALUES KISS FFTW3 MKL) set(FFT_VALUES KISS FFTW3 MKL NVPL)
set_property(CACHE FFT PROPERTY STRINGS ${FFT_VALUES}) set_property(CACHE FFT PROPERTY STRINGS ${FFT_VALUES})
validate_option(FFT FFT_VALUES) validate_option(FFT FFT_VALUES)
string(TOUPPER ${FFT} FFT) string(TOUPPER ${FFT} FFT)
@ -41,11 +41,70 @@ elseif(FFT STREQUAL "MKL")
target_compile_definitions(lammps PRIVATE -DFFT_MKL_THREADS) target_compile_definitions(lammps PRIVATE -DFFT_MKL_THREADS)
endif() endif()
target_link_libraries(lammps PRIVATE MKL::MKL) target_link_libraries(lammps PRIVATE MKL::MKL)
elseif(FFT STREQUAL "NVPL")
find_package(nvpl_fft REQUIRED)
target_compile_definitions(lammps PRIVATE -DFFT_NVPL)
target_link_libraries(lammps PRIVATE nvpl::fftw)
else() else()
# last option is KISSFFT # last option is KISSFFT
target_compile_definitions(lammps PRIVATE -DFFT_KISS) target_compile_definitions(lammps PRIVATE -DFFT_KISS)
endif() endif()
option(FFT_USE_HEFFTE "Use heFFTe as the distributed FFT engine, overrides the FFT option." OFF)
if(FFT_USE_HEFFTE)
# if FFT_HEFFTE is enabled, use the heFFTe parallel engine instead of the builtin fftMPI engine
# map standard FFT choices to available heFFTe backends: FFTW3 -> FFTW, KISS -> BUILTIN
set(FFT_HEFFTE_BACKEND_VALUES FFTW MKL BUILTIN)
string(REPLACE FFTW3 FFTW FFT_HEFFTE_BACKEND_DEFAULT ${FFT})
string(REPLACE KISS BUILTIN FFT_HEFFTE_BACKEND_DEFAULT ${FFT_HEFFTE_BACKEND_DEFAULT})
set(FFT_HEFFTE_BACKEND "${FFT_HEFFTE_BACKEND_DEFAULT}" CACHE STRING "Select heFFTe backend, e.g., FFTW or MKL")
set_property(CACHE FFT_HEFFTE_BACKEND PROPERTY STRINGS ${FFT_HEFFTE_BACKEND_VALUES})
validate_option(FFT_HEFFTE_BACKEND FFT_HEFFTE_BACKEND_VALUES)
if(FFT_HEFFTE_BACKEND STREQUAL "FFTW") # respect the backend choice, FFTW or MKL
set(HEFFTE_COMPONENTS "FFTW")
set(Heffte_ENABLE_FFTW "ON" CACHE BOOL "Enables FFTW backend for heFFTe")
elseif(FFT_HEFFTE_BACKEND STREQUAL "MKL")
set(HEFFTE_COMPONENTS "MKL")
set(Heffte_ENABLE_MKL "ON" CACHE BOOL "Enables MKL backend for heFFTe")
else()
set(HEFFTE_COMPONENTS "BUILTIN")
message(WARNING "FFT_HEFFTE_BACKEND not selected, defaulting to the builtin 'stock' backend, which is intended for testing and is not optimized for production runs")
endif()
find_package(Heffte 2.4.0 QUIET COMPONENTS ${HEFFTE_COMPONENTS})
if (NOT Heffte_FOUND) # download and build
if(BUILD_SHARED_LIBS)
set(BUILD_SHARED_LIBS_WAS_ON YES)
set(BUILD_SHARED_LIBS OFF)
endif()
if(CMAKE_REQUEST_PIC)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
endif()
set(Heffte_ENABLE_${FFT_HEFFTE_BACKEND} ON)
include(FetchContent)
FetchContent_Declare(HEFFTE_PROJECT # using v2.4.0
URL "https://github.com/icl-utk-edu/heffte/archive/refs/tags/v2.4.0.tar.gz"
URL_HASH SHA256=02310fb4f9688df02f7181667e61c3adb7e38baf79611d80919d47452ff7881d
)
FetchContent_Populate(HEFFTE_PROJECT)
# fixup git hash to show "(unknown)" to avoid compilation failures.
file(READ ${heffte_project_SOURCE_DIR}/include/heffte_config.cmake.h HEFFTE_CFG_FILE_TEXT)
string(REPLACE "@Heffte_GIT_HASH@" "(unknown)" HEFFTE_CFG_FILE_TEXT "${HEFFTE_CFG_FILE_TEXT}")
file(WRITE ${heffte_project_SOURCE_DIR}/include/heffte_config.cmake.h "${HEFFTE_CFG_FILE_TEXT}")
add_subdirectory(${heffte_project_SOURCE_DIR} ${heffte_project_BINARY_DIR} EXCLUDE_FROM_ALL)
add_library(Heffte::Heffte ALIAS Heffte)
if(BUILD_SHARED_LIBS_WAS_ON)
set(BUILD_SHARED_LIBS ON)
endif()
endif()
target_compile_definitions(lammps PRIVATE -DFFT_HEFFTE "-DFFT_HEFFTE_${FFT_HEFFTE_BACKEND}")
target_link_libraries(lammps PRIVATE Heffte::Heffte)
endif()
set(FFT_PACK "array" CACHE STRING "Optimization for FFT") set(FFT_PACK "array" CACHE STRING "Optimization for FFT")
set(FFT_PACK_VALUES array pointer memcpy) set(FFT_PACK_VALUES array pointer memcpy)
set_property(CACHE FFT_PACK PROPERTY STRINGS ${FFT_PACK_VALUES}) set_property(CACHE FFT_PACK PROPERTY STRINGS ${FFT_PACK_VALUES})

View File

@ -4,7 +4,7 @@ if(LEPTON_SOURCE_DIR)
endif() endif()
set(LEPTON_SOURCE_DIR ${LAMMPS_LIB_SOURCE_DIR}/lepton) 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 if((CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "amd64") OR
(CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "AMD64") OR (CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "AMD64") OR
@ -15,7 +15,7 @@ else()
endif() endif()
if(LEPTON_ENABLE_JIT) 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() endif()
add_library(lepton STATIC ${LEPTON_SOURCES} ${ASMJIT_SOURCES}) 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) if(DOWNLOAD_MDI)
message(STATUS "MDI download requested - we will build our own") message(STATUS "MDI download requested - we will build our own")
set(MDI_URL "https://github.com/MolSSI-MDI/MDI_Library/archive/v1.4.16.tar.gz" CACHE STRING "URL for MDI tarball") set(MDI_URL "https://github.com/MolSSI-MDI/MDI_Library/archive/v1.4.26.tar.gz" CACHE STRING "URL for MDI tarball")
set(MDI_MD5 "407db44e2d79447ab5c1233af1965f65" CACHE STRING "MD5 checksum for MDI tarball") set(MDI_MD5 "3124bb85259471e2a53a891f04bf697a" CACHE STRING "MD5 checksum for MDI tarball")
mark_as_advanced(MDI_URL) mark_as_advanced(MDI_URL)
mark_as_advanced(MDI_MD5) mark_as_advanced(MDI_MD5)
GetFallbackURL(MDI_URL MDI_FALLBACK) GetFallbackURL(MDI_URL MDI_FALLBACK)
@ -26,29 +26,9 @@ if(DOWNLOAD_MDI)
# detect if we have python development support and thus can enable python plugins # detect if we have python development support and thus can enable python plugins
set(MDI_USE_PYTHON_PLUGINS OFF) set(MDI_USE_PYTHON_PLUGINS OFF)
if(CMAKE_VERSION VERSION_LESS 3.12) find_package(Python QUIET COMPONENTS Development)
if(NOT PYTHON_VERSION_STRING) if(Python_Development_FOUND)
set(Python_ADDITIONAL_VERSIONS 3.12 3.11 3.10 3.9 3.8 3.7 3.6) set(MDI_USE_PYTHON_PLUGINS ON)
# 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() endif()
# python plugins are not supported and thus must be always off on Windows # python plugins are not supported and thus must be always off on Windows
if(CMAKE_SYSTEM_NAME STREQUAL "Windows") if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
@ -102,13 +82,9 @@ if(DOWNLOAD_MDI)
# if compiling with python plugins we need # if compiling with python plugins we need
# to add python libraries as dependency. # to add python libraries as dependency.
if(MDI_USE_PYTHON_PLUGINS) if(MDI_USE_PYTHON_PLUGINS)
if(CMAKE_VERSION VERSION_LESS 3.12) list(APPEND MDI_DEP_LIBS Python::Python)
list(APPEND MDI_DEP_LIBS ${PYTHON_LIBRARIES})
else()
list(APPEND MDI_DEP_LIBS Python::Python)
endif()
endif() endif()
# need to add support for dlopen/dlsym, except when compiling for Windows. # need to add support for dlopen/dlsym, except when compiling for Windows.
if(NOT (CMAKE_SYSTEM_NAME STREQUAL "Windows")) if(NOT (CMAKE_SYSTEM_NAME STREQUAL "Windows"))
list(APPEND MDI_DEP_LIBS "${CMAKE_DL_LIBS}") list(APPEND MDI_DEP_LIBS "${CMAKE_DL_LIBS}")

View File

@ -2,12 +2,7 @@
set(MLIAP_ENABLE_PYTHON_DEFAULT OFF) set(MLIAP_ENABLE_PYTHON_DEFAULT OFF)
if(PKG_PYTHON) if(PKG_PYTHON)
find_package(Cythonize QUIET) find_package(Cythonize QUIET)
if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.14) find_package(Python COMPONENTS NumPy QUIET)
find_package(Python COMPONENTS NumPy QUIET)
else()
# assume we have NumPy
set(Python_NumPy_FOUND ON)
endif()
if(Cythonize_FOUND AND Python_NumPy_FOUND) if(Cythonize_FOUND AND Python_NumPy_FOUND)
set(MLIAP_ENABLE_PYTHON_DEFAULT ON) set(MLIAP_ENABLE_PYTHON_DEFAULT ON)
endif() endif()
@ -15,26 +10,26 @@ endif()
option(MLIAP_ENABLE_PYTHON "Build ML-IAP package with Python support" ${MLIAP_ENABLE_PYTHON_DEFAULT}) option(MLIAP_ENABLE_PYTHON "Build ML-IAP package with Python support" ${MLIAP_ENABLE_PYTHON_DEFAULT})
# if ML-PACE package *and* MLIAP with Python is enabled is included we may also include ML-PACE support in ML-IAP
set(MLIAP_ENABLE_ACE_DEFAULT OFF)
if(PKG_ML-PACE)
set(MLIAP_ENABLE_ACE_DEFAULT ON)
endif()
option(MLIAP_ENABLE_ACE "Build ML-IAP package with ACE support" ${MLIAP_ENABLE_ACE_DEFAULT})
if(MLIAP_ENABLE_PYTHON) if(MLIAP_ENABLE_PYTHON)
find_package(Cythonize REQUIRED) find_package(Cythonize REQUIRED)
if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.14) find_package(Python COMPONENTS NumPy REQUIRED)
find_package(Python COMPONENTS NumPy REQUIRED)
endif()
if(NOT PKG_PYTHON) if(NOT PKG_PYTHON)
message(FATAL_ERROR "Must enable PYTHON package for including Python support in ML-IAP") message(FATAL_ERROR "Must enable PYTHON package for including Python support in ML-IAP")
endif() endif()
if(CMAKE_VERSION VERSION_LESS 3.12) if(Python_VERSION VERSION_LESS 3.6)
if(PYTHONLIBS_VERSION_STRING VERSION_LESS 3.6) message(FATAL_ERROR "Python support in ML-IAP requires Python 3.6 or later")
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() endif()
set(MLIAP_BINARY_DIR ${CMAKE_BINARY_DIR}/cython) 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}) file(MAKE_DIRECTORY ${MLIAP_BINARY_DIR})
foreach(MLIAP_CYTHON_FILE ${MLIAP_CYTHON_SRC}) foreach(MLIAP_CYTHON_FILE ${MLIAP_CYTHON_SRC})
get_filename_component(MLIAP_CYTHON_BASE ${MLIAP_CYTHON_FILE} NAME_WE) get_filename_component(MLIAP_CYTHON_BASE ${MLIAP_CYTHON_FILE} NAME_WE)
@ -49,3 +44,10 @@ if(MLIAP_ENABLE_PYTHON)
target_compile_definitions(lammps PRIVATE -DMLIAP_PYTHON) target_compile_definitions(lammps PRIVATE -DMLIAP_PYTHON)
target_include_directories(lammps PRIVATE ${MLIAP_BINARY_DIR}) target_include_directories(lammps PRIVATE ${MLIAP_BINARY_DIR})
endif() endif()
if(MLIAP_ENABLE_ACE)
if(NOT PKG_ML-PACE)
message(FATAL_ERROR "Must enable ML-PACE package for including ACE support in ML-IAP")
endif()
target_compile_definitions(lammps PRIVATE -DMLIAP_ACE)
endif()

View File

@ -1,33 +1,46 @@
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") # PACE library support for ML-PACE package
set(PACELIB_MD5 "4f0b3b5b14456fe9a73b447de3765caa" CACHE STRING "MD5 checksum of PACE evaluator library tarball") # set policy to silence warnings about timestamps of downloaded files. review occasionally if it may be set to NEW
if(POLICY CMP0135)
cmake_policy(SET CMP0135 OLD)
endif()
set(PACELIB_URL "https://github.com/ICAMS/lammps-user-pace/archive/refs/tags/v.2023.11.25.fix.tar.gz" CACHE STRING "URL for PACE evaluator library sources")
set(PACELIB_MD5 "b45de9a633f42ed65422567e3ce56f9f" CACHE STRING "MD5 checksum of PACE evaluator library tarball")
mark_as_advanced(PACELIB_URL) mark_as_advanced(PACELIB_URL)
mark_as_advanced(PACELIB_MD5) mark_as_advanced(PACELIB_MD5)
GetFallbackURL(PACELIB_URL PACELIB_FALLBACK) GetFallbackURL(PACELIB_URL PACELIB_FALLBACK)
# download library sources to build folder # LOCAL_ML-PACE points to top-level dir with local lammps-user-pace repo,
if(EXISTS ${CMAKE_BINARY_DIR}/libpace.tar.gz) # to make it easier to check local build without going through the public github releases
file(MD5 ${CMAKE_BINARY_DIR}/libpace.tar.gz DL_MD5) if(LOCAL_ML-PACE)
endif() set(lib-pace "${LOCAL_ML-PACE}")
if(NOT "${DL_MD5}" STREQUAL "${PACELIB_MD5}")
message(STATUS "Downloading ${PACELIB_URL}")
file(DOWNLOAD ${PACELIB_URL} ${CMAKE_BINARY_DIR}/libpace.tar.gz STATUS DL_STATUS SHOW_PROGRESS)
file(MD5 ${CMAKE_BINARY_DIR}/libpace.tar.gz DL_MD5)
if((NOT DL_STATUS EQUAL 0) OR (NOT "${DL_MD5}" STREQUAL "${PACELIB_MD5}"))
message(WARNING "Download from primary URL ${PACELIB_URL} failed\nTrying fallback URL ${PACELIB_FALLBACK}")
file(DOWNLOAD ${PACELIB_FALLBACK} ${CMAKE_BINARY_DIR}/libpace.tar.gz EXPECTED_HASH MD5=${PACELIB_MD5} SHOW_PROGRESS)
endif()
else() else()
message(STATUS "Using already downloaded archive ${CMAKE_BINARY_DIR}/libpace.tar.gz") # download library sources to build folder
endif() if(EXISTS ${CMAKE_BINARY_DIR}/libpace.tar.gz)
file(MD5 ${CMAKE_BINARY_DIR}/libpace.tar.gz DL_MD5)
endif()
if(NOT "${DL_MD5}" STREQUAL "${PACELIB_MD5}")
message(STATUS "Downloading ${PACELIB_URL}")
file(DOWNLOAD ${PACELIB_URL} ${CMAKE_BINARY_DIR}/libpace.tar.gz STATUS DL_STATUS SHOW_PROGRESS)
file(MD5 ${CMAKE_BINARY_DIR}/libpace.tar.gz DL_MD5)
if((NOT DL_STATUS EQUAL 0) OR (NOT "${DL_MD5}" STREQUAL "${PACELIB_MD5}"))
message(WARNING "Download from primary URL ${PACELIB_URL} failed\nTrying fallback URL ${PACELIB_FALLBACK}")
file(DOWNLOAD ${PACELIB_FALLBACK} ${CMAKE_BINARY_DIR}/libpace.tar.gz EXPECTED_HASH MD5=${PACELIB_MD5} SHOW_PROGRESS)
endif()
else()
message(STATUS "Using already downloaded archive ${CMAKE_BINARY_DIR}/libpace.tar.gz")
endif()
# uncompress downloaded sources
execute_process( # uncompress downloaded sources
COMMAND ${CMAKE_COMMAND} -E remove_directory lammps-user-pace* execute_process(
COMMAND ${CMAKE_COMMAND} -E tar xzf libpace.tar.gz COMMAND ${CMAKE_COMMAND} -E remove_directory lammps-user-pace*
WORKING_DIRECTORY ${CMAKE_BINARY_DIR} COMMAND ${CMAKE_COMMAND} -E tar xzf libpace.tar.gz
) WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
get_newest_file(${CMAKE_BINARY_DIR}/lammps-user-pace-* lib-pace) )
get_newest_file(${CMAKE_BINARY_DIR}/lammps-user-pace-* lib-pace)
endif()
add_subdirectory(${lib-pace} build-pace) add_subdirectory(${lib-pace} build-pace)
set_target_properties(pace PROPERTIES CXX_EXTENSIONS ON OUTPUT_NAME lammps_pace${LAMMPS_MACHINE}) set_target_properties(pace PROPERTIES CXX_EXTENSIONS ON OUTPUT_NAME lammps_pace${LAMMPS_MACHINE})

View File

@ -18,14 +18,16 @@ if(DOWNLOAD_QUIP)
set(temp "${temp}F77FLAGS += -fpp -fixed -fPIC\n") set(temp "${temp}F77FLAGS += -fpp -fixed -fPIC\n")
set(temp "${temp}F95_PRE_FILENAME_FLAG = -Tf\n") set(temp "${temp}F95_PRE_FILENAME_FLAG = -Tf\n")
elseif(CMAKE_Fortran_COMPILER_ID STREQUAL GNU) elseif(CMAKE_Fortran_COMPILER_ID STREQUAL GNU)
set(temp "${temp}FPP=${CMAKE_Fortran_COMPILER} -E -x f95-cpp-input\nOPTIM=${CMAKE_Fortran_FLAGS_${BTYPE}}\n") # quip library uses GNU fortran extensions. If any more restrictive standards are set, reset them
string(REGEX REPLACE -std=f[0-9]+ -std=gnu _fopt "${CMAKE_Fortran_FLAGS_${BTYPE}}")
set(temp "${temp}FPP=${CMAKE_Fortran_COMPILER} -E -x f95-cpp-input\nOPTIM=${_fopt} -fmax-stack-var-size=6553600\n")
set(temp "${temp}DEFINES += -DGETARG_F2003 -DGETENV_F2003 -DGFORTRAN -DFORTRAN_UNDERSCORE\n") set(temp "${temp}DEFINES += -DGETARG_F2003 -DGETENV_F2003 -DGFORTRAN -DFORTRAN_UNDERSCORE\n")
set(temp "${temp}F95FLAGS += -x f95-cpp-input -ffree-line-length-none -ffree-form -fno-second-underscore -fPIC\n") set(temp "${temp}F95FLAGS += -x f95-cpp-input -ffree-line-length-none -ffree-form -fno-second-underscore -fPIC\n")
set(temp "${temp}F77FLAGS += -x f77-cpp-input -fno-second-underscore -fPIC\n") set(temp "${temp}F77FLAGS += -x f77-cpp-input -fno-second-underscore -fPIC\n")
else() else()
message(FATAL_ERROR "The ${CMAKE_Fortran_COMPILER_ID} Fortran compiler is not (yet) supported for building QUIP") message(FATAL_ERROR "The ${CMAKE_Fortran_COMPILER_ID} Fortran compiler is not (yet) supported for building QUIP")
endif() endif()
set(temp "${temp}CFLAGS += -fPIC \nCPLUSPLUSFLAGS += -fPIC\nAR_ADD=src\n") set(temp "${temp}CFLAGS += -fPIC -Wno-return-mismatch \nCPLUSPLUSFLAGS += -fPIC -Wno-return-mismatch\nAR_ADD=src\n")
set(temp "${temp}MATH_LINKOPTS=") set(temp "${temp}MATH_LINKOPTS=")
foreach(flag ${BLAS_LIBRARIES}) foreach(flag ${BLAS_LIBRARIES})
set(temp "${temp} ${flag}") set(temp "${temp} ${flag}")
@ -56,7 +58,7 @@ if(DOWNLOAD_QUIP)
GIT_SUBMODULES "src/fox;src/GAP" GIT_SUBMODULES "src/fox;src/GAP"
PATCH_COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_BINARY_DIR}/quip.config <SOURCE_DIR>/arch/Makefile.lammps PATCH_COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_BINARY_DIR}/quip.config <SOURCE_DIR>/arch/Makefile.lammps
CONFIGURE_COMMAND env QUIP_ARCH=lammps make config CONFIGURE_COMMAND env QUIP_ARCH=lammps make config
BUILD_COMMAND env QUIP_ARCH=lammps make libquip BUILD_COMMAND env QUIP_ARCH=lammps make -j1 libquip
INSTALL_COMMAND "" INSTALL_COMMAND ""
BUILD_IN_SOURCE YES BUILD_IN_SOURCE YES
BUILD_BYPRODUCTS <SOURCE_DIR>/build/lammps/${CMAKE_STATIC_LIBRARY_PREFIX}quip${CMAKE_STATIC_LIBRARY_SUFFIX} BUILD_BYPRODUCTS <SOURCE_DIR>/build/lammps/${CMAKE_STATIC_LIBRARY_PREFIX}quip${CMAKE_STATIC_LIBRARY_SUFFIX}

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/491270a73539e3f6951e76f7dbe84e258b3ebb45.tar.gz" CACHE STRING "URL for MSCG tarball")
set(MSCG_MD5 "7ea50748fba5c3a372e0266bd31d2f11" CACHE STRING "MD5 checksum of MSCG tarball")
mark_as_advanced(MSCG_URL)
mark_as_advanced(MSCG_MD5)
include(ExternalCMakeProject)
ExternalCMakeProject(mscg ${MSCG_URL} ${MSCG_MD5} MSCG-release src/CMake "")
# set include and link library
target_include_directories(lammps PRIVATE "${CMAKE_BINARY_DIR}/_deps/mscg-src/src")
target_link_libraries(lammps PRIVATE mscg)
else()
find_package(MSCG)
if(NOT MSCG_FOUND)
message(FATAL_ERROR "MSCG not found, help CMake to find it by setting MSCG_LIBRARY and MSCG_INCLUDE_DIR, or set DOWNLOAD_MSCG=ON to download it")
endif()
target_link_libraries(lammps PRIVATE MSCG::MSCG)
endif()
target_link_libraries(lammps PRIVATE GSL::gsl ${LAPACK_LIBRARIES})

View File

@ -1,5 +1,14 @@
# Plumed2 support for PLUMED package # Plumed2 support for PLUMED package
# set policy to silence warnings about timestamps of downloaded files. review occasionally if it may be set to NEW
if(POLICY CMP0135)
cmake_policy(SET CMP0135 OLD)
endif()
# for supporting multiple concurrent plumed2 installations for debugging and testing
set(PLUMED_SUFFIX "" CACHE STRING "Suffix for Plumed2 library")
mark_as_advanced(PLUMED_SUFFIX)
if(BUILD_MPI) if(BUILD_MPI)
set(PLUMED_CONFIG_MPI "--enable-mpi") set(PLUMED_CONFIG_MPI "--enable-mpi")
set(PLUMED_CONFIG_CC ${CMAKE_MPI_C_COMPILER}) set(PLUMED_CONFIG_CC ${CMAKE_MPI_C_COMPILER})
@ -21,9 +30,11 @@ else()
set(PLUMED_CONFIG_OMP "--disable-openmp") set(PLUMED_CONFIG_OMP "--disable-openmp")
endif() endif()
set(PLUMED_URL "https://github.com/plumed/plumed2/releases/download/v2.8.2/plumed-src-2.8.2.tgz" # Note: must also adjust check for supported API versions in
# fix_plumed.cpp when version changes from v2.n.x to v2.n+1.y
set(PLUMED_URL "https://github.com/plumed/plumed2/releases/download/v2.9.2/plumed-src-2.9.2.tgz"
CACHE STRING "URL for PLUMED tarball") CACHE STRING "URL for PLUMED tarball")
set(PLUMED_MD5 "599092b6a0aa6fff992612537ad98994" CACHE STRING "MD5 checksum of PLUMED tarball") set(PLUMED_MD5 "04862602a372c1013bdfee2d6d03bace" CACHE STRING "MD5 checksum of PLUMED tarball")
mark_as_advanced(PLUMED_URL) mark_as_advanced(PLUMED_URL)
mark_as_advanced(PLUMED_MD5) mark_as_advanced(PLUMED_MD5)
@ -75,6 +86,9 @@ if((CMAKE_SYSTEM_NAME STREQUAL "Windows") AND (CMAKE_CROSSCOMPILING))
DEPENDS plumed_build DEPENDS plumed_build
COMMENT "Copying Plumed files" COMMENT "Copying Plumed files"
) )
if(CMAKE_PROJECT_NAME STREQUAL "lammps")
target_link_libraries(lammps INTERFACE LAMMPS::PLUMED)
endif()
else() else()
@ -149,21 +163,26 @@ else()
endif() endif()
set_target_properties(LAMMPS::PLUMED PROPERTIES INTERFACE_INCLUDE_DIRECTORIES ${INSTALL_DIR}/include) set_target_properties(LAMMPS::PLUMED PROPERTIES INTERFACE_INCLUDE_DIRECTORIES ${INSTALL_DIR}/include)
file(MAKE_DIRECTORY ${INSTALL_DIR}/include) file(MAKE_DIRECTORY ${INSTALL_DIR}/include)
if(CMAKE_PROJECT_NAME STREQUAL "lammps")
target_link_libraries(lammps PRIVATE LAMMPS::PLUMED)
endif()
else() else()
find_package(PkgConfig REQUIRED) find_package(PkgConfig REQUIRED)
pkg_check_modules(PLUMED REQUIRED plumed) pkg_check_modules(PLUMED REQUIRED plumed${PLUMED_SUFFIX})
add_library(LAMMPS::PLUMED INTERFACE IMPORTED) add_library(LAMMPS::PLUMED INTERFACE IMPORTED)
if(PLUMED_MODE STREQUAL "STATIC") if(PLUMED_MODE STREQUAL "STATIC")
include(${PLUMED_LIBDIR}/plumed/src/lib/Plumed.cmake.static) include(${PLUMED_LIBDIR}/plumed${PLUMED_SUFFIX}/src/lib/Plumed.cmake.static)
elseif(PLUMED_MODE STREQUAL "SHARED") elseif(PLUMED_MODE STREQUAL "SHARED")
include(${PLUMED_LIBDIR}/plumed/src/lib/Plumed.cmake.shared) include(${PLUMED_LIBDIR}/plumed${PLUMED_SUFFIX}/src/lib/Plumed.cmake.shared)
elseif(PLUMED_MODE STREQUAL "RUNTIME") elseif(PLUMED_MODE STREQUAL "RUNTIME")
set_target_properties(LAMMPS::PLUMED PROPERTIES INTERFACE_COMPILE_DEFINITIONS "__PLUMED_DEFAULT_KERNEL=${PLUMED_LIBDIR}/${CMAKE_SHARED_LIBRARY_PREFIX}plumedKernel${CMAKE_SHARED_LIBRARY_SUFFIX}") set_target_properties(LAMMPS::PLUMED PROPERTIES INTERFACE_COMPILE_DEFINITIONS "__PLUMED_DEFAULT_KERNEL=${PLUMED_LIBDIR}/${CMAKE_SHARED_LIBRARY_PREFIX}plumed${PLUMED_SUFFIX}Kernel${CMAKE_SHARED_LIBRARY_SUFFIX}")
include(${PLUMED_LIBDIR}/plumed/src/lib/Plumed.cmake.runtime) include(${PLUMED_LIBDIR}/plumed${PLUMED_SUFFIX}/src/lib/Plumed.cmake.runtime)
endif() endif()
set_target_properties(LAMMPS::PLUMED PROPERTIES INTERFACE_LINK_LIBRARIES "${PLUMED_LOAD}") set_target_properties(LAMMPS::PLUMED PROPERTIES INTERFACE_LINK_LIBRARIES "${PLUMED_LOAD}")
set_target_properties(LAMMPS::PLUMED PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${PLUMED_INCLUDE_DIRS}") set_target_properties(LAMMPS::PLUMED PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${PLUMED_INCLUDE_DIRS}")
if(CMAKE_PROJECT_NAME STREQUAL "lammps")
target_link_libraries(lammps PUBLIC LAMMPS::PLUMED)
endif()
endif() endif()
endif() endif()
target_link_libraries(lammps PRIVATE LAMMPS::PLUMED)

View File

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

View File

@ -54,5 +54,5 @@ else()
if(NOT VORO_FOUND) if(NOT VORO_FOUND)
message(FATAL_ERROR "Voro++ library not found. Help CMake to find it by setting VORO_LIBRARY and VORO_INCLUDE_DIR, or set DOWNLOAD_VORO=ON to download it") message(FATAL_ERROR "Voro++ library not found. Help CMake to find it by setting VORO_LIBRARY and VORO_INCLUDE_DIR, or set DOWNLOAD_VORO=ON to download it")
endif() endif()
target_link_libraries(lammps PRIVATE VORO::VORO) target_link_libraries(lammps PRIVATE VORO::voro++)
endif() endif()

View File

@ -1,5 +1,5 @@
function(FindStyleHeaders path style_class file_pattern headers) 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}) get_property(hlist GLOBAL PROPERTY ${headers})
foreach(file_name ${files}) foreach(file_name ${files})
@ -187,7 +187,7 @@ endfunction(DetectBuildSystemConflict)
function(FindPackagesHeaders path style_class file_pattern headers) 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}) get_property(plist GLOBAL PROPERTY ${headers})
foreach(file_name ${files}) foreach(file_name ${files})

View File

@ -6,7 +6,7 @@ if(ENABLE_TESTING)
find_program(VALGRIND_BINARY NAMES valgrind) find_program(VALGRIND_BINARY NAMES valgrind)
# generate custom suppression file # generate custom suppression file
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/lammps.supp "\n") 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}) foreach(SUPP ${VALGRIND_SUPPRESSION_FILES})
file(READ ${SUPP} SUPPRESSIONS) file(READ ${SUPP} SUPPRESSIONS)
file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/lammps.supp "${SUPPRESSIONS}") file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/lammps.supp "${SUPPRESSIONS}")
@ -19,7 +19,7 @@ if(ENABLE_TESTING)
# we need to build and link a LOT of tester executables, so it is worth checking if # 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. # a faster linker is available. requires GNU or Clang compiler, newer CMake.
# also only verified with Fedora Linux > 30 and Ubuntu 18.04 or 22.04+(Ubuntu 20.04 fails) # also only verified with Fedora Linux > 30 and Ubuntu 18.04 or 22.04+(Ubuntu 20.04 fails)
if((CMAKE_SYSTEM_NAME STREQUAL "Linux") AND (CMAKE_VERSION VERSION_GREATER_EQUAL 3.13) if((CMAKE_SYSTEM_NAME STREQUAL "Linux")
AND ((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") OR (CMAKE_CXX_COMPILER_ID STREQUAL "Clang"))) AND ((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") OR (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")))
if(((CMAKE_LINUX_DISTRO STREQUAL "Ubuntu") AND if(((CMAKE_LINUX_DISTRO STREQUAL "Ubuntu") AND
((CMAKE_DISTRO_VERSION VERSION_LESS_EQUAL 18.04) OR (CMAKE_DISTRO_VERSION VERSION_GREATER_EQUAL 22.04))) ((CMAKE_DISTRO_VERSION VERSION_LESS_EQUAL 18.04) OR (CMAKE_DISTRO_VERSION VERSION_GREATER_EQUAL 22.04)))
@ -66,16 +66,8 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
option(ENABLE_COVERAGE "Enable collecting code coverage data" OFF) option(ENABLE_COVERAGE "Enable collecting code coverage data" OFF)
mark_as_advanced(ENABLE_COVERAGE) mark_as_advanced(ENABLE_COVERAGE)
if(ENABLE_COVERAGE) if(ENABLE_COVERAGE)
if(CMAKE_VERSION VERSION_LESS 3.13) target_compile_options(lammps PUBLIC --coverage)
if(CMAKE_CXX_FLAGS) target_link_options(lammps PUBLIC --coverage)
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()
endif() endif()
@ -110,24 +102,16 @@ endif()
####################################### #######################################
# select code sanitizer options # select code sanitizer options
####################################### #######################################
set(ENABLE_SANITIZER "none" CACHE STRING "Select a code sanitizer option (none (default), address, leak, thread, undefined)") set(ENABLE_SANITIZER "none" CACHE STRING "Select a code sanitizer option (none (default), address, hwaddress, leak, thread, undefined)")
mark_as_advanced(ENABLE_SANITIZER) mark_as_advanced(ENABLE_SANITIZER)
set(ENABLE_SANITIZER_VALUES none address leak thread undefined) set(ENABLE_SANITIZER_VALUES none address hwaddress leak thread undefined)
set_property(CACHE ENABLE_SANITIZER PROPERTY STRINGS ${ENABLE_SANITIZER_VALUES}) set_property(CACHE ENABLE_SANITIZER PROPERTY STRINGS ${ENABLE_SANITIZER_VALUES})
validate_option(ENABLE_SANITIZER ENABLE_SANITIZER_VALUES) validate_option(ENABLE_SANITIZER ENABLE_SANITIZER_VALUES)
string(TOLOWER ${ENABLE_SANITIZER} ENABLE_SANITIZER) string(TOLOWER ${ENABLE_SANITIZER} ENABLE_SANITIZER)
if(NOT ENABLE_SANITIZER STREQUAL "none") if(NOT ENABLE_SANITIZER STREQUAL "none")
if((${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU") OR (${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang")) if((${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU") OR (${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang"))
if(CMAKE_VERSION VERSION_LESS 3.13) target_compile_options(lammps PUBLIC -fsanitize=${ENABLE_SANITIZER})
if(CMAKE_CXX_FLAGS) target_link_options(lammps PUBLIC -fsanitize=${ENABLE_SANITIZER})
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() else()
message(WARNING "ENABLE_SANITIZER option not supported by ${CMAKE_CXX_COMPILER_ID} compilers. Ignoring.") message(WARNING "ENABLE_SANITIZER option not supported by ${CMAKE_CXX_COMPILER_ID} compilers. Ignoring.")
set(ENABLE_SANITIZER "none") set(ENABLE_SANITIZER "none")

View File

@ -26,7 +26,7 @@ if(BUILD_TOOLS)
enable_language(C) enable_language(C)
get_filename_component(MSI2LMP_SOURCE_DIR ${LAMMPS_TOOLS_DIR}/msi2lmp/src ABSOLUTE) 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}) add_executable(msi2lmp ${MSI2LMP_SOURCES})
if(STANDARD_MATH_LIB) if(STANDARD_MATH_LIB)
target_link_libraries(msi2lmp PRIVATE ${STANDARD_MATH_LIB}) target_link_libraries(msi2lmp PRIVATE ${STANDARD_MATH_LIB})
@ -37,34 +37,8 @@ if(BUILD_TOOLS)
add_subdirectory(${LAMMPS_TOOLS_DIR}/phonon ${CMAKE_BINARY_DIR}/phana_build) add_subdirectory(${LAMMPS_TOOLS_DIR}/phonon ${CMAKE_BINARY_DIR}/phana_build)
endif() endif()
if(BUILD_LAMMPS_SHELL) if(BUILD_LAMMPS_GUI)
find_package(PkgConfig REQUIRED) get_filename_component(LAMMPS_GUI_DIR ${LAMMPS_SOURCE_DIR}/../tools/lammps-gui ABSOLUTE)
pkg_check_modules(READLINE IMPORTED_TARGET REQUIRED readline) get_filename_component(LAMMPS_GUI_BIN ${CMAKE_BINARY_DIR}/lammps-gui-build ABSOLUTE)
if(NOT LAMMPS_EXCEPTIONS) add_subdirectory(${LAMMPS_GUI_DIR} ${LAMMPS_GUI_BIN})
message(WARNING "The LAMMPS shell needs LAMMPS_EXCEPTIONS enabled for full functionality")
endif()
# include resource compiler to embed icons into the executable on Windows
if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
enable_language(RC)
set(ICON_RC_FILE ${LAMMPS_TOOLS_DIR}/lammps-shell/lmpicons.rc)
endif()
add_executable(lammps-shell ${LAMMPS_TOOLS_DIR}/lammps-shell/lammps-shell.cpp ${ICON_RC_FILE})
target_include_directories(lammps-shell PRIVATE ${LAMMPS_TOOLS_DIR}/lammps-shell)
target_link_libraries(lammps-shell PRIVATE lammps PkgConfig::READLINE)
# workaround for broken readline pkg-config file on FreeBSD
if(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
target_include_directories(lammps-shell PRIVATE /usr/local/include)
endif()
if(CMAKE_SYSTEM_NAME STREQUAL "LinuxMUSL")
pkg_check_modules(TERMCAP IMPORTED_TARGET REQUIRED termcap)
target_link_libraries(lammps-shell PRIVATE lammps PkgConfig::TERMCAP)
endif()
install(TARGETS lammps-shell EXPORT LAMMPS_Targets DESTINATION ${CMAKE_INSTALL_BINDIR})
install(DIRECTORY ${LAMMPS_TOOLS_DIR}/lammps-shell/icons DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/)
install(FILES ${LAMMPS_TOOLS_DIR}/lammps-shell/lammps-shell.desktop DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/applications/)
endif() endif()

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

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,80 @@
#!/bin/bash
APP_NAME=lammps-gui
DESTDIR=${PWD}/../LAMMPS_GUI
VERSION="$1"
echo "Delete old files, if they exist"
rm -rf ${DESTDIR} ../LAMMPS_GUI-Linux-amd64*.tar.gz
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}/xdg-open ${DESTDIR}/bin
cp ${MYDIR}/linux_wrapper.sh ${DESTDIR}/bin
for s in ${DESTDIR}/bin/*
do \
EXE=$(basename $s)
test ${EXE} = linux_wrapper.sh && continue
test ${EXE} = qt.conf && continue
test ${EXE} = xdg-open && continue
ln -s bin/linux_wrapper.sh ${DESTDIR}/${EXE}
done
pushd ..
tar -czvvf LAMMPS_GUI-Linux-amd64-${VERSION}.tar.gz LAMMPS_GUI
popd
echo "Cleanup dir"
rm -r ${DESTDIR}
exit 0

View File

@ -0,0 +1,112 @@
#!/bin/bash
APP_NAME=lammps-gui
VERSION="$1"
echo "Delete old files, if they exist"
rm -f ${APP_NAME}.dmg ${APP_NAME}-rw.dmg LAMMPS_GUI-macOS-multiarch*.dmg
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-${VERSION}.dmg"
echo "Attach icon to .dmg file"
echo "read 'icns' (-16455) \"lammps-gui.app/Contents/Resources/lammps.icns\";" > icon.rsrc
Rez -a icon.rsrc -o LAMMPS_GUI-macOS-multiarch-${VERSION}.dmg
SetFile -a C LAMMPS_GUI-macOS-multiarch-${VERSION}.dmg
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,65 @@
#!/bin/bash
APP_NAME=lammps-gui
DESTDIR=${PWD}/LAMMPS_GUI
SYSROOT="$1"
VERSION="$2"
echo "Delete old files, if they exist"
rm -rvf ${DESTDIR}/LAMMPS_GUI ${DESTDIR}/LAMMPS-Win10-amd64*.zip
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-${VERSION}.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,20 @@
#!/bin/sh
# wrapper for bundled executables
# reset locale to avoid problems with decimal numbers
export LC_ALL=C
BASEDIR="$(dirname "$0")"
EXENAME="$(basename "$0")"
PATH="${BASEDIR}/bin:${PATH}"
# 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 PATH
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

1074
cmake/packaging/xdg-open Executable file

File diff suppressed because it is too large Load Diff

View File

@ -26,8 +26,9 @@ set(ALL_PACKAGES
DPD-REACT DPD-REACT
DPD-SMOOTH DPD-SMOOTH
DRUDE DRUDE
ELECTRODE
EFF EFF
ELECTRODE
EXTRA-COMMAND
EXTRA-COMPUTE EXTRA-COMPUTE
EXTRA-DUMP EXTRA-DUMP
EXTRA-FIX EXTRA-FIX
@ -60,11 +61,10 @@ set(ALL_PACKAGES
ML-QUIP ML-QUIP
ML-RANN ML-RANN
ML-SNAP ML-SNAP
ML-UF3
MOFFF MOFFF
MOLECULE MOLECULE
MOLFILE MOLFILE
MPIIO
MSCG
NETCDF NETCDF
OPENMP OPENMP
OPT OPT
@ -82,6 +82,7 @@ set(ALL_PACKAGES
REACTION REACTION
REAXFF REAXFF
REPLICA REPLICA
RHEO
RIGID RIGID
SCAFACOS SCAFACOS
SHOCK SHOCK

View File

@ -28,8 +28,9 @@ set(ALL_PACKAGES
DPD-REACT DPD-REACT
DPD-SMOOTH DPD-SMOOTH
DRUDE DRUDE
ELECTRODE
EFF EFF
ELECTRODE
EXTRA-COMMAND
EXTRA-COMPUTE EXTRA-COMPUTE
EXTRA-DUMP EXTRA-DUMP
EXTRA-FIX EXTRA-FIX
@ -62,11 +63,10 @@ set(ALL_PACKAGES
ML-QUIP ML-QUIP
ML-RANN ML-RANN
ML-SNAP ML-SNAP
ML-UF3
MOFFF MOFFF
MOLECULE MOLECULE
MOLFILE MOLFILE
MPIIO
MSCG
NETCDF NETCDF
OPENMP OPENMP
OPT OPT
@ -84,6 +84,7 @@ set(ALL_PACKAGES
REACTION REACTION
REAXFF REAXFF
REPLICA REPLICA
RHEO
RIGID RIGID
SCAFACOS SCAFACOS
SHOCK SHOCK

View File

@ -1,10 +1,10 @@
# preset that will enable clang/clang++ with support for MPI and OpenMP (on Linux boxes) # preset that will enable clang/clang++ with support for MPI and OpenMP (on Linux boxes)
# prefer flang over gfortran, if available # prefer flang over gfortran, if available
find_program(CLANG_FORTRAN NAMES flang gfortran f95) find_program(CLANG_FORTRAN NAMES flang-new flang gfortran f95)
set(ENV{OMPI_FC} ${CLANG_FORTRAN}) set(ENV{OMPI_FC} ${CLANG_FORTRAN})
get_filename_component(_tmp_fc ${CLANG_FORTRAN} NAME) get_filename_component(_tmp_fc ${CLANG_FORTRAN} NAME)
if (_tmp_fc STREQUAL "flang") if ((_tmp_fc STREQUAL "flang") OR (_tmp_fc STREQUAL "flang-new"))
set(FC_STD_VERSION "-std=f2018") set(FC_STD_VERSION "-std=f2018")
set(BUILD_MPI OFF) set(BUILD_MPI OFF)
else() else()

View File

@ -9,7 +9,6 @@ endforeach()
set(DOWNLOAD_KIM ON CACHE BOOL "" FORCE) set(DOWNLOAD_KIM ON CACHE BOOL "" FORCE)
set(DOWNLOAD_MDI 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_VORO ON CACHE BOOL "" FORCE)
set(DOWNLOAD_EIGEN3 ON CACHE BOOL "" FORCE) set(DOWNLOAD_EIGEN3 ON CACHE BOOL "" FORCE)
set(DOWNLOAD_PACE ON CACHE BOOL "" FORCE) set(DOWNLOAD_PACE ON CACHE BOOL "" FORCE)

View File

@ -0,0 +1,11 @@
# preset that enables GPU and selects CUDA API
set(PKG_GPU ON CACHE BOOL "Build GPU package" FORCE)
set(GPU_API "cuda" CACHE STRING "APU used by GPU package" FORCE)
set(GPU_PREC "mixed" CACHE STRING "" FORCE)
set(CUDA_NVCC_FLAGS "-allow-unsupported-compiler" CACHE STRING "" FORCE)
set(CUDA_NVCC_FLAGS_DEBUG "-allow-unsupported-compiler" CACHE STRING "" FORCE)
set(CUDA_NVCC_FLAGS_MINSIZEREL "-allow-unsupported-compiler" CACHE STRING "" FORCE)
set(CUDA_NVCC_FLAGS_RELWITHDEBINFO "-allow-unsupported-compiler" CACHE STRING "" FORCE)
set(CUDA_NVCC_FLAGS_RELEASE "-allow-unsupported-compiler" CACHE STRING "" FORCE)

View File

@ -6,6 +6,11 @@ set(Kokkos_ENABLE_SERIAL ON CACHE BOOL "" FORCE)
set(Kokkos_ENABLE_CUDA ON CACHE BOOL "" FORCE) set(Kokkos_ENABLE_CUDA ON CACHE BOOL "" FORCE)
set(Kokkos_ARCH_PASCAL60 ON CACHE BOOL "" FORCE) set(Kokkos_ARCH_PASCAL60 ON CACHE BOOL "" FORCE)
set(BUILD_OMP ON CACHE BOOL "" FORCE) set(BUILD_OMP ON CACHE BOOL "" FORCE)
get_filename_component(NVCC_WRAPPER_CMD ${CMAKE_CURRENT_SOURCE_DIR}/../lib/kokkos/bin/nvcc_wrapper ABSOLUTE)
set(CMAKE_CXX_COMPILER ${NVCC_WRAPPER_CMD} CACHE FILEPATH "" FORCE)
# If KSPACE is also enabled, use CUFFT for FFTs
set(FFT_KOKKOS "CUFFT" CACHE STRING "" FORCE)
# hide deprecation warnings temporarily for stable release # hide deprecation warnings temporarily for stable release
set(Kokkos_ENABLE_DEPRECATION_WARNINGS OFF CACHE BOOL "" FORCE) set(Kokkos_ENABLE_DEPRECATION_WARNINGS OFF CACHE BOOL "" FORCE)

View File

@ -12,6 +12,9 @@ set(BUILD_OMP ON CACHE BOOL "" FORCE)
set(CMAKE_CXX_COMPILER hipcc CACHE STRING "" FORCE) set(CMAKE_CXX_COMPILER hipcc CACHE STRING "" FORCE)
set(CMAKE_TUNE_FLAGS "-munsafe-fp-atomics" CACHE STRING "" FORCE) set(CMAKE_TUNE_FLAGS "-munsafe-fp-atomics" CACHE STRING "" FORCE)
# If KSPACE is also enabled, use CUFFT for FFTs
set(FFT_KOKKOS "HIPFFT" CACHE STRING "" FORCE)
# hide deprecation warnings temporarily for stable release # hide deprecation warnings temporarily for stable release
set(Kokkos_ENABLE_DEPRECATION_WARNINGS OFF CACHE BOOL "" FORCE) set(Kokkos_ENABLE_DEPRECATION_WARNINGS OFF CACHE BOOL "" FORCE)

View File

@ -0,0 +1,29 @@
# preset that enables KOKKOS and selects SYCL compilation with OpenMP
# enabled as well. Also sets some performance related compiler flags.
set(PKG_KOKKOS ON CACHE BOOL "" FORCE)
set(Kokkos_ENABLE_SERIAL ON CACHE BOOL "" FORCE)
set(Kokkos_ENABLE_OPENMP ON CACHE BOOL "" FORCE)
set(Kokkos_ENABLE_CUDA OFF CACHE BOOL "" FORCE)
set(Kokkos_ENABLE_SYCL ON CACHE BOOL "" FORCE)
set(FFT "MKL" CACHE STRING "" FORCE)
set(FFT_KOKKOS "MKL_GPU" CACHE STRING "" FORCE)
unset(USE_INTERNAL_LINALG)
unset(USE_INTERNAL_LINALG CACHE)
set(BLAS_VENDOR "Intel10_64_dyn")
# hide deprecation warnings temporarily for stable release
set(Kokkos_ENABLE_DEPRECATION_WARNINGS OFF CACHE BOOL "" FORCE)
set(CMAKE_CXX_COMPILER icpx CACHE STRING "" FORCE)
set(CMAKE_C_COMPILER icx CACHE STRING "" FORCE)
set(CMAKE_Fortran_COMPILER "" CACHE STRING "" FORCE)
set(MPI_CXX_COMPILER "mpicxx" CACHE STRING "" FORCE)
set(CMAKE_CXX_STANDARD 17 CACHE STRING "" FORCE)
# Silence everything
set(CMAKE_CXX_FLAGS "-w" CACHE STRING "" FORCE)
#set(CMAKE_EXE_LINKER_FLAGS "-fsycl -flink-huge-device-code -fsycl-targets=spir64_gen " CACHE STRING "" FORCE)
#set(CMAKE_TUNE_FLAGS "-O3 -fsycl -fsycl-device-code-split=per_kernel -fsycl-targets=spir64_gen" CACHE STRING "" FORCE)
set(CMAKE_EXE_LINKER_FLAGS "-fsycl -flink-huge-device-code " CACHE STRING "" FORCE)
set(CMAKE_TUNE_FLAGS "-O3 -fsycl -fsycl-device-code-split=per_kernel " CACHE STRING "" 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

@ -22,8 +22,9 @@ set(WIN_PACKAGES
DPD-REACT DPD-REACT
DPD-SMOOTH DPD-SMOOTH
DRUDE DRUDE
ELECTRODE
EFF EFF
ELECTRODE
EXTRA-COMMAND
EXTRA-COMPUTE EXTRA-COMPUTE
EXTRA-DUMP EXTRA-DUMP
EXTRA-FIX EXTRA-FIX
@ -32,7 +33,6 @@ set(WIN_PACKAGES
FEP FEP
GPU GPU
GRANULAR GRANULAR
INTEL
INTERLAYER INTERLAYER
KSPACE KSPACE
LEPTON LEPTON
@ -50,6 +50,7 @@ set(WIN_PACKAGES
ML-POD ML-POD
ML-RANN ML-RANN
ML-SNAP ML-SNAP
ML-UF3
MOFFF MOFFF
MOLECULE MOLECULE
MOLFILE MOLFILE
@ -66,6 +67,7 @@ set(WIN_PACKAGES
REACTION REACTION
REAXFF REAXFF
REPLICA REPLICA
RHEO
RIGID RIGID
SHOCK SHOCK
SMTBQ SMTBQ
@ -83,7 +85,6 @@ endforeach()
# these two packages require a full MPI implementation # these two packages require a full MPI implementation
if(BUILD_MPI) if(BUILD_MPI)
set(PKG_MPIIO ON CACHE BOOL "" FORCE)
set(PKG_LATBOLTZ ON CACHE BOOL "" FORCE) set(PKG_LATBOLTZ ON CACHE BOOL "" FORCE)
endif() endif()

View File

@ -24,8 +24,9 @@ set(ALL_PACKAGES
DPD-REACT DPD-REACT
DPD-SMOOTH DPD-SMOOTH
DRUDE DRUDE
ELECTRODE
EFF EFF
ELECTRODE
EXTRA-COMMAND
EXTRA-COMPUTE EXTRA-COMPUTE
EXTRA-DUMP EXTRA-DUMP
EXTRA-FIX EXTRA-FIX
@ -45,6 +46,7 @@ set(ALL_PACKAGES
ML-IAP ML-IAP
ML-POD ML-POD
ML-SNAP ML-SNAP
ML-UF3
MOFFF MOFFF
MOLECULE MOLECULE
OPENMP OPENMP
@ -58,6 +60,7 @@ set(ALL_PACKAGES
REACTION REACTION
REAXFF REAXFF
REPLICA REPLICA
RHEO
RIGID RIGID
SHOCK SHOCK
SPH SPH

View File

@ -19,8 +19,6 @@ set(PACKAGES_WITH_LIB
ML-PACE ML-PACE
ML-QUIP ML-QUIP
MOLFILE MOLFILE
MPIIO
MSCG
NETCDF NETCDF
PLUMED PLUMED
PYTHON PYTHON

View File

@ -3,26 +3,9 @@
set(CMAKE_CXX_COMPILER "icpx" CACHE STRING "" FORCE) set(CMAKE_CXX_COMPILER "icpx" CACHE STRING "" FORCE)
set(CMAKE_C_COMPILER "icx" CACHE STRING "" FORCE) set(CMAKE_C_COMPILER "icx" CACHE STRING "" FORCE)
set(CMAKE_Fortran_COMPILER "ifx" CACHE STRING "" FORCE) set(CMAKE_Fortran_COMPILER "ifx" CACHE STRING "" FORCE)
set(CMAKE_CXX_FLAGS_DEBUG "-Wall -Wextra -g" CACHE STRING "" FORCE)
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-Wall -Wextra -g -O2 -DNDEBUG" CACHE STRING "" FORCE)
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG" CACHE STRING "" FORCE)
set(CMAKE_Fortran_FLAGS_DEBUG "-Wall -Wextra -g" CACHE STRING "" FORCE)
set(CMAKE_Fortran_FLAGS_RELWITHDEBINFO "-Wall -Wextra -g -O2 -DNDEBUG" CACHE STRING "" FORCE)
set(CMAKE_Fortran_FLAGS_RELEASE "-O3 -DNDEBUG" CACHE STRING "" FORCE)
set(CMAKE_C_FLAGS_DEBUG "-Wall -Wextra -g" CACHE STRING "" FORCE)
set(CMAKE_C_FLAGS_RELWITHDEBINFO "-Wall -Wextra -g -O2 -DNDEBUG" CACHE STRING "" FORCE)
set(CMAKE_C_FLAGS_RELEASE "-O3 -DNDEBUG" CACHE STRING "" FORCE)
set(MPI_CXX "icpx" CACHE STRING "" FORCE) set(MPI_CXX "icpx" CACHE STRING "" FORCE)
set(MPI_CXX_COMPILER "mpicxx" CACHE STRING "" FORCE) set(MPI_CXX_COMPILER "mpicxx" CACHE STRING "" FORCE)
unset(HAVE_OMP_H_INCLUDE CACHE) # force using internal BLAS/LAPCK since external ones may not be ABI compatible
set(OpenMP_C "icx" CACHE STRING "" FORCE) set(USE_INTERNAL_LINALG ON CACHE BOOL "" FORCE)
set(OpenMP_C_FLAGS "-qopenmp -qopenmp-simd" CACHE STRING "" FORCE)
set(OpenMP_C_LIB_NAMES "omp" CACHE STRING "" FORCE)
set(OpenMP_CXX "icpx" CACHE STRING "" FORCE)
set(OpenMP_CXX_FLAGS "-qopenmp -qopenmp-simd" CACHE STRING "" FORCE)
set(OpenMP_CXX_LIB_NAMES "omp" CACHE STRING "" FORCE)
set(OpenMP_Fortran_FLAGS "-qopenmp -qopenmp-simd" CACHE STRING "" FORCE)
set(OpenMP_omp_LIBRARY "libiomp5.so" CACHE PATH "" FORCE)

View File

@ -22,6 +22,7 @@ set(WIN_PACKAGES
DRUDE DRUDE
EFF EFF
ELECTRODE ELECTRODE
EXTRA-COMMAND
EXTRA-COMPUTE EXTRA-COMPUTE
EXTRA-DUMP EXTRA-DUMP
EXTRA-FIX EXTRA-FIX
@ -32,6 +33,7 @@ set(WIN_PACKAGES
INTERLAYER INTERLAYER
KSPACE KSPACE
LEPTON LEPTON
MACHDYN
MANIFOLD MANIFOLD
MANYBODY MANYBODY
MC MC
@ -41,21 +43,24 @@ set(WIN_PACKAGES
ML-IAP ML-IAP
ML-POD ML-POD
ML-SNAP ML-SNAP
ML-UF3
MOFFF MOFFF
MOLECULE MOLECULE
MOLFILE MOLFILE
OPENMP OPENMP
OPT
ORIENT ORIENT
PERI PERI
PHONON PHONON
POEMS
PLUGIN PLUGIN
POEMS
PTM PTM
QEQ QEQ
QTB QTB
REACTION REACTION
REAXFF REAXFF
REPLICA REPLICA
RHEO
RIGID RIGID
SHOCK SHOCK
SMTBQ SMTBQ

7
doc/.gitignore vendored
View File

@ -17,3 +17,10 @@
*.el *.el
/utils/sphinx-config/_static/mathjax /utils/sphinx-config/_static/mathjax
/utils/sphinx-config/_static/polyfill.js /utils/sphinx-config/_static/polyfill.js
/src/pairs.rst
/src/bonds.rst
/src/angles.rst
/src/dihedrals.rst
/src/impropers.rst
/src/computes.rst
/src/fixes.rst

View File

@ -63,6 +63,7 @@ help:
@echo " anchor_check scan for duplicate anchor labels" @echo " anchor_check scan for duplicate anchor labels"
@echo " style_check check for complete and consistent style lists" @echo " style_check check for complete and consistent style lists"
@echo " package_check check for complete and consistent package 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" @echo " spelling spell-check the manual"
# ------------------------------------------ # ------------------------------------------
@ -82,7 +83,10 @@ $(SPHINXCONFIG)/conf.py: $(SPHINXCONFIG)/conf.py.in
-e 's,@LAMMPS_PYTHON_DIR@,$(BUILDDIR)/../python,g' \ -e 's,@LAMMPS_PYTHON_DIR@,$(BUILDDIR)/../python,g' \
-e 's,@LAMMPS_DOC_DIR@,$(BUILDDIR),g' $< > $@ -e 's,@LAMMPS_DOC_DIR@,$(BUILDDIR),g' $< > $@
html: xmlgen $(VENV) $(SPHINXCONFIG)/conf.py $(ANCHORCHECK) $(MATHJAX) globbed-tocs:
$(PYTHON) $(BUILDDIR)/utils/make-globbed-tocs.py -d $(RSTDIR)
html: xmlgen globbed-tocs $(VENV) $(SPHINXCONFIG)/conf.py $(ANCHORCHECK) $(MATHJAX)
@if [ "$(HAS_BASH)" == "NO" ] ; then echo "bash was not found at $(OSHELL)! Please use: $(MAKE) SHELL=/path/to/bash" 1>&2; exit 1; fi @if [ "$(HAS_BASH)" == "NO" ] ; then echo "bash was not found at $(OSHELL)! Please use: $(MAKE) SHELL=/path/to/bash" 1>&2; exit 1; fi
@$(MAKE) $(MFLAGS) -C graphviz all @$(MAKE) $(MFLAGS) -C graphviz all
@(\ @(\
@ -98,6 +102,8 @@ html: xmlgen $(VENV) $(SPHINXCONFIG)/conf.py $(ANCHORCHECK) $(MATHJAX)
env LC_ALL=C grep -n '[^ -~]' $(RSTDIR)/*.rst ;\ env LC_ALL=C grep -n '[^ -~]' $(RSTDIR)/*.rst ;\
env LC_ALL=C grep -n ' :[a-z]\+`' $(RSTDIR)/*.rst ;\ env LC_ALL=C grep -n ' :[a-z]\+`' $(RSTDIR)/*.rst ;\
env LC_ALL=C grep -n ' `[^`]\+<[a-z][^`]\+`[^_]' $(RSTDIR)/*.rst ;\ env LC_ALL=C grep -n ' `[^`]\+<[a-z][^`]\+`[^_]' $(RSTDIR)/*.rst ;\
env LC_ALL=C grep -n ':\(ref\|doc\):[^`]' $(RSTDIR)/*.rst ;\
env LC_ALL=C grep -n '\(ref\|doc\)`[^`]' $(RSTDIR)/*.rst ;\
$(PYTHON) $(BUILDDIR)/utils/check-styles.py -s ../src -d src ;\ $(PYTHON) $(BUILDDIR)/utils/check-styles.py -s ../src -d src ;\
echo "############################################" ;\ echo "############################################" ;\
deactivate ;\ deactivate ;\
@ -110,7 +116,7 @@ html: xmlgen $(VENV) $(SPHINXCONFIG)/conf.py $(ANCHORCHECK) $(MATHJAX)
@rm -rf html/PDF/.[sg]* @rm -rf html/PDF/.[sg]*
@echo "Build finished. The HTML pages are in doc/html." @echo "Build finished. The HTML pages are in doc/html."
fasthtml: xmlgen $(VENV) $(SPHINXCONFIG)/conf.py $(ANCHORCHECK) $(MATHJAX) fasthtml: xmlgen globbed-tocs $(VENV) $(SPHINXCONFIG)/conf.py $(ANCHORCHECK) $(MATHJAX)
@if [ "$(HAS_BASH)" == "NO" ] ; then echo "bash was not found at $(OSHELL)! Please use: $(MAKE) SHELL=/path/to/bash" 1>&2; exit 1; fi @if [ "$(HAS_BASH)" == "NO" ] ; then echo "bash was not found at $(OSHELL)! Please use: $(MAKE) SHELL=/path/to/bash" 1>&2; exit 1; fi
@$(MAKE) $(MFLAGS) -C graphviz all @$(MAKE) $(MFLAGS) -C graphviz all
@mkdir -p fasthtml @mkdir -p fasthtml
@ -129,7 +135,7 @@ fasthtml: xmlgen $(VENV) $(SPHINXCONFIG)/conf.py $(ANCHORCHECK) $(MATHJAX)
@rm -rf fasthtml/PDF/.[sg]* @rm -rf fasthtml/PDF/.[sg]*
@echo "Fast HTML build finished. The HTML pages are in doc/fasthtml." @echo "Fast HTML build finished. The HTML pages are in doc/fasthtml."
spelling: xmlgen $(SPHINXCONFIG)/conf.py $(VENV) $(SPHINXCONFIG)/false_positives.txt spelling: xmlgen globbed-tocs $(SPHINXCONFIG)/conf.py $(VENV) $(SPHINXCONFIG)/false_positives.txt
@if [ "$(HAS_BASH)" == "NO" ] ; then echo "bash was not found at $(OSHELL)! Please use: $(MAKE) SHELL=/path/to/bash" 1>&2; exit 1; fi @if [ "$(HAS_BASH)" == "NO" ] ; then echo "bash was not found at $(OSHELL)! Please use: $(MAKE) SHELL=/path/to/bash" 1>&2; exit 1; fi
@(\ @(\
. $(VENV)/bin/activate ; \ . $(VENV)/bin/activate ; \
@ -140,7 +146,7 @@ spelling: xmlgen $(SPHINXCONFIG)/conf.py $(VENV) $(SPHINXCONFIG)/false_positives
) )
@echo "Spell check finished." @echo "Spell check finished."
epub: xmlgen $(VENV) $(SPHINXCONFIG)/conf.py $(ANCHORCHECK) epub: xmlgen globbed-tocs $(VENV) $(SPHINXCONFIG)/conf.py $(ANCHORCHECK)
@if [ "$(HAS_BASH)" == "NO" ] ; then echo "bash was not found at $(OSHELL)! Please use: $(MAKE) SHELL=/path/to/bash" 1>&2; exit 1; fi @if [ "$(HAS_BASH)" == "NO" ] ; then echo "bash was not found at $(OSHELL)! Please use: $(MAKE) SHELL=/path/to/bash" 1>&2; exit 1; fi
@$(MAKE) $(MFLAGS) -C graphviz all @$(MAKE) $(MFLAGS) -C graphviz all
@mkdir -p epub/JPG @mkdir -p epub/JPG
@ -163,7 +169,7 @@ mobi: epub
@ebook-convert LAMMPS.epub LAMMPS.mobi @ebook-convert LAMMPS.epub LAMMPS.mobi
@echo "Conversion finished. The MOBI manual file is created." @echo "Conversion finished. The MOBI manual file is created."
pdf: xmlgen $(VENV) $(SPHINXCONFIG)/conf.py $(ANCHORCHECK) pdf: xmlgen globbed-tocs $(VENV) $(SPHINXCONFIG)/conf.py $(ANCHORCHECK)
@if [ "$(HAS_BASH)" == "NO" ] ; then echo "bash was not found at $(OSHELL)! Please use: $(MAKE) SHELL=/path/to/bash" 1>&2; exit 1; fi @if [ "$(HAS_BASH)" == "NO" ] ; then echo "bash was not found at $(OSHELL)! Please use: $(MAKE) SHELL=/path/to/bash" 1>&2; exit 1; fi
@$(MAKE) $(MFLAGS) -C graphviz all @$(MAKE) $(MFLAGS) -C graphviz all
@if [ "$(HAS_PDFLATEX)" == "NO" ] ; then echo "PDFLaTeX or latexmk were not found! Please check README for further instructions" 1>&2; exit 1; fi @if [ "$(HAS_PDFLATEX)" == "NO" ] ; then echo "PDFLaTeX or latexmk were not found! Please check README for further instructions" 1>&2; exit 1; fi
@ -179,6 +185,8 @@ pdf: xmlgen $(VENV) $(SPHINXCONFIG)/conf.py $(ANCHORCHECK)
env LC_ALL=C grep -n '[^ -~]' $(RSTDIR)/*.rst ;\ env LC_ALL=C grep -n '[^ -~]' $(RSTDIR)/*.rst ;\
env LC_ALL=C grep -n ' :[a-z]\+`' $(RSTDIR)/*.rst ;\ env LC_ALL=C grep -n ' :[a-z]\+`' $(RSTDIR)/*.rst ;\
env LC_ALL=C grep -n ' `[^`]\+<[a-z][^`]\+`[^_]' $(RSTDIR)/*.rst ;\ env LC_ALL=C grep -n ' `[^`]\+<[a-z][^`]\+`[^_]' $(RSTDIR)/*.rst ;\
env LC_ALL=C grep -n ':\(ref\|doc\):[^`]' $(RSTDIR)/*.rst ;\
env LC_ALL=C grep -n '\(ref\|doc\)`[^`]' $(RSTDIR)/*.rst ;\
$(PYTHON) utils/check-styles.py -s ../src -d src ;\ $(PYTHON) utils/check-styles.py -s ../src -d src ;\
echo "############################################" ;\ echo "############################################" ;\
deactivate ;\ deactivate ;\
@ -227,6 +235,8 @@ char_check :
role_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 ' `[^`]\+<[a-z][^`]\+`[^_]' $(RSTDIR)/*.rst && exit 1 || : ) @( env LC_ALL=C grep -n ' `[^`]\+<[a-z][^`]\+`[^_]' $(RSTDIR)/*.rst && exit 1 || : )
@( env LC_ALL=C grep -n ':\(ref\|doc\):[^`]' $(RSTDIR)/*.rst && exit 1 || : )
@( env LC_ALL=C grep -n '\(ref\|doc\)`[^`]' $(RSTDIR)/*.rst && exit 1 || : )
link_check : $(VENV) html link_check : $(VENV) html
@(\ @(\

View File

@ -10,7 +10,7 @@ Last change: 2022-12-30
In fall 2019, the LAMMPS documentation file format has changed from a In fall 2019, the LAMMPS documentation file format has changed from a
home grown markup designed to generate HTML format files only, to home grown markup designed to generate HTML format files only, to
[reStructuredText](https://docutils.sourceforge.io/rst.html>. For a [reStructuredText](https://docutils.sourceforge.io/rst.html>). For a
transition period all files in the old .txt format were transparently transition period all files in the old .txt format were transparently
converted to .rst and then processed. The `txt2rst tool` is still converted to .rst and then processed. The `txt2rst tool` is still
included in the distribution to obtain an initial .rst file for legacy included in the distribution to obtain an initial .rst file for legacy
@ -45,8 +45,7 @@ what kind of information and sections are needed.
## Formatting conventions ## Formatting conventions
For headlines we try to follow the conventions posted here: For headlines we try to follow the conventions posted [here](https://documentation-style-guide-sphinx.readthedocs.io/en/latest/style-guide.html#headings).
https://documentation-style-guide-sphinx.readthedocs.io/en/latest/style-guide.html#headings
It seems to be sufficient to have this consistent only within It seems to be sufficient to have this consistent only within
any single file and it is not (yet) enforced strictly, but making any single file and it is not (yet) enforced strictly, but making
this globally consistent makes it easier to move sections around. this globally consistent makes it easier to move sections around.
@ -64,7 +63,7 @@ Groups of shell commands or LAMMPS input script or C/C++/Python source
code should be typeset into a `.. code-block::` section. A syntax code should be typeset into a `.. code-block::` section. A syntax
highlighting extension for LAMMPS input scripts is provided, so `LAMMPS` highlighting extension for LAMMPS input scripts is provided, so `LAMMPS`
can be used to indicate the language in the code block in addition to can be used to indicate the language in the code block in addition to
`bash`, `c`, `c++`, `console`, `csh`, `diff', `fortran`, `json`, `make`, `bash`, `c`, `c++`, `console`, `csh`, `diff`, `fortran`, `json`, `make`,
`perl`, `powershell`, `python`, `sh`, or `tcl`, `text`, or `yaml`. When `perl`, `powershell`, `python`, `sh`, or `tcl`, `text`, or `yaml`. When
no syntax style is indicated, no syntax highlighting is performed. When no syntax style is indicated, no syntax highlighting is performed. When
typesetting commands executed on the shell, please do not prefix typesetting commands executed on the shell, please do not prefix
@ -84,7 +83,7 @@ block can be used, followed by multiple `.. tab::` blocks, one
for each alternative. This is only used for HTML output. For other for each alternative. This is only used for HTML output. For other
outputs, the `.. tabs::` directive is transparently removed and outputs, the `.. tabs::` directive is transparently removed and
the individual `.. tab::` blocks will be replaced with an the individual `.. tab::` blocks will be replaced with an
`.. admonition::`` block. Thus in PDF and ePUB output those will `.. admonition::` block. Thus in PDF and ePUB output those will
be realized as sequential and plain notes. be realized as sequential and plain notes.
Special remarks can be highlighted with a `.. note::` block and Special remarks can be highlighted with a `.. note::` block and

View File

@ -6,7 +6,9 @@ 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 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 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 is likely to change as our experiences and needs change, and we try to
adapt it accordingly. Last change 2023-02-10. adapt it accordingly.
Last change: 2023-02-10
## Table of Contents ## Table of Contents
@ -36,10 +38,10 @@ requests.
MUST be submitted as a pull request to GitHub. All changes to the MUST be submitted as a pull request to GitHub. All changes to the
"develop" branch must be made exclusively through merging pull requests. "develop" branch must be made exclusively through merging pull requests.
The "release" and "stable" branches, respectively, are only to be The "release" and "stable" branches, respectively, are only to be
updated upon feature or stable releases based on the associated updated upon "feature releases" or "stable releases" based on the
tags. Updates to the stable release in between stable releases associated tags. Updates to the stable release in between stable releases
(for example, back-ported bug fixes) are first merged into the "maintenance" (for example, back-ported bug fixes) are first merged into the "maintenance"
branch and then into the "stable" branch as update releases. branch and then into the "stable" branch as "stable update releases".
Pull requests may also be submitted to (long-running) feature branches Pull requests may also be submitted to (long-running) feature branches
created by LAMMPS developers inside the LAMMPS project, if needed. Those created by LAMMPS developers inside the LAMMPS project, if needed. Those
@ -72,7 +74,7 @@ be assigned to signal urgency to merge this pull request quickly.
People can be assigned to review a pull request in two ways: People can be assigned to review a pull request in two ways:
* They can be assigned manually to review a pull request * They can be assigned manually to review a pull request
by the submitter or a LAMMPS developer by the submitter or a LAMMPS developer.
* They can be automatically assigned, because a developer's GitHub * They can be automatically assigned, because a developer's GitHub
handle matches a file pattern in the `.github/CODEOWNERS` file, handle matches a file pattern in the `.github/CODEOWNERS` file,
which associates developers with the code they contributed and which associates developers with the code they contributed and
@ -86,9 +88,9 @@ required before merging, in addition to passing all automated
compilation and unit tests. Merging counts as implicit approval, so compilation and unit tests. Merging counts as implicit approval, so
does submission of a pull request (by a LAMMPS developer). So the person 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 doing the merge may not also submit an approving review. The GitHub
feature, that reviews from code owners are "hard" reviews (i.e. they feature that reviews from code owners are "hard" reviews (i.e. they
must all approve before merging is allowed), is currently disabled. must all approve before merging is allowed) is currently disabled.
It is in the discretion of the merge maintainer to assess when a It is at the discretion of the merge maintainer to assess when a
sufficient degree of approval has been reached, especially from external sufficient degree of approval has been reached, especially from external
collaborators. Reviews may be (automatically) dismissed, when the collaborators. Reviews may be (automatically) dismissed, when the
reviewed code has been changed. Review may be requested a second time. reviewed code has been changed. Review may be requested a second time.
@ -131,7 +133,7 @@ testing -- that the code in the branch "develop" does not get easily
broken. These tests are run after every update to a pull request. More broken. These tests are run after every update to a pull request. More
extensive and time-consuming tests (including regression testing) are extensive and time-consuming tests (including regression testing) are
performed after code is merged to the "develop" branch. There are feature 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 releases of LAMMPS made about every 4-8 weeks at a point, when the LAMMPS
developers feel, that a sufficient number of changes have been included developers feel, that a sufficient number of changes have been included
and all post-merge testing has been successful. These feature releases are and all post-merge testing has been successful. These feature releases are
marked with a `patch_<version date>` tag and the "release" branch marked with a `patch_<version date>` tag and the "release" branch
@ -147,7 +149,8 @@ only contain bug fixes, feature additions to peripheral functionality,
and documentation updates. In between stable releases, bug fixes and and documentation updates. In between stable releases, bug fixes and
infrastructure updates are back-ported from the "develop" branch to the infrastructure updates are back-ported from the "develop" branch to the
"maintenance" branch and occasionally merged into "stable" and published "maintenance" branch and occasionally merged into "stable" and published
as update releases. as update releases. Further explanation of LAMMPS versions can be found
[in the documentation](https://docs.lammps.org/Manual_version.html).
## Project Management ## Project Management

View File

@ -16,8 +16,11 @@ clean:
rm -f $(IMGSVG) $(IMGPDF) $(IMGPNG) *~ rm -f $(IMGSVG) $(IMGPDF) $(IMGPNG) *~
ifeq ($(HAS_DOT),YES) ifeq ($(HAS_DOT),YES)
$(IMGDIR)/%.png: %.dot $(IMGDIR)/lammps-classes.png : lammps-classes.dot
dot -Tpng -Kneato -o $@ $< dot -Tpng -Kneato -o $@ $<
$(IMGDIR)/%.png: %.dot
dot -Tpng -Kdot -o $@ $<
endif endif
ifeq ($(HAS_DOT),NO) ifeq ($(HAS_DOT),NO)

View File

@ -0,0 +1,34 @@
// LAMMPS branches and releases
digraph releases {
rankdir="LR";
github [shape="box" label="Pull Requests\non GitHub" height=0.75];
github -> develop [label="Merge commits"];
{
rank = "same";
work [shape="none" label="Development branches:"]
develop [label="'develop' branch" height=0.75];
maintenance [label="'maintenance' branch" height=0.75];
};
{
rank = "same";
upload [shape="none" label="Release branches:"]
release [label="'release' branch" height=0.75];
stable [label="'stable' branch" height=0.75];
};
develop -> release [label="Feature release\n(every 4-8 weeks)"];
release -> stable [label="Stable release\n(once per year)"];
stable -> maintenance [label="Reset on stable release" style="setlinewidth(2)"];
develop -> maintenance [label="Backports of bugfixes" style="dashed"];
maintenance -> stable [label="Updates to stable release"];
{
rank = "same";
tag [shape="none" label="Applied tags:"];
patchtag [shape="box" label="patch_<date>"];
stabletag [shape="box" label="stable_<date>"];
updatetag [shape="box" label="stable_<date>_update<num>"];
};
release -> patchtag [label="feature release" style="dotted"];
stable -> stabletag [label="stable release" style="dotted"];
stable -> updatetag [label="update release" style="dotted"];
}

View File

@ -1,7 +1,7 @@
.TH LAMMPS "1" "15 June 2023" "2023-06-15" .TH LAMMPS "1" "19 November 2024" "2024-11-19"
.SH NAME .SH NAME
.B LAMMPS .B LAMMPS
\- Molecular Dynamics Simulator. Version 15 June 2023 \- Molecular Dynamics Simulator. Version 19 November 2024
.SH SYNOPSIS .SH SYNOPSIS
.B lmp .B lmp
@ -226,6 +226,20 @@ arguments of the "dump" command. See the
.B LAMMPS .B LAMMPS
manual for details on either of the two commands. manual for details on either of the two commands.
.TP .TP
\fB\-r2info <restart file> <keyword> ...\fR or
\fB\-restart2info <restart file> <keyword> ...\fR
Write information about the <restart file> previously written by
.B LAMMPS
to the screen and immediately exit. Following <restart file>
argument, additional keywords for the
.B LAMMPS
"info" command may be added to increase the amount of information
written. By default "system" "group" "fix" "compute" are already
set. See the
.B LAMMPS
manual for details on the "info" command.
.TP
.TP
\fB\-sc <file name>\fR or \fB\-screen <file name>\fR \fB\-sc <file name>\fR or \fB\-screen <file name>\fR
Specify a file for Specify a file for
.B LAMMPS .B LAMMPS
@ -297,7 +311,7 @@ the chapter on errors in the
manual gives some additional information about error messages, if possible. manual gives some additional information about error messages, if possible.
.SH COPYRIGHT .SH COPYRIGHT
© 2003--2022 Sandia Corporation © 2003--2024 Sandia Corporation
This package is free software; you can redistribute it and/or modify This package is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2 as it under the terms of the GNU General Public License version 2 as

View File

@ -1,4 +1,4 @@
.TH MSI2LMP "1" "v3.9.10" "2023-03-10" .TH MSI2LMP "1" "v3.9.11" "2024-09-06"
.SH NAME .SH NAME
.B MSI2LMP .B MSI2LMP
\- Converter for Materials Studio files to LAMMPS \- Converter for Materials Studio files to LAMMPS
@ -101,7 +101,7 @@ msi2lmp decane -c 0 -f oplsaa
.SH COPYRIGHT .SH COPYRIGHT
© 2003--2022 Sandia Corporation © 2003--2024 Sandia Corporation
This package is free software; you can redistribute it and/or modify This package is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2 as it under the terms of the GNU General Public License version 2 as

View File

@ -1,6 +1,12 @@
Bibliography Bibliography
************ ************
**(Abascal1)**
Abascal, Sanz, Fernandez, Vega, J Chem Phys, 122, 234511 (2005)
**(Abascal2)**
Abascal, J Chem Phys, 123, 234505 (2005)
**(Ackland)** **(Ackland)**
Ackland, Jones, Phys Rev B, 73, 054104 (2006). Ackland, Jones, Phys Rev B, 73, 054104 (2006).
@ -22,21 +28,24 @@ Bibliography
**(Agnolin and Roux 2007)** **(Agnolin and Roux 2007)**
Agnolin, I. & Roux, J-N. (2007). Internal states of model isotropic granular packings. I. Assembling process, geometry, and contact networks. Phys. Rev. E, 76, 061302. Agnolin, I. & Roux, J-N. (2007). Internal states of model isotropic granular packings. I. Assembling process, geometry, and contact networks. Phys. Rev. E, 76, 061302.
**(Ahrens-Iwers2022)**
Ahrens-Iwers *et al.*, J. Chem. Phys. 157, 084801 (2022).
**(Ahrens-Iwers)**
Ahrens-Iwers and Meissner, J. Chem. Phys. 155, 104104 (2021).
**(Aktulga)** **(Aktulga)**
Aktulga, Fogarty, Pandit, Grama, Parallel Computing, 38, 245-259 (2012). Aktulga, Fogarty, Pandit, Grama, Parallel Computing, 38, 245-259 (2012).
**(Albe)** **(Albe)**
J.\ Nord, K. Albe, P. Erhart, and K. Nordlund, J. Phys.: Condens. Matter, 15, 5649(2003). J.\ Nord, K. Albe, P. Erhart, and K. Nordlund, J. Phys.: Condens. Matter, 15, 5649(2003).
**(Albe)** **(Albe1)**
K.\ Albe, K. Nordlund, J. Nord, and A. Kuronen, Phys. Rev. B, 66, 035205 (2002). K.\ Albe, K. Nordlund, J. Nord, and A. Kuronen, Phys. Rev. B, 66, 035205 (2002).
**(Allen)** **(Allen)**
Allen and Germano, Mol Phys 104, 3225-3235 (2006). Allen and Germano, Mol Phys 104, 3225-3235 (2006).
**(Allen)**
Allen and Tildesley, Computer Simulation of Liquids, Clarendon Press, Oxford, 1987.
**(AllenTildesley)** **(AllenTildesley)**
Allen and Tildesley, Computer Simulation of Liquids, Oxford University Press (1987) Allen and Tildesley, Computer Simulation of Liquids, Oxford University Press (1987)
@ -49,6 +58,9 @@ Bibliography
**(Anderson)** **(Anderson)**
Anderson, Mukherjee, Critchley, Ziegler, and Lipton "POEMS: Parallelizable Open-source Efficient Multibody Software ", Engineering With Computers (2006). Anderson, Mukherjee, Critchley, Ziegler, and Lipton "POEMS: Parallelizable Open-source Efficient Multibody Software ", Engineering With Computers (2006).
**(Appshaw)**
Appshaw, Seddon, Hanna, Soft. Matter,18, 1747(2022).
**(Avendano)** **(Avendano)**
C.\ Avendano, T. Lafitte, A. Galindo, C. S. Adjiman, G. Jackson, E. Muller, J Phys Chem B, 115, 11154 (2011). C.\ Avendano, T. Lafitte, A. Galindo, C. S. Adjiman, G. Jackson, E. Muller, J Phys Chem B, 115, 11154 (2011).
@ -58,7 +70,7 @@ Bibliography
**(Babadi)** **(Babadi)**
Babadi, Ejtehadi, Everaers, J Comp Phys, 219, 770-779 (2006). Babadi, Ejtehadi, Everaers, J Comp Phys, 219, 770-779 (2006).
**(Babadi)** **(Babadi2)**
Babadi and Ejtehadi, EPL, 77 (2007) 23002. Babadi and Ejtehadi, EPL, 77 (2007) 23002.
**(Baczewski)** **(Baczewski)**
@ -73,23 +85,23 @@ Bibliography
**(Ballenegger)** **(Ballenegger)**
Ballenegger, Arnold, Cerda, J Chem Phys, 131, 094107 (2009). Ballenegger, Arnold, Cerda, J Chem Phys, 131, 094107 (2009).
**(Banna)**
Volkov, Banna, Comp. Mater. Sci. 176, 109410 (2020).
**(Barrat)** **(Barrat)**
Barrat and Rodney, J. Stat. Phys, 144, 679 (2011). Barrat and Rodney, J. Stat. Phys, 144, 679 (2011).
**(Barrett)** **(Barrett)**
Barrett, Tschopp, El Kadiri, Scripta Mat. 66, p.666 (2012). Barrett, Tschopp, El Kadiri, Scripta Mat. 66, p.666 (2012).
**(Barros)**
Barros, Sinkovits, Luijten, J. Chem. Phys, 140, 064903 (2014)
**(Bartok)** **(Bartok)**
Bartok, Payne, Risi, Csanyi, Phys Rev Lett, 104, 136403 (2010). Bartok, Payne, Risi, Csanyi, Phys Rev Lett, 104, 136403 (2010).
**(Bartok2010)** **(Bartok2010)**
Bartok, Payne, Risi, Csanyi, Phys Rev Lett, 104, 136403 (2010). Bartok, Payne, Risi, Csanyi, Phys Rev Lett, 104, 136403 (2010).
**(Bartok_2010)** **(Bartok2013)**
AP Bartok, MC Payne, R Kondor, and G Csanyi, Physical Review Letters 104, 136403 (2010). Bartok, Kondor, Csanyi, Phys Rev B, 87, 184115 (2013).
**(Bartok_PhD)** **(Bartok_PhD)**
A Bartok-Partay, PhD Thesis, University of Cambridge, (2010). A Bartok-Partay, PhD Thesis, University of Cambridge, (2010).
@ -97,36 +109,51 @@ Bibliography
**(Baskes)** **(Baskes)**
Baskes, Phys Rev B, 46, 2727-2742 (1992). Baskes, Phys Rev B, 46, 2727-2742 (1992).
**(Baskes2)**
Baskes, Phys Rev B, 75, 094113 (2007).
**(Beck)** **(Beck)**
Beck, Molecular Physics, 14, 311 (1968). Beck, Molecular Physics, 14, 311 (1968).
**(Becton)**
Becton, Averett, Wang, Biomech. Model. Mechanobiology, 18, 425-433(2019).
**(Behler and Parrinello 2007)**
Behler, J.; Parrinello, M. Phys. Rev. Lett. 2007, 98 (14), 146401.
**(Bennet)** **(Bennet)**
Bennet, J Comput Phys, 22, 245 (1976) Bennet, J Comput Phys, 22, 245 (1976)
**(Berardi)** **(Berardi)**
Berardi, Fava, Zannoni, Chem Phys Lett, 297, 8-14 (1998). Berardi, Muccioli, Zannoni, J Chem Phys, 128, 024905 (2008). Berardi, Fava, Zannoni, Chem Phys Lett, 297, 8-14 (1998). Berardi, Muccioli, Zannoni, J Chem Phys, 128, 024905 (2008).
**(Berendsen)**
Berendsen, Grigera, Straatsma, J Phys Chem, 91, 6269-6271 (1987).
**(Berendsen)** **(Berendsen)**
Berendsen, Postma, van Gunsteren, DiNola, Haak, J Chem Phys, 81, 3684 (1984). Berendsen, Postma, van Gunsteren, DiNola, Haak, J Chem Phys, 81, 3684 (1984).
**(Berendsen2)**
Berendsen, Grigera, Straatsma, J Phys Chem, 91, 6269-6271 (1987).
**(Bessarab)** **(Bessarab)**
Bessarab, Uzdin, Jonsson, Comp Phys Comm, 196, 335-347 (2015). Bessarab, Uzdin, Jonsson, Comp Phys Comm, 196, 335-347 (2015).
**(Beutler)** **(Beutler)**
Beutler, Mark, van Schaik, Gerber, van Gunsteren, Chem Phys Lett, 222, 529 (1994). Beutler, Mark, van Schaik, Gerber, van Gunsteren, Chem Phys Lett, 222, 529 (1994).
**(Bialke)**
J.\ Bialke, T. Speck, and H Loewen, Phys. Rev. Lett. 108, 168301, 2012.
**(Bird)** **(Bird)**
G.\ A. Bird, "Molecular Gas Dynamics and the Direct Simulation of Gas Flows" (1994). G.\ A. Bird, "Molecular Gas Dynamics and the Direct Simulation of Gas Flows" (1994).
**(Bitzek)** **(Bitzek)**
Bitzek, Koskinen, Gahler, Moseler, Gumbsch, Phys Rev Lett, 97, 170201 (2006). Bitzek, Koskinen, Gahler, Moseler, Gumbsch, Phys Rev Lett, 97, 170201 (2006).
**(Bolintineanu1)**
Bolintineanu, Lechman, Plimpton, Grest, Phys Rev E, 86, 066703 (2012).
**(Bolintineanu2)**
Bolintineanu, Grest, Lechman, Pierce, Plimpton, Schunk, Comp Particle Mechanics, 1, 321-356 (2014).
**(Bomont)**
Bomont, Bretonnet, J. Chem. Phys. 124, 054504 (2006).
**(Bond)** **(Bond)**
Bond and Leimkuhler, SIAM J Sci Comput, 30, p 134 (2007). Bond and Leimkuhler, SIAM J Sci Comput, 30, p 134 (2007).
@ -134,7 +161,7 @@ Bibliography
Boone, Babaei, Wilmer, J Chem Theory Comput, 15, 5579--5587 (2019). Boone, Babaei, Wilmer, J Chem Theory Comput, 15, 5579--5587 (2019).
**(BoreschKarplus)** **(BoreschKarplus)**
Boresch and Karplus, J Phys Chem A, 103, 103 (1999) Boresch and Karplus, J Phys Chem A, 103, 103 (1999).
**(Botu1)** **(Botu1)**
V.\ Botu and R. Ramprasad, Int. J. Quant. Chem., 115(16), 1074 (2015). V.\ Botu and R. Ramprasad, Int. J. Quant. Chem., 115(16), 1074 (2015).
@ -169,8 +196,11 @@ Bibliography
**(Buck)** **(Buck)**
Buck, Bouguet-Bonnet, Pastor, MacKerell Jr., Biophys J, 90, L36 (2006). Buck, Bouguet-Bonnet, Pastor, MacKerell Jr., Biophys J, 90, L36 (2006).
**(Bulacu)**
Bulacu, Goga, Zhao, Rossi, Monticelli, Periole, Tieleman, Marrink, J Chem Theory Comput, 9, 3282-3292
**(Bussi)** **(Bussi)**
G.\ Bussi, M. Parrinello, Phs. Rev. E 75, 056707 (2007) G. Bussi, T. Zykova-Timan, M. Parrinello, J Chem Phys, 130, 074101 (2009).
**(Bussi1)** **(Bussi1)**
Bussi, Donadio and Parrinello, J. Chem. Phys. 126, 014101(2007) Bussi, Donadio and Parrinello, J. Chem. Phys. 126, 014101(2007)
@ -178,20 +208,20 @@ Bibliography
**(Bussi2)** **(Bussi2)**
Bussi and Parrinello, Phys. Rev. E 75, 056707 (2007) Bussi and Parrinello, Phys. Rev. E 75, 056707 (2007)
**(COMB)** **(COMB_1)**
J.\ Yu, S. B. Sinnott, S. R. Phillpot, Phys Rev B, 75, 085311 (2007),
**(COMB_2)**
T.-R. Shan, B. D. Devine, T. W. Kemper, S. B. Sinnott, and S. R. Phillpot, Phys. Rev. B 81, 125328 (2010) T.-R. Shan, B. D. Devine, T. W. Kemper, S. B. Sinnott, and S. R. Phillpot, Phys. Rev. B 81, 125328 (2010)
**(COMB3)** **(COMB3)**
T.\ Liang, T.-R. Shan, Y.-T. Cheng, B. D. Devine, M. Noordhoek, Y. Li, Z. Lu, S. R. Phillpot, and S. B. Sinnott, Mat. Sci. & Eng: R 74, 255-279 (2013). T.\ Liang, T.-R. Shan, Y.-T. Cheng, B. D. Devine, M. Noordhoek, Y. Li, Z. Lu, S. R. Phillpot, and S. B. Sinnott, Mat. Sci. & Eng: R 74, 255-279 (2013).
**(COMB_1)**
J.\ Yu, S. B. Sinnott, S. R. Phillpot, Phys Rev B, 75, 085311 (2007),
**(Calhoun)** **(Calhoun)**
A.\ Calhoun, M. Pavese, G. Voth, Chem Phys Letters, 262, 415 (1996). A.\ Calhoun, M. Pavese, G. Voth, Chem Phys Letters, 262, 415 (1996).
**(Campana)** **(Campana)**
C.\ Campana and M. H. Muser, *Practical Green's function approach to the simulation of elastic semi-infinite solids*, `Phys. Rev. B [74], 075420 (2006) <https://doi.org/10.1103/PhysRevB.74.075420>`_ C.\ Campana and M. H. Muser, Phys. Rev. B [74], 075420 (2006).
**(Cao1)** **(Cao1)**
J.\ Cao and B. Berne, J Chem Phys, 99, 2902 (1993). J.\ Cao and B. Berne, J Chem Phys, 99, 2902 (1993).
@ -203,7 +233,7 @@ Bibliography
A Caro, DA Crowson, M Caro; Phys Rev Lett, 95, 075702 (2005) A Caro, DA Crowson, M Caro; Phys Rev Lett, 95, 075702 (2005)
**(CasP)** **(CasP)**
CasP webpage: https://www.helmholtz-berlin.de/people/gregor-schiwietz/casp_en.html CasP webpage: http://www.casp-program.org/
**(Cawkwell2012)** **(Cawkwell2012)**
A.\ M. N. Niklasson, M. J. Cawkwell, Phys. Rev. B, 86 (17), 174308 (2012). A.\ M. N. Niklasson, M. J. Cawkwell, Phys. Rev. B, 86 (17), 174308 (2012).
@ -215,6 +245,9 @@ Bibliography
Cerda, Ballenegger, Lenz, Holm, J Chem Phys 129, 234104 (2008) Cerda, Ballenegger, Lenz, Holm, J Chem Phys 129, 234104 (2008)
**(Ceriotti)** **(Ceriotti)**
M. Ceriotti, M. Parrinello, T. Markland, D. Manolopoulos, J. Chem. Phys. 133, 124104 (2010).
**(Ceriotti1)**
Ceriotti, Bussi and Parrinello, J Chem Theory Comput 6, 1170-80 (2010) Ceriotti, Bussi and Parrinello, J Chem Theory Comput 6, 1170-80 (2010)
**(Ceriotti2)** **(Ceriotti2)**
@ -232,6 +265,18 @@ Bibliography
**(Clarke)** **(Clarke)**
Clarke and Smith, J Chem Phys, 84, 2290 (1986). Clarke and Smith, J Chem Phys, 84, 2290 (1986).
**(Clavier)**
G. Clavier, N. Desbiens, E. Bourasseau, V. Lachet, N. Brusselle-Dupend and B. Rousseau, Mol Sim, 43, 1413 (2017).
**(Clemmer)**
Clemmer and Robbins, Phys. Rev. Lett. (2022).
**(Clemmer1)**
Clemmer, Monti, Lechman, Soft Matter, 20, 1702 (2024).
**(Clemmer2)**
Clemmer, Pierce, O'Connor, Nevins, Jones, Lechman, Tencer, Appl. Math. Model., 130, 310-326 (2024).
**(Coleman)** **(Coleman)**
Coleman, Spearot, Capolungo, MSMSE, 21, 055020 (2013). Coleman, Spearot, Capolungo, MSMSE, 21, 055020 (2013).
@ -244,8 +289,17 @@ Bibliography
**(Cornell)** **(Cornell)**
Cornell, Cieplak, Bayly, Gould, Merz, Ferguson, Spellmeyer, Fox, Caldwell, Kollman, JACS 117, 5179-5197 (1995). Cornell, Cieplak, Bayly, Gould, Merz, Ferguson, Spellmeyer, Fox, Caldwell, Kollman, JACS 117, 5179-5197 (1995).
**(Cundall, 1987)**
Cundall, P. A. Distinct Element Models of Rock and Soil
**(Curk1)**
T. Curk, J. Yuan, and E. Luijten, JCP 156 (2022).
**(Curk2)**
T. Curk and E. Luijten, PRL 126 (2021)
**(Cusentino)** **(Cusentino)**
Cusentino, Wood, and Thompson, J Phys Chem A, xxx, xxxxx, (2020) Cusentino, Wood, Thompson, J Phys Chem A, 124, 5456, (2020)
**(Daivis and Todd)** **(Daivis and Todd)**
Daivis and Todd, J Chem Phys, 124, 194103 (2006). Daivis and Todd, J Chem Phys, 124, 194103 (2006).
@ -268,6 +322,15 @@ Bibliography
**(Daw2)** **(Daw2)**
M.\ S. Daw, and M. I. Baskes, Phys. Rev. B, 29, 6443 (1984). M.\ S. Daw, and M. I. Baskes, Phys. Rev. B, 29, 6443 (1984).
**(de Buyl)**
de Buyl, Colberg and Hofling, Comp. Phys. Comm. 185(6), 1546-1553 (2014) -
**(Deissenbeck)**
Deissenbeck *et al.*, Phys. Rev. Letters 126, 136803 (2021).
**(de Koning)**
de Koning and Antonelli, Phys Rev E, 53, 465 (1996).
**(DeVane)** **(DeVane)**
Shinoda, DeVane, Klein, Soft Matter, 4, 2453-2462 (2008). Shinoda, DeVane, Klein, Soft Matter, 4, 2453-2462 (2008).
@ -277,12 +340,24 @@ Bibliography
**(Destree)** **(Destree)**
M.\ Destree, F. Laupretre, A. Lyulin, and J.-P. Ryckaert, J Chem Phys, 112, 9632 (2000). M.\ Destree, F. Laupretre, A. Lyulin, and J.-P. Ryckaert, J Chem Phys, 112, 9632 (2000).
**(Dickel)**
Dickel, Francis, and Barrett, Computational Materials Science 171 (2020): 109157.
**(Dietz)**
Dietz and Hoy, J. Chem Phys, 156, 014103 (2022).
**(Dobson)** **(Dobson)**
Dobson, J Chem Phys, 141, 184103 (2014). Dobson, J Chem Phys, 141, 184103 (2014).
**(Drautz)**
Drautz, Phys Rev B, 99, 014104 (2019).
**(Duffy)** **(Duffy)**
D M Duffy and A M Rutherford, J. Phys.: Condens. Matter, 19, 016207-016218 (2007). D M Duffy and A M Rutherford, J. Phys.: Condens. Matter, 19, 016207-016218 (2007).
**(Dufils)**
Dufils *et al.*, Phys. Rev. Letters 123, 195501 (2019).
**(Dullweber)** **(Dullweber)**
Dullweber, Leimkuhler and McLachlan, J Chem Phys, 107, 5840 (1997). Dullweber, Leimkuhler and McLachlan, J Chem Phys, 107, 5840 (1997).
@ -295,6 +370,9 @@ Bibliography
**(Dunweg)** **(Dunweg)**
Dunweg and Paul, Int J of Modern Physics C, 2, 817-27 (1991). Dunweg and Paul, Int J of Modern Physics C, 2, 817-27 (1991).
**(EcheverriRestrepo)**
Echeverri Restrepo, Andric, Comput Mater Sci, 218, 111978 (2023).
**(EDIP)** **(EDIP)**
J F Justo et al, Phys Rev B 58, 2539 (1998). J F Justo et al, Phys Rev B 58, 2539 (1998).
@ -304,12 +382,21 @@ Bibliography
**(Elliott)** **(Elliott)**
Elliott, Tadmor and Bernstein, `https://openkim.org/kim-api <https://openkim.org/kim-api>`_ (2011) doi: `https://doi.org/10.25950/FF8F563A <https://doi.org/10.25950/FF8F563A>`_ Elliott, Tadmor and Bernstein, `https://openkim.org/kim-api <https://openkim.org/kim-api>`_ (2011) doi: `https://doi.org/10.25950/FF8F563A <https://doi.org/10.25950/FF8F563A>`_
**(Ellis)**
Ellis, Fiedler, Popoola, Modine, Stephens, Thompson, Cangi, Rajamanickam, Phys Rev B, 104, 035120, (2021)
**(Emmrich)**
Emmrich, Weckner, Commun. Math. Sci., 5, 851-864 (2007),
**(Elstner)** **(Elstner)**
M.\ Elstner, D. Poresag, G. Jungnickel, J. Elsner, M. Haugk, T. Frauenheim, S. Suhai, and G. Seifert, Phys. Rev. B, 58, 7260 (1998). M.\ Elstner, D. Poresag, G. Jungnickel, J. Elsner, M. Haugk, T. Frauenheim, S. Suhai, and G. Seifert, Phys. Rev. B, 58, 7260 (1998).
**(Erdmann)** **(Erdmann)**
U.\ Erdmann , W. Ebeling, L. Schimansky-Geier, and F. Schweitzer, Eur. Phys. J. B 15, 105-113, 2000. U.\ Erdmann , W. Ebeling, L. Schimansky-Geier, and F. Schweitzer, Eur. Phys. J. B 15, 105-113, 2000.
**(Eshelby)**
J.D. Eshelby, Philos. Trans. Royal Soc. London A, Math. Phys. Sci., Vol. 244, No. 877 (1951) pp. 87-112; J. Elasticity, Vol. 5, Nos. 3-4 (1975) pp. 321-335]
**(Espanol and Revenga)** **(Espanol and Revenga)**
Espanol, Revenga, Physical Review E, 67, 026705 (2003). Espanol, Revenga, Physical Review E, 67, 026705 (2003).
@ -328,9 +415,18 @@ Bibliography
**(Faken)** **(Faken)**
Faken, Jonsson, Comput Mater Sci, 2, 279 (1994). Faken, Jonsson, Comput Mater Sci, 2, 279 (1994).
**(Falk)**
Falk and Langer PRE, 57, 7192 (1998).
**(Fath)** **(Fath)**
Fath, Hochbruck, Singh, J Comp Phys, 333, 180-198 (2017). Fath, Hochbruck, Singh, J Comp Phys, 333, 180-198 (2017).
**(Feng1)**
Z. Feng, ..., and W. Ouyang, J. Phys. Chem. C. 127(18), 8704-8713 (2023).
**(Feng2)**
Z. Feng, ..., and W. Ouyang, Langmuir 39(50), 18198-18207 (2023).
**(Fennell)** **(Fennell)**
C.\ J. Fennell, J. D. Gezelter, J Chem Phys, 124, 234104 (2006). C.\ J. Fennell, J. D. Gezelter, J Chem Phys, 124, 234104 (2006).
@ -367,18 +463,36 @@ Bibliography
**(Frenkel)** **(Frenkel)**
Frenkel and Smit, Understanding Molecular Simulation, Academic Press, London, 2002. Frenkel and Smit, Understanding Molecular Simulation, Academic Press, London, 2002.
**(GLE4MD)** **(Fu)**
`https://gle4md.org/ <https://gle4md.org/>`_ Fu, Peng, Yuan, Kfoury, Young, Comput. Phys. Commun, 210, 193-203(2017).
**(Gao)** **(Gao)**
Gao and Weber, Nuclear Instruments and Methods in Physics Research B 191 (2012) 504. Gao and Weber, Nuclear Instruments and Methods in Physics Research B 191 (2012) 504.
**(Gingrich)**
Gingrich, `MSc thesis` <https://gingrich.chem.northwestern.edu/papers/ThesiswCorrections.pdf>` (2010).
**(Gissinger2017)**
Gissinger, Jensen and Wise, Polymer, 128, 211-217 (2017).
**(Gissinger2020)**
Gissinger, Jensen and Wise, Macromolecules, 53, 22, 9953-9961 (2020).
**(Gissinger)** **(Gissinger)**
Gissinger, Jensen and Wise, Polymer, 128, 211 (2017). Jacob R. Gissinger, Scott R. Zavada, Joseph G. Smith, Josh Kemppainen, Ivan Gallegos, Gregory M. Odegard, Emilie J. Siochi, and Kristopher E. Wise, Carbon, 202, 336-347 (2023).
**(Gissinger2024)**
J. R. Gissinger, I. Nikiforov, Y. Afshar, B. Waters, M. Choi, D. S. Karls, A. Stukowski, W. Im, H. Heinz, A. Kohlmeyer, and E. B. Tadmor, J Phys Chem B, 128, 3282-3297 (2024).
**(Gloor)**
Gloor, J Chem Phys, 123, 134703 (2005)
**(Glosli)** **(Glosli)**
Glosli, unpublished, 2005. Streitz, Glosli, Patel, Chan, Yates, de Supinski, Sexton and Gunnels, Journal of Physics: Conference Series, 46, 254 (2006). Glosli, unpublished, 2005. Streitz, Glosli, Patel, Chan, Yates, de Supinski, Sexton and Gunnels, Journal of Physics: Conference Series, 46, 254 (2006).
**(Goff)**
Goff, Zhang, Negre, Rohskopf, Niklasson, Journal of Chemical Theory and Computation 19, no. 13 (2023).
**(Goldman1)** **(Goldman1)**
Goldman, Reed and Fried, J. Chem. Phys. 131, 204103 (2009) Goldman, Reed and Fried, J. Chem. Phys. 131, 204103 (2009)
@ -412,6 +526,9 @@ Bibliography
**(Guo)** **(Guo)**
Guo and Thirumalai, Journal of Molecular Biology, 263, 323-43 (1996). Guo and Thirumalai, Journal of Molecular Biology, 263, 323-43 (1996).
**(Gupta)**
Gupta ,Phys Rev. B, 23, 6265-6270 (1981).
**(Hardy)** **(Hardy)**
David Hardy thesis: Multilevel Summation for the Fast Evaluation of Forces for the Simulation of Biomolecules, University of Illinois at Urbana-Champaign, (2006). David Hardy thesis: Multilevel Summation for the Fast Evaluation of Forces for the Simulation of Biomolecules, University of Illinois at Urbana-Champaign, (2006).
@ -433,6 +550,9 @@ Bibliography
**(Henrich)** **(Henrich)**
O.\ Henrich, Y. A. Gutierrez-Fosado, T. Curk, T. E. Ouldridge, Eur. Phys. J. E 41, 57 (2018). O.\ Henrich, Y. A. Gutierrez-Fosado, T. Curk, T. E. Ouldridge, Eur. Phys. J. E 41, 57 (2018).
**(Herman)**
M. F. Herman, E. J. Bruskin, B. J. Berne, J Chem Phys, 76, 5150 (1982).
**(Hess)** **(Hess)**
Hess, B. The Journal of Chemical Physics 2002, 116 (1), 209-217. Hess, B. The Journal of Chemical Physics 2002, 116 (1), 209-217.
@ -454,24 +574,42 @@ Bibliography
**(Hoover)** **(Hoover)**
Hoover, Phys Rev A, 31, 1695 (1985). Hoover, Phys Rev A, 31, 1695 (1985).
**(Huang)**
Huang, Zhang, Yuan, Gao, Zhang, Nano Lett. 13, 4546(2013).
**(Huang2014)**
X. Huang, "Exploring critical-state behavior using DEM", Doctoral dissertation, Imperial College. (2014). https://doi.org/10.25560/25316
**(Hu)**
Hu, and Adams J. Comp. Physics, 213, 844-861 (2006).
**(Hu)**
Hu, J. Chem. Theory Comput. 10, 5254 (2014).
**(Hummer)** **(Hummer)**
Hummer, Gronbech-Jensen, Neumann, J Chem Phys, 109, 2791 (1998) Hummer, Gronbech-Jensen, Neumann, J Chem Phys, 109, 2791 (1998)
**(Hunt)** **(Hunt)**
Hunt, Mol Simul, 42, 347 (2016). Hunt, Mol Simul, 42, 347 (2016).
**(Ikeshoji)**
Ikeshoji and Hafskjold, Molecular Physics, 81, 251-261 (1994).
**(Ikeshoji2)**
Ikeshoji, Hafskjold, Furuholt, Mol Sim, 29, 101-109, (2003).
**(Ilie)**
Ilie, Briels, den Otter, Journal of Chemical Physics, 142, 114103 (2015).
**(In 't Veld)**
In 't Veld, Ismail, Grest, J Chem Phys (accepted) (2007).
**(IPI)** **(IPI)**
`https://ipi-code.org/ <https://ipi-code.org/>` `https://ipi-code.org/ <https://ipi-code.org/>`
**(IPI-CPC)** **(IPI-CPC)**
Ceriotti, More and Manolopoulos, Comp Phys Comm, 185, 1019-1026 (2014). Ceriotti, More and Manolopoulos, Comp Phys Comm, 185, 1019-1026 (2014).
**(Ikeshoji)**
Ikeshoji and Hafskjold, Molecular Physics, 81, 251-261 (1994).
**(In 't Veld)**
In 't Veld, Ismail, Grest, J Chem Phys (accepted) (2007).
**(Isele-Holder)** **(Isele-Holder)**
Isele-Holder, Mitchell, Ismail, J Chem Phys, 137, 174107 (2012). Isele-Holder, Mitchell, Ismail, J Chem Phys, 137, 174107 (2012).
@ -490,6 +628,9 @@ Bibliography
**(Izvekov)** **(Izvekov)**
Izvekov, Voth, J Chem Phys 123, 134105 (2005). Izvekov, Voth, J Chem Phys 123, 134105 (2005).
**(Jadhao)**
Jadhao, Solis, Olvera de la Cruz, J Chem Phys, 138, 054119 (2013)
**(Janssens)** **(Janssens)**
Janssens, Olmsted, Holm, Foiles, Plimpton, Derlet, Nature Materials, 5, 124-127 (2006). Janssens, Olmsted, Holm, Foiles, Plimpton, Derlet, Nature Materials, 5, 124-127 (2006).
@ -502,6 +643,15 @@ Bibliography
**(Jiang)** **(Jiang)**
Jiang, Hardy, Phillips, MacKerell, Schulten, and Roux, J Phys Chem Lett, 2, 87-92 (2011). Jiang, Hardy, Phillips, MacKerell, Schulten, and Roux, J Phys Chem Lett, 2, 87-92 (2011).
**(Jiang1)**
Jiang, Hardy, Phillips, MacKerell, Schulten, and Roux, J Phys Chem Lett, 2, 87-92 (2011).
**(Jiang2)**
J.-W. Jiang, Nanotechnology 26, 315706 (2015).
**(Jiang3)**
J.-W. Jiang, Acta Mech. Solida. Sin 32, 17 (2019).
**(Johnson et al, 1971)** **(Johnson et al, 1971)**
Johnson, K. L., Kendall, K., & Roberts, A. D. (1971). Surface energy and the contact of elastic solids. Proc. R. Soc. Lond. A, 324(1558), 301-313. Johnson, K. L., Kendall, K., & Roberts, A. D. (1971). Surface energy and the contact of elastic solids. Proc. R. Soc. Lond. A, 324(1558), 301-313.
@ -562,27 +712,33 @@ Bibliography
**(Kumar)** **(Kumar)**
Kumar and Skinner, J. Phys. Chem. B, 112, 8311 (2008) Kumar and Skinner, J. Phys. Chem. B, 112, 8311 (2008)
**(Lafourcade)**
Lafourcade, Maillet, Denoual, Duval, Allera, Goryaeva, and Marinica, `Comp. Mat. Science, 230, 112534 (2023) <https://doi.org/10.1016/j.commatsci.2023.112534>`_
**(Lamoureux and Roux)** **(Lamoureux and Roux)**
G.\ Lamoureux, B. Roux, J. Chem. Phys 119, 3025 (2003) G.\ Lamoureux, B. Roux, J. Chem. Phys 119, 3025 (2003)
**(Lamoureux)** **(Lamoureux)**
Lamoureux and Roux, J Chem Phys, 119, 3025-3039 (2003). Lamoureux and Roux, J Chem Phys, 119, 3025-3039 (2003).
**(Larentzos)** **(Landsgesell)**
J.P. Larentzos, J.K. Brennan, J.D. Moore, and W.D. Mattson, "LAMMPS Implementation of Constant Energy Dissipative Particle Dynamics (DPD-E)", ARL-TR-6863, U.S. Army Research J. Landsgesell, P. Hebbeker, O. Rud, R. Lunkad, P. Kosovan, and C. Holm, Macromolecules 53, 3007-3020 (2020).
**(Larentzos1)** **(Larentzos1)**
J.P. Larentzos, J.K. Brennan, J.D. Moore, M. Lisal and W.D. Mattson, "Parallel Implementation of Isothermal and Isoenergetic Dissipative Particle Dynamics Using Shardlow-Like Splitting J.P. Larentzos, J.K. Brennan, J.D. Moore, M. Lisal and W.D. Mattson, Comput. Phys. Commun., 185, 1987-1998 (2014).
**(Larentzos2)** **(Larentzos2)**
J.P. Larentzos, J.K. Brennan, J.D. Moore, and W.D. Mattson, "LAMMPS Implementation of Constant Energy Dissipative Particle Dynamics (DPD-E)", ARL-TR-6863, U.S. Army Research J.P. Larentzos, J.K. Brennan, J.D. Moore, and W.D. Mattson, ARL-TR-6863, U.S. Army Research Laboratory, Aberdeen Proving Ground, MD (2014).
**(Larsen)** **(Larsen)**
Larsen, Schmidt, Schiotz, Modelling Simul Mater Sci Eng, 24, 055007 (2016). Larsen, Schmidt, Schiotz, Modelling Simul Mater Sci Eng, 24, 055007 (2016).
**(Lebedeva et al.)** **(Lebedeva1)**
I.\ V. Lebedeva, A. A. Knizhnik, A. M. Popov, Y. E. Lozovik, B. V. Potapkin, Phys. Rev. B, 84, 245437 (2011) I.\ V. Lebedeva, A. A. Knizhnik, A. M. Popov, Y. E. Lozovik, B. V. Potapkin, Phys. Rev. B, 84, 245437 (2011)
**(Lebedeva2)**
I. V. Lebedeva, A. A. Knizhnik, A. M. Popov, Y. E. Lozovik, B. V. Potapkin, Physica E: 44, 949-954 (2012)
**(Lechman)** **(Lechman)**
Lechman, et al, in preparation (2010). Lechman, et al, in preparation (2010).
@ -592,6 +748,9 @@ Bibliography
**(Lee2)** **(Lee2)**
Lee, Baskes, Kim, Cho. Phys. Rev. B, 64, 184102 (2001). Lee, Baskes, Kim, Cho. Phys. Rev. B, 64, 184102 (2001).
**(Lee2020)**
C.W. Lee, et al. (2020) Physical Review B, 102(2), 024107.
**(Lenart)** **(Lenart)**
Lenart , Jusufi, and Panagiotopoulos, J Chem Phys, 126, 044509 (2007). Lenart , Jusufi, and Panagiotopoulos, J Chem Phys, 126, 044509 (2007).
@ -616,8 +775,11 @@ Bibliography
**(Li2015_JCP)** **(Li2015_JCP)**
Li, Yazdani, Tartakovsky, Karniadakis, J Chem Phys, 143: 014101 (2015). DOI:10.1063/1.4923254. Li, Yazdani, Tartakovsky, Karniadakis, J Chem Phys, 143: 014101 (2015). DOI:10.1063/1.4923254.
**(Liang)**
Liang, Phillpot, Sinnott Phys. Rev. B79 245110, (2009), Erratum: Phys. Rev. B85 199903(E), (2012)
**(Lisal)** **(Lisal)**
M.\ Lisal, J.K. Brennan, J. Bonet Avalos, "Dissipative particle dynamics at isothermal, isobaric, isoenergetic, and isoenthalpic conditions using Shardlow-like splitting algorithms.", M.\ Lisal, J.K. Brennan, J. Bonet Avalos, J. Chem. Phys., 135, 204105 (2011).
**(Liu1)** **(Liu1)**
L.\ Liu, Y. Liu, S. V. Zybin, H. Sun and W. A. Goddard, Journal of Physical Chemistry A, 115, 11016-11022 (2011). L.\ Liu, Y. Liu, S. V. Zybin, H. Sun and W. A. Goddard, Journal of Physical Chemistry A, 115, 11016-11022 (2011).
@ -634,6 +796,15 @@ Bibliography
**(Luding, 2008)** **(Luding, 2008)**
Luding, S. (2008). Cohesive, frictional powders: contact models for tension. Granular matter, 10(4), 235. Luding, S. (2008). Cohesive, frictional powders: contact models for tension. Granular matter, 10(4), 235.
**(Lysogorskiy)**
Lysogorskiy, van der Oord, Bochkarev, Menon, Rinaldi, Hammerschmidt, Mrovec, Thompson, Csanyi, Ortner, Drautz, npj Comp Mat, 7, 97 (2021).
**(Lysogorskiy21)**
Lysogorskiy, van der Oord, Bochkarev, Menon, Rinaldi, Hammerschmidt, Mrovec, Thompson, Csanyi, Ortner, Drautz, npj Comp Mat, 7, 97 (2021).
**(Lysogorskiy23)**
Lysogorskiy, Bochkarev, Mrovec, Drautz, Phys Rev Mater, 7, 043801 (2023) / arXiv:2212.08716 (2022).
**(Maaravi)** **(Maaravi)**
T.\ Maaravi et al, J. Phys. Chem. C 121, 22826-22835 (2017). T.\ Maaravi et al, J. Phys. Chem. C 121, 22826-22835 (2017).
@ -652,12 +823,18 @@ Bibliography
**(Maginn)** **(Maginn)**
Kelkar, Rafferty, Maginn, Siepmann, Fluid Phase Equilibria, 260, 218-231 (2007). Kelkar, Rafferty, Maginn, Siepmann, Fluid Phase Equilibria, 260, 218-231 (2007).
**(Mahoney)**
Mahoney, Jorgensen, J Chem Phys 112, 8910 (2000)
**(Malolepsza)** **(Malolepsza)**
Malolepsza, Secor, Keyes, J Phys Chem B 119 (42), 13379-13384 (2015). Malolepsza, Secor, Keyes, J Phys Chem B 119 (42), 13379-13384 (2015).
**(Mandadapu)** **(Mandadapu)**
Mandadapu, KK; Templeton, JA; Lee, JW, "Polarization as a field variable from molecular dynamics simulations." Journal of Chemical Physics (2013), 139:054115. Please refer to the standard finite element (FE) texts, e.g. T.J.R Hughes " The finite element method ", Dover 2003, for the basics of FE simulation. Mandadapu, KK; Templeton, JA; Lee, JW, "Polarization as a field variable from molecular dynamics simulations." Journal of Chemical Physics (2013), 139:054115. Please refer to the standard finite element (FE) texts, e.g. T.J.R Hughes " The finite element method ", Dover 2003, for the basics of FE simulation.
**(Mandelli_1)**
D. Mandelli, W. Ouyang, M. Urbakh, and O. Hod, ACS Nano 13(7), 7603-7609 (2019).
**(Maras)** **(Maras)**
Maras, Trushin, Stukowski, Ala-Nissila, Jonsson, Comp Phys Comm, 205, 13-21 (2016). Maras, Trushin, Stukowski, Ala-Nissila, Jonsson, Comp Phys Comm, 205, 13-21 (2016).
@ -673,6 +850,9 @@ Bibliography
**(Martyna1994)** **(Martyna1994)**
Martyna, Tobias and Klein, J Chem Phys, 101, 4177 (1994). Martyna, Tobias and Klein, J Chem Phys, 101, 4177 (1994).
**(Martyna2)**
G. Martyna, A. Hughes, M. Tuckerman, J. Chem. Phys. 110, 3275 (1999).
**(Mason)** **(Mason)**
J.\ K. Mason, Acta Cryst A65, 259 (2009). J.\ K. Mason, Acta Cryst A65, 259 (2009).
@ -712,6 +892,9 @@ Bibliography
**(Mie)** **(Mie)**
G.\ Mie, Ann Phys, 316, 657 (1903). G.\ Mie, Ann Phys, 316, 657 (1903).
**(Milano)**
G. Milano, S. Goudeau, F. Mueller-Plathe, J. Polym. Sci. B Polym. Phys. 43, 871 (2005).
**(Miller1)** **(Miller1)**
T.\ F. Miller III, M. Eleftheriou, P. Pattnaik, A. Ndirango, G. J. Martyna, J. Chem. Phys., 116, 8649-8659 (2002). T.\ F. Miller III, M. Eleftheriou, P. Pattnaik, A. Ndirango, G. J. Martyna, J. Chem. Phys., 116, 8649-8659 (2002).
@ -742,12 +925,18 @@ Bibliography
**(Mitchell2011a)** **(Mitchell2011a)**
Mitchell. A Nonlocal, Ordinary, State-Based Plasticity Model for Peridynamics. Sandia National Lab Report, 3166:1-34 (2011). Mitchell. A Nonlocal, Ordinary, State-Based Plasticity Model for Peridynamics. Sandia National Lab Report, 3166:1-34 (2011).
**(Miyazaki)**
Miyazaki, Okazaki, Shinoda, J Chem Theory Comput, 16, 782-793 (2020).
**(Mniszewski)** **(Mniszewski)**
S.\ M. Mniszewski, M. J. Cawkwell, M. E. Wall, J. Mohd-Yusof, N. Bock, T. C. Germann, and A. M. N. Niklasson, J. Chem. Theory Comput., 11, 4644 (2015). S.\ M. Mniszewski, M. J. Cawkwell, M. E. Wall, J. Mohd-Yusof, N. Bock, T. C. Germann, and A. M. N. Niklasson, J. Chem. Theory Comput., 11, 4644 (2015).
**(Monaghan)** **(Monaghan)**
Monaghan and Gingold, Journal of Computational Physics, 52, 374-389 (1983). Monaghan and Gingold, Journal of Computational Physics, 52, 374-389 (1983).
**(Monti)**
Monti, Clemmer, Srivastava, Silbert, Grest, and Lechman, Phys. Rev. E, (2022).
**(Moore)** **(Moore)**
Moore, J Chem Phys, 144, 104501 (2016). Moore, J Chem Phys, 144, 104501 (2016).
@ -767,7 +956,7 @@ Bibliography
Morris, Fox, Zhu, J Comp Physics, 136, 214-226 (1997). Morris, Fox, Zhu, J Comp Physics, 136, 214-226 (1997).
**(Moustafa)** **(Moustafa)**
Sabry G. Moustafa, Andrew J. Schultz, and David A. Kofke, *Very fast averaging of thermal properties of crystals by molecular simulation*, `Phys. Rev. E [92], 043303 (2015) <https://link.aps.org/doi/10.1103/PhysRevE.92.043303>`_ Sabry G. Moustafa, Andrew J. Schultz, and David A. Kofke, `Phys. Rev. E [92], 043303 (2015) <https://link.aps.org/doi/10.1103/PhysRevE.92.043303>`_
**(Muller-Plathe1)** **(Muller-Plathe1)**
Muller-Plathe, J Chem Phys, 106, 6082 (1997). Muller-Plathe, J Chem Phys, 106, 6082 (1997).
@ -787,9 +976,6 @@ Bibliography
**(Neelov)** **(Neelov)**
Neelov, Holm, J Chem Phys 132, 234103 (2010) Neelov, Holm, J Chem Phys 132, 234103 (2010)
**(Negre2016)**
C.\ F. A. Negre, S. M. Mniszewski, M. J. Cawkwell, N. Bock, M. E. Wall, and A. M. N. Niklasson, J. Chem. Theory Comp., 12, 3063 (2016).
**(Nelson)** **(Nelson)**
Nelson, Halperin, Phys Rev B, 19, 2457 (1979). Nelson, Halperin, Phys Rev B, 19, 2457 (1979).
@ -799,12 +985,24 @@ Bibliography
**(Neyts)** **(Neyts)**
E.\ C. Neyts and A. Bogaerts, Theor. Chem. Acc. 132, 1320 (2013). E.\ C. Neyts and A. Bogaerts, Theor. Chem. Acc. 132, 1320 (2013).
**(Nguyen2023)**
Nguyen, Physical Review B, 107(14), 144103, (2023).
**(Nguyen2024)**
Nguyen, Journal of Computational Physics, 113102, (2024).
**(Nguyen and Rohskopf)**
Nguyen and Rohskopf, Journal of Computational Physics, 480, 112030, (2023).
**(Nguyen and Sema)**
Nguyen and Sema, https://arxiv.org/abs/2405.00306, (2024).
**(NguyenTD)**
Nguyen, Li, Bagchi, Solis, Olvera de la Cruz, Comput Phys Commun 241, 80-19 (2019)
**(Nicholson and Rutledge)** **(Nicholson and Rutledge)**
Nicholson and Rutledge, J Chem Phys, 145, 244903 (2016). Nicholson and Rutledge, J Chem Phys, 145, 244903 (2016).
**(Nicklas)**
The spline-based MEAM+SW format was first devised and used to develop potentials for bcc transition metals by Jeremy Nicklas, Michael Fellinger,
**(Niklasson2002)** **(Niklasson2002)**
A.\ M. N. Niklasson, Phys. Rev. B, 66, 155115 (2002). A.\ M. N. Niklasson, Phys. Rev. B, 66, 155115 (2002).
@ -817,6 +1015,9 @@ Bibliography
**(Niklasson2017)** **(Niklasson2017)**
A.\ M. N. Niklasson, J. Chem. Phys., 147, 054103 (2017). A.\ M. N. Niklasson, J. Chem. Phys., 147, 054103 (2017).
**(Nitol)**
Nitol, Dickel, and Barrett, Computational Materials Science 188 (2021): 110207.
**(Noid)** **(Noid)**
Noid, Chu, Ayton, Krishna, Izvekov, Voth, Das, Andersen, J Chem Phys 128, 134105 (2008). Noid, Chu, Ayton, Krishna, Izvekov, Voth, Das, Andersen, J Chem Phys 128, 134105 (2008).
@ -838,6 +1039,9 @@ Bibliography
**(O'Connor)** **(O'Connor)**
O'Connor et al., J. Chem. Phys. 142, 024903 (2015). O'Connor et al., J. Chem. Phys. 142, 024903 (2015).
**(O'Hearn)**
O'Hearn, Alperen, Aktulga, SIAM J. Sci. Comput., 42(1), C1--C22 (2020).
**(Okabe)** **(Okabe)**
T.\ Okabe, M. Kawata, Y. Okamoto, M. Masuhiro, Chem. Phys. Lett., 335, 435-439 (2001). T.\ Okabe, M. Kawata, Y. Okamoto, M. Masuhiro, Chem. Phys. Lett., 335, 435-439 (2001).
@ -847,6 +1051,8 @@ Bibliography
**(Omelyan)** **(Omelyan)**
Omelyan, Mryglod, and Folk. Phys. Rev. Lett. 86(5), 898. (2001). Omelyan, Mryglod, and Folk. Phys. Rev. Lett. 86(5), 898. (2001).
**(OPLS-AA96)** Jorgensen, Maxwell, Tirado-Rives, J Am Chem Soc, 118(45), 11225-11236 (1996).
**(Oppelstrup)** **(Oppelstrup)**
Oppelstrup, unpublished, 2015. Oppelstrup and Moriarty, to be published. Oppelstrup, unpublished, 2015. Oppelstrup and Moriarty, to be published.
@ -868,11 +1074,17 @@ Bibliography
**(Ouyang2)** **(Ouyang2)**
W.\ Ouyang et al., J. Chem. Theory Comput. 16(1), 666-676 (2020). W.\ Ouyang et al., J. Chem. Theory Comput. 16(1), 666-676 (2020).
**(PASS)** **(Ouyang_1)**
PASS webpage: https://www.sdu.dk/en/DPASS W. Ouyang et al., J. Chem. Theory Comput. 16(1), 666-676 (2020).
**(PLUMED)** **(Ouyang6)**
G.A. Tribello, M. Bonomi, D. Branduardi, C. Camilloni and G. Bussi, Comp. Phys. Comm 185, 604 (2014) W. Ouyang, O. Hod, and R. Guerra, J. Chem. Theory Comput. 17, 7215 (2021).
**(Ouyang7)**
W. Ouyang, et al., J. Chem. Theory Comput. 17, 7237 (2021).
**(Palkar)**
Palkar V, Kuksenok O, J. Phys. Chem. B, 126 (1), 336-346, 2022
**(Paquay)** **(Paquay)**
Paquay and Kusters, Biophys. J., 110, 6, (2016). preprint available at `arXiv:1411.3019 <https://arxiv.org/abs/1411.3019/>`_. Paquay and Kusters, Biophys. J., 110, 6, (2016). preprint available at `arXiv:1411.3019 <https://arxiv.org/abs/1411.3019/>`_.
@ -883,21 +1095,33 @@ Bibliography
**(Parks)** **(Parks)**
Parks, Lehoucq, Plimpton, Silling, Comp Phys Comm, 179(11), 777-783 (2008). Parks, Lehoucq, Plimpton, Silling, Comp Phys Comm, 179(11), 777-783 (2008).
**(Parrinello1981)** **(Parrinello)**
Parrinello and Rahman, J Appl Phys, 52, 7182 (1981). Parrinello and Rahman, J Appl Phys, 52, 7182 (1981).
**(PASS)**
PASS webpage: https://www.sdu.dk/en/DPASS
**(Paula Leite2016)** **(Paula Leite2016)**
Paula Leite , Freitas, Azevedo, and de Koning, J Chem Phys, 126, 044509 (2016). Paula Leite , Freitas, Azevedo, and de Koning, J Chem Phys, 126, 044509 (2016).
**(Paula Leite2017)** **(Paula Leite2017)**
Paula Leite, Santos-Florez, and de Koning, Phys Rev E, 96, 32115 (2017). Paula Leite, Santos-Florez, and de Koning, Phys Rev E, 96, 32115 (2017).
**(Pavlov1)**
D Pavlov, V Galigerov, D Kolotinskii, V Nikolskiy, V Stegailov, International Journal of High Performance Computing Applications, 38, 34-49 (2024).
**(Pavlov2)**
Pavlov, Galigerov, Kolotinskii, Nikolskiy, Stegailov, "GPU-based Molecular Dynamics of Fluid Flows: Reaching for Turbulence", Int. J. High Perf. Comp. Appl., (2024)
**(Pearlman)** **(Pearlman)**
Pearlman, J Chem Phys, 98, 1487 (1994) Pearlman, J Chem Phys, 98, 1487 (1994)
**(Pedersen)** **(Pedersen)**
Pedersen, J. Chem. Phys., 139, 104102 (2013). Pedersen, J. Chem. Phys., 139, 104102 (2013).
**(Pedone)**
A. Pedone, G. Malavasi, M. C. Menziani, A. N. Cormack, and U. Segre, J. Phys. Chem. B, 110, 11780 (2006)
**(Peng)** **(Peng)**
Peng, Ren, Dudarev, Whelan, Acta Crystallogr. A, 52, 257-76 (1996). Peng, Ren, Dudarev, Whelan, Acta Crystallogr. A, 52, 257-76 (1996).
@ -919,6 +1143,9 @@ Bibliography
**(Pettifor_3)** **(Pettifor_3)**
D.G. Pettifor and I.I. Oleinik, Phys. Rev. B, 65, 172103 (2002). D.G. Pettifor and I.I. Oleinik, Phys. Rev. B, 65, 172103 (2002).
**(PFC)**
PFC Particle Flow Code 6.0 Documentation. Itasca Consulting Group.
**(Phillips)** **(Phillips)**
C.\ L. Phillips, J. A. Anderson, S. C. Glotzer, Comput Phys Comm, 230, 7191-7201 (2011). C.\ L. Phillips, J. A. Anderson, S. C. Glotzer, Comput Phys Comm, 230, 7191-7201 (2011).
@ -928,9 +1155,21 @@ Bibliography
**(Pisarev)** **(Pisarev)**
V V Pisarev and S V Starikov, J. Phys.: Condens. Matter, 26, 475401 (2014). V V Pisarev and S V Starikov, J. Phys.: Condens. Matter, 26, 475401 (2014).
**(Plimpton)**
Plimpton and Knight, JPDC, 147, 184-195 (2021).
**(PLUMED)**
G.A. Tribello, M. Bonomi, D. Branduardi, C. Camilloni and G. Bussi, Comp. Phys. Comm 185, 604 (2014)
**(Pollock)** **(Pollock)**
Pollock and Glosli, Comp Phys Comm, 95, 93 (1996). Pollock and Glosli, Comp Phys Comm, 95, 93 (1996).
**(Ponder)**
Ponder, Wu, Ren, Pande, Chodera, Schnieders, Haque, Mobley, Lambrecht, DiStasio Jr, M. Head-Gordon, Clark, Johnson, T. Head-Gordon, J Phys Chem B, 114, 2549-2564 (2010).
**(Popov1)**
A.M. Popov, I. V. Lebedeva, A. A. Knizhnik, Y. E. Lozovik and B. V. Potapkin, Chem. Phys. Lett. 536, 82-86 (2012).
**(Price1)** **(Price1)**
Price and Brooks, J Chem Phys, 121, 10096 (2004). Price and Brooks, J Chem Phys, 121, 10096 (2004).
@ -970,6 +1209,12 @@ Bibliography
**(Rick)** **(Rick)**
S.\ W. Rick, S. J. Stuart, B. J. Berne, J Chem Phys 101, 16141 (1994). S.\ W. Rick, S. J. Stuart, B. J. Berne, J Chem Phys 101, 16141 (1994).
**(Rick2)**
S. W. Rick, S. J. Stuart, B. J. Berne, J Chem Phys 101, 6141
**(Roberts)**
R. Roberts (2019) "Evenly Distributing Points in a Triangle." Extreme Learning. `<http://extremelearning.com.au/evenly-distributing-points-in-a-triangle/>`_
**(Rohart)** **(Rohart)**
Rohart and Thiaville, Physical Review B, 88(18), 184422. (2013). Rohart and Thiaville, Physical Review B, 88(18), 184422. (2013).
@ -1006,9 +1251,18 @@ Bibliography
**(Sadigh)** **(Sadigh)**
B Sadigh, P Erhart, A Stukowski, A Caro, E Martinez, and L Zepeda-Ruiz, Phys. Rev. B, 85, 184203 (2012). B Sadigh, P Erhart, A Stukowski, A Caro, E Martinez, and L Zepeda-Ruiz, Phys. Rev. B, 85, 184203 (2012).
**(Sadigh1)**
B. Sadigh, P. Erhart, A. Stukowski, A. Caro, E. Martinez, and L. Zepeda-Ruiz, Phys. Rev. B **85**, 184203 (2012)
**(Sadigh2)**
B. Sadigh and P. Erhart, Phys. Rev. B **86**, 134204 (2012)
**(Safran)** **(Safran)**
Safran, Statistical Thermodynamics of Surfaces, Interfaces, And Membranes, Westview Press, ISBN: 978-0813340791 (2003). Safran, Statistical Thermodynamics of Surfaces, Interfaces, And Membranes, Westview Press, ISBN: 978-0813340791 (2003).
**(Salanne)**
Salanne, Rotenberg, Jahn, Vuilleumier, Simon, Christian and Madden, Theor Chem Acc, 131, 1143 (2012).
**(Salerno)** **(Salerno)**
Salerno, Bernstein, J Chem Theory Comput, --, ---- (2018). Salerno, Bernstein, J Chem Theory Comput, --, ---- (2018).
@ -1018,9 +1272,18 @@ Bibliography
**(Sanyal2)** **(Sanyal2)**
Sanyal and Shell, Journal of Physical Chemistry B, 122 (21), 5678-5693. Sanyal and Shell, Journal of Physical Chemistry B, 122 (21), 5678-5693.
**(Scalfi)**
Scalfi *et al.*, J. Chem. Phys., 153, 174704 (2020).
**(Schelling)** **(Schelling)**
Patrick K. Schelling, Comp. Mat. Science, 44, 274 (2008). Patrick K. Schelling, Comp. Mat. Science, 44, 274 (2008).
**(Scherer1)**
C. Scherer and D. Andrienko, Phys. Chem. Chem. Phys. 20, 22387-22394 (2018).
**(Scherer2)**
C. Scherer, R. Scheid, D. Andrienko, and T. Bereau, J. Chem. Theor. Comp. 16, 3194-3204 (2020).
**(Schlitter1)** **(Schlitter1)**
Schlitter, Swegat, Mulders, "Distance-type reaction coordinates for modelling activated processes", J Molecular Modeling, 7, 171-177 (2001). Schlitter, Swegat, Mulders, "Distance-type reaction coordinates for modelling activated processes", J Molecular Modeling, 7, 171-177 (2001).
@ -1039,21 +1302,36 @@ Bibliography
**(Schroeder)** **(Schroeder)**
Schroeder and Steinhauser, J Chem Phys, 133, 154511 (2010). Schroeder and Steinhauser, J Chem Phys, 133, 154511 (2010).
**(Seleson 2010)**
Seleson, Parks, Int J Mult Comp Eng 9(6), pp. 689-706, 2011.
**(Semaev)** **(Semaev)**
Semaev, Cryptography and Lattices, 181 (2001). Semaev, Cryptography and Lattices, 181 (2001).
**(Seo)**
Seo, Shinoda, J Chem Theory Comput, 15, 762-774 (2019).
**(Sheppard)** **(Sheppard)**
Sheppard, Terrell, Henkelman, J Chem Phys, 128, 134106 (2008). See ref 1 in this paper for original reference to Qmin in Jonsson, Mills, Jacobsen. Sheppard, Terrell, Henkelman, J Chem Phys, 128, 134106 (2008). See ref 1 in this paper for original reference to Qmin in Jonsson, Mills, Jacobsen.
**(Shi)**
Shi, Xia, Zhang, Best, Wu, Ponder, Ren, J Chem Theory Comp, 9, 4046, 2013.
**(Shinoda)** **(Shinoda)**
Shinoda, DeVane, Klein, Mol Sim, 33, 27 (2007). Shinoda, DeVane, Klein, Mol Sim, 33, 27 (2007).
**(Shinoda)** **(Shinoda)**
Shinoda, Shiga, and Mikami, Phys Rev B, 69, 134103 (2004). Shinoda, Shiga, and Mikami, Phys Rev B, 69, 134103 (2004).
**(Shire)**
Shire, Hanley and Stratford, Comp. Part. Mech., (2020).
**(Sides)** **(Sides)**
Sides, Grest, Stevens, Plimpton, J Polymer Science B, 42, 199-208 (2004). Sides, Grest, Stevens, Plimpton, J Polymer Science B, 42, 199-208 (2004).
**(Siepmann)**
Siepmann and Sprik, J. Chem. Phys. 102, 511 (1995).
**(Silbert)** **(Silbert)**
Silbert, Ertas, Grest, Halsey, Levine, Plimpton, Phys Rev E, 64, p 051302 (2001). Silbert, Ertas, Grest, Halsey, Levine, Plimpton, Phys Rev E, 64, p 051302 (2001).
@ -1063,12 +1341,21 @@ Bibliography
**(Silling 2000)** **(Silling 2000)**
Silling, J Mech Phys Solids, 48, 175-209 (2000). Silling, J Mech Phys Solids, 48, 175-209 (2000).
**(Silling 2005)**
Silling Askari, Computer and Structures, 83, 1526-1535 (2005).
**(Silling 2007)** **(Silling 2007)**
Silling, Epton, Weckner, Xu, Askari, J Elasticity, 88, 151-184 (2007). Silling, Epton, Weckner, Xu, Askari, J Elasticity, 88, 151-184 (2007).
**(Singh)** **(Singh)**
Singh and Warner, Acta Mater, 58, 5797-5805 (2010), Singh and Warner, Acta Mater, 58, 5797-5805 (2010),
**(Singraber, Behler and Dellago 2019)**
Singraber, A.; Behler, J.; Dellago, C. J., Chem. Theory Comput. 2019, 15 (3), 1827-1840
**(Singraber et al 2019)**
Singraber, A.; Morawietz, T.; Behler, J.; Dellago, C., J. Chem. Theory Comput. 2019, 15 (5), 3075-3092.
**(Sirk1)** **(Sirk1)**
Sirk TW, Sliozberg YR, Brennan JK, Lisal M, Andzelm JW, J Chem Phys, 136 (13) 134903, 2012. Sirk TW, Sliozberg YR, Brennan JK, Lisal M, Andzelm JW, J Chem Phys, 136 (13) 134903, 2012.
@ -1081,6 +1368,9 @@ Bibliography
**(Snodin)** **(Snodin)**
B.E. Snodin, F. Randisi, M. Mosayebi, et al., J. Chem. Phys. 142, 234901 (2015). B.E. Snodin, F. Randisi, M. Mosayebi, et al., J. Chem. Phys. 142, 234901 (2015).
**(Son)**
Son, McDaniel, Cui and Yethiraj, J Phys Chem Lett, 10, 7523 (2019).
**(Srivastava)** **(Srivastava)**
Zhigilei, Wei, Srivastava, Phys. Rev. B 71, 165417 (2005). Zhigilei, Wei, Srivastava, Phys. Rev. B 71, 165417 (2005).
@ -1090,6 +1380,12 @@ Bibliography
**(Steinhardt)** **(Steinhardt)**
P.\ Steinhardt, D. Nelson, and M. Ronchetti, Phys. Rev. B 28, 784 (1983). P.\ Steinhardt, D. Nelson, and M. Ronchetti, Phys. Rev. B 28, 784 (1983).
**(Steward)**
Stewart, Spearot, Modelling Simul. Mater. Sci. Eng. 21, 045003, (2013).
**(Stewart2018)**
J.A. Stewart, et al. (2018) Journal of Applied Physics, 123(16), 165902.
**(Stiles)** **(Stiles)**
Stiles , Hubbard, and Kayser, J Chem Phys, 77, 6189 (1982). Stiles , Hubbard, and Kayser, J Chem Phys, 77, 6189 (1982).
@ -1147,12 +1443,21 @@ Bibliography
**(Tainter 2015)** **(Tainter 2015)**
Tainter, Shi, and Skinner, 11, 2268 (2015) Tainter, Shi, and Skinner, 11, 2268 (2015)
**(Tang and Toennies)**
J Chem Phys, 80, 3726 (1984).
**(Tee)**
Tee and Searles, J. Chem. Phys. 156, 184101 (2022).
**(Templeton2010)** **(Templeton2010)**
Templeton, JA; Jones, RE; Wagner, GJ, "Application of a field-based method to spatially varying thermal transport problems in molecular dynamics." Modelling and Simulation in Materials Science and Engineering (2010), 18:085007. Templeton, JA; Jones, RE; Wagner, GJ, "Application of a field-based method to spatially varying thermal transport problems in molecular dynamics." Modelling and Simulation in Materials Science and Engineering (2010), 18:085007.
**(Templeton2011)** **(Templeton2011)**
Templeton, JA; Jones, RE; Lee, JW; Zimmerman, JA; Wong, BM, "A long-range electric field solver for molecular dynamics based on atomistic-to-continuum modeling." Journal of Chemical Theory and Computation (2011), 7:1736. Templeton, JA; Jones, RE; Lee, JW; Zimmerman, JA; Wong, BM, "A long-range electric field solver for molecular dynamics based on atomistic-to-continuum modeling." Journal of Chemical Theory and Computation (2011), 7:1736.
**(tenWolde)**
P.\ R. ten Wolde, M. J. Ruiz-Montero, D. Frenkel, J. Chem. Phys. 104, 9932 (1996).
**(Tersoff_1)** **(Tersoff_1)**
J.\ Tersoff, Phys Rev B, 37, 6991 (1988). J.\ Tersoff, Phys Rev B, 37, 6991 (1988).
@ -1195,6 +1500,9 @@ Bibliography
**(Tranchida)** **(Tranchida)**
Tranchida, Plimpton, Thibaudeau and Thompson, Journal of Computational Physics, 372, 406-425, (2018). Tranchida, Plimpton, Thibaudeau and Thompson, Journal of Computational Physics, 372, 406-425, (2018).
**(Tribello)**
G.A. Tribello, M. Bonomi, D. Branduardi, C. Camilloni and G. Bussi, Comp. Phys. Comm 185, 604 (2014)
**(Tsuji et al, 1992)** **(Tsuji et al, 1992)**
Tsuji, Y., Tanaka, T., & Ishida, T. (1992). Lagrangian numerical simulation of plug flow of cohesionless particles in a horizontal pipe. Powder technology, 71(3), Tsuji, Y., Tanaka, T., & Ishida, T. (1992). Lagrangian numerical simulation of plug flow of cohesionless particles in a horizontal pipe. Powder technology, 71(3),
@ -1213,6 +1521,9 @@ Bibliography
**(Tuckerman4)** **(Tuckerman4)**
Tuckerman, Mundy, Balasubramanian, Klein, J Chem Phys, 106, 5615 (1997). Tuckerman, Mundy, Balasubramanian, Klein, J Chem Phys, 106, 5615 (1997).
**(Tyagi)**
Tyagi, Suzen, Sega, Barbosa, Kantorovich, Holm, J Chem Phys, 132, 154112 (2010)
**(Ulomek)** **(Ulomek)**
Ulomek, Brien, Foiles, Mohles, Modelling Simul. Mater. Sci. Eng. 23 (2015) 025007 Ulomek, Brien, Foiles, Mohles, Modelling Simul. Mater. Sci. Eng. 23 (2015) 025007
@ -1222,6 +1533,15 @@ Bibliography
**(Valone)** **(Valone)**
Valone, Baskes, Martin, Phys. Rev. B, 73, 214209 (2006). Valone, Baskes, Martin, Phys. Rev. B, 73, 214209 (2006).
**(vanWijk)**
M. M. van Wijk, A. Schuring, M. I. Katsnelson, and A. Fasolino, Physical Review Letters, 113, 135504 (2014)
**(Van Workum)**
K. Van Workum et al., J. Chem. Phys. 125 144506 (2006)
**(Vargas and McCarthy 2001)**
Vargas, W.L. and McCarthy, J.J. (2001).
**(Varshalovich)** **(Varshalovich)**
Varshalovich, Moskalev, Khersonskii, Quantum Theory of Angular Momentum, World Scientific, Singapore (1987). Varshalovich, Moskalev, Khersonskii, Quantum Theory of Angular Momentum, World Scientific, Singapore (1987).
@ -1234,6 +1554,9 @@ Bibliography
**(Veld)** **(Veld)**
In 't Veld, Ismail, Grest, J Chem Phys, 127, 144711 (2007). In 't Veld, Ismail, Grest, J Chem Phys, 127, 144711 (2007).
**(Verstraelen)**
Verstraelen, Ayers, Speybroeck, Waroquier, J. Chem. Phys. 138, 074108 (2013).
**(Volkov1)** **(Volkov1)**
Volkov and Zhigilei, J Phys Chem C, 114, 5513 (2010). Volkov and Zhigilei, J Phys Chem C, 114, 5513 (2010).
@ -1258,6 +1581,9 @@ Bibliography
**(Wang et al, 2015)** **(Wang et al, 2015)**
Wang, Y., Alonso-Marroquin, F., & Guo, W. W. (2015). Rolling and sliding in 3-D discrete element models. Particuology, 23, 49-55. Wang, Y., Alonso-Marroquin, F., & Guo, W. W. (2015). Rolling and sliding in 3-D discrete element models. Particuology, 23, 49-55.
**(Wang2020)**
X. Wang, S. Ramirez-Hinestrosa, J. Dobnikar, and D. Frenkel, Phys. Chem. Chem. Phys. 22, 10624 (2020).
**(Wang1)** **(Wang1)**
J.\ Wang, H. S. Yu, P. A. Langston, F. Y. Fraige, Granular Matter, 13, 1 (2011). J.\ Wang, H. S. Yu, P. A. Langston, F. Y. Fraige, Granular Matter, 13, 1 (2011).
@ -1297,6 +1623,9 @@ Bibliography
**(Wicaksono2)** **(Wicaksono2)**
Wicaksono, figshare, https://doi.org/10.6084/m9.figshare.1488628.v1 (2015). Wicaksono, figshare, https://doi.org/10.6084/m9.figshare.1488628.v1 (2015).
**(Winkler)**
Winkler, Wysocki, and Gompper, Soft Matter, 11, 6680 (2015).
**(Wirnsberger)** **(Wirnsberger)**
Wirnsberger, Frenkel, and Dellago, J Chem Phys, 143, 124104 (2015). Wirnsberger, Frenkel, and Dellago, J Chem Phys, 143, 124104 (2015).
@ -1309,9 +1638,27 @@ Bibliography
**(Wood)** **(Wood)**
Wood and Thompson, J Chem Phys, 148, 241721, (2018) Wood and Thompson, J Chem Phys, 148, 241721, (2018)
**(Xie23)**
Xie, S.R., Rupp, M. & Hennig, R.G. Ultra-fast interpretable machine-learning potentials. npj Comput Mater 9, 162 (2023). https://doi.org/10.1038/s41524-023-01092-7
**(Yade-DEM)**
V. Smilauer et al. (2021), Yade Documentation 3rd ed.
**(Yanxon2020)**
Yanxon, Zagaceta, Tang, Matteson, Zhu, Mach. Learn.: Sci. Technol. 2, 027001 (2020).
**(Yeh)** **(Yeh)**
Yeh and Berkowitz, J Chem Phys, 111, 3155 (1999). Yeh and Berkowitz, J Chem Phys, 111, 3155 (1999).
**(Yuan2010a)**
Yuan, Huang, Li, Lykotrafitis, Zhang, Phys. Rev. E, 82, 011905(2010).
**(Yuan2010b)**
Yuan, Huang, Zhang, Soft. Matter, 6, 4571(2010).
**(Zagaceta2020)**
Zagaceta, Yanxon, Zhu, J Appl Phys, 128, 045113 (2020).
**(ZBL)** **(ZBL)**
J.F. Ziegler, J.P. Biersack, U. Littmark, 'Stopping and Ranges of Ions in Matter' Vol 1, 1985, Pergamon Press. J.F. Ziegler, J.P. Biersack, U. Littmark, 'Stopping and Ranges of Ions in Matter' Vol 1, 1985, Pergamon Press.
@ -1381,17 +1728,6 @@ Bibliography
**(Zimmerman2010)** **(Zimmerman2010)**
Zimmerman, JA; Jones, RE; Templeton, JA, "A material frame approach for evaluating continuum variables in atomistic simulations." Journal of Computational Physics (2010), 229:2364. Zimmerman, JA; Jones, RE; Templeton, JA, "A material frame approach for evaluating continuum variables in atomistic simulations." Journal of Computational Physics (2010), 229:2364.
**(de Buyl)**
de Buyl, Colberg and Hofling, H5MD: A structured, efficient, and portable file format for molecular data, Comp. Phys. Comm. 185(6), 1546-1553 (2014) -
**(de Koning)**
de Koning and Antonelli, Phys Rev E, 53, 465 (1996).
**(electronic stopping)** **(electronic stopping)**
Wikipedia - Electronic Stopping Power: https://en.wikipedia.org/wiki/Stopping_power_%28particle_radiation%29 Wikipedia - Electronic Stopping Power: https://en.wikipedia.org/wiki/Stopping_power_%28particle_radiation%29
**(tenWolde)**
P.\ R. ten Wolde, M. J. Ruiz-Montero, D. Frenkel, J. Chem. Phys. 104, 9932 (1996).
**(vanWijk)**
M.\ M. van Wijk, A. Schuring, M. I. Katsnelson, and A. Fasolino, Physical Review Letters, 113, 135504 (2014)

View File

@ -37,8 +37,9 @@ standard. A more detailed discussion of that is below.
.. code-block:: bash .. code-block:: bash
-D BUILD_MPI=value # yes or no, default is yes if CMake finds MPI, else no -D BUILD_MPI=value # yes or no, default is yes if CMake finds MPI
-D BUILD_OMP=value # yes or no, default is yes if a compatible compiler is detected -D BUILD_OMP=value # yes or no, default is yes if a compatible
# compiler is detected
-D LAMMPS_MACHINE=name # name = mpi, serial, mybox, titan, laptop, etc -D LAMMPS_MACHINE=name # name = mpi, serial, mybox, titan, laptop, etc
# no default value # no default value
@ -54,9 +55,9 @@ standard. A more detailed discussion of that is below.
.. code-block:: bash .. code-block:: bash
make mpi # parallel build, produces lmp_mpi using Makefile.mpi make mpi # parallel build, produces lmp_mpi using Makefile.mpi
make serial # serial build, produces lmp_serial using Makefile/serial make serial # serial build, produces lmp_serial using Makefile/serial
make mybox # uses Makefile.mybox to produce lmp_mybox make mybox # uses Makefile.mybox to produce lmp_mybox
Any ``make machine`` command will look up the make settings from a Any ``make machine`` command will look up the make settings from a
file ``Makefile.machine`` in the folder ``src/MAKE`` or one of its file ``Makefile.machine`` in the folder ``src/MAKE`` or one of its
@ -74,15 +75,15 @@ standard. A more detailed discussion of that is below.
this is ``-fopenmp``\ , which can be added to the ``CC`` and this is ``-fopenmp``\ , which can be added to the ``CC`` and
``LINK`` makefile variables. ``LINK`` makefile variables.
For the serial build the following make variables are set (see src/MAKE/Makefile.serial): For the serial build the following make variables are set (see ``src/MAKE/Makefile.serial``):
.. code-block:: make .. code-block:: make
CC = g++ CC = g++
LINK = g++ LINK = g++
MPI_INC = -I../STUBS MPI_INC = -I../STUBS
MPI_PATH = -L../STUBS MPI_PATH = -L../STUBS
MPI_LIB = -lmpi_stubs MPI_LIB = -lmpi_stubs
You also need to build the STUBS library for your platform before You also need to build the STUBS library for your platform before
making LAMMPS itself. A ``make serial`` build does this for you making LAMMPS itself. A ``make serial`` build does this for you
@ -90,7 +91,7 @@ standard. A more detailed discussion of that is below.
directory, or ``make`` from the ``src/STUBS`` dir. If the build directory, or ``make`` from the ``src/STUBS`` dir. If the build
fails, you may need to edit the ``STUBS/Makefile`` for your fails, you may need to edit the ``STUBS/Makefile`` for your
platform. The stubs library does not provide MPI/IO functions 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. and thus is not compatible with those packages.
.. note:: .. note::
@ -128,14 +129,13 @@ and adds vectorization support when compiled with compatible compilers,
in particular the Intel compilers on top of OpenMP. Also, the ``KOKKOS`` in particular the Intel compilers on top of OpenMP. Also, the ``KOKKOS``
package can be compiled to include OpenMP threading. package can be compiled to include OpenMP threading.
In addition, there are a few commands in LAMMPS that have native In addition, there are a few commands in LAMMPS that have native OpenMP
OpenMP support included as well. These are commands in the ``MPIIO``, support included as well. These are commands in the ``ML-SNAP``,
``ML-SNAP``, ``DIFFRACTION``, and ``DPD-REACT`` packages. ``DIFFRACTION``, and ``DPD-REACT`` packages. Furthermore, some packages
Furthermore, some packages support OpenMP threading indirectly through support OpenMP threading indirectly through the libraries they interface
the libraries they interface to: e.g. ``KSPACE``, and ``COLVARS``. to: e.g. ``KSPACE``, and ``COLVARS``. See the :doc:`Packages details
See the :doc:`Packages details <Packages_details>` page for more info <Packages_details>` page for more info on these packages, and the pages
on these packages, and the pages for their respective commands for for their respective commands for OpenMP threading info.
OpenMP threading info.
For CMake, if you use ``BUILD_OMP=yes``, you can use these packages 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 and turn on their native OpenMP support and turn on their native OpenMP
@ -232,24 +232,32 @@ LAMMPS.
.. code-block:: bash .. code-block:: bash
# Building with GNU Compilers: # Building with GNU Compilers:
cmake ../cmake -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_Fortran_COMPILER=gfortran cmake -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ \
# Building with Intel Compilers: -DCMAKE_Fortran_COMPILER=gfortran ../cmake
cmake ../cmake -DCMAKE_C_COMPILER=icc -DCMAKE_CXX_COMPILER=icpc -DCMAKE_Fortran_COMPILER=ifort # Building with Intel Classic Compilers:
cmake -DCMAKE_C_COMPILER=icc -DCMAKE_CXX_COMPILER=icpc \
-DCMAKE_Fortran_COMPILER=ifort ../cmake
# Building with Intel oneAPI Compilers: # Building with Intel oneAPI Compilers:
cmake ../cmake -DCMAKE_C_COMPILER=icx -DCMAKE_CXX_COMPILER=icpx -DCMAKE_Fortran_COMPILER=ifx cmake -DCMAKE_C_COMPILER=icx -DCMAKE_CXX_COMPILER=icpx \
-DCMAKE_Fortran_COMPILER=ifx ../cmake
# Building with LLVM/Clang Compilers: # Building with LLVM/Clang Compilers:
cmake ../cmake -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_Fortran_COMPILER=flang cmake -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ \
-DCMAKE_Fortran_COMPILER=flang ../cmake
# Building with PGI/Nvidia Compilers: # Building with PGI/Nvidia Compilers:
cmake ../cmake -DCMAKE_C_COMPILER=pgcc -DCMAKE_CXX_COMPILER=pgc++ -DCMAKE_Fortran_COMPILER=pgfortran cmake -DCMAKE_C_COMPILER=pgcc -DCMAKE_CXX_COMPILER=pgc++ \
-DCMAKE_Fortran_COMPILER=pgfortran ../cmake
# Building with the NVHPC Compilers:
cmake -DCMAKE_C_COMPILER=nvc -DCMAKE_CXX_COMPILER=nvc++ \
-DCMAKE_Fortran_COMPILER=nvfortran ../cmake
For compiling with the Clang/LLVM compilers a CMake preset is For compiling with the Clang/LLVM compilers a CMake preset is
provided that can be loaded with provided that can be loaded with
`-C ../cmake/presets/clang.cmake`. Similarly, ``-C ../cmake/presets/clang.cmake``. Similarly,
`-C ../cmake/presets/intel.cmake` should switch the compiler ``-C ../cmake/presets/intel.cmake`` should switch the compiler
toolchain to the legacy Intel compilers, `-C ../cmake/presets/oneapi.cmake` toolchain to the legacy Intel compilers, ``-C ../cmake/presets/oneapi.cmake``
will switch to the LLVM based oneAPI Intel compilers, will switch to the LLVM based oneAPI Intel compilers,
and `-C ../cmake/presets/pgi.cmake` ``-C ../cmake/presets/pgi.cmake`` will switch the compiler to the PGI compilers,
will switch the compiler to the PGI compilers. and ``-C ../cmake/presets/nvhpc.cmake`` will switch to the NVHPC compilers.
Furthermore, you can set ``CMAKE_TUNE_FLAGS`` to specifically add Furthermore, you can set ``CMAKE_TUNE_FLAGS`` to specifically add
compiler flags to tune for optimal performance on given hosts. compiler flags to tune for optimal performance on given hosts.
@ -260,7 +268,7 @@ LAMMPS.
When the cmake command completes, it prints a summary to the When the cmake command completes, it prints a summary to the
screen which compilers it is using and what flags and settings screen which compilers it is using and what flags and settings
will be used for the compilation. Note that if the top-level will be used for the compilation. Note that if the top-level
compiler is mpicxx, it is simply a wrapper on a real compiler. compiler is ``mpicxx``, it is simply a wrapper on a real compiler.
The underlying compiler info is what CMake will try to The underlying compiler info is what CMake will try to
determine and report. You should check to confirm you are determine and report. You should check to confirm you are
using the compiler and optimization flags you want. using the compiler and optimization flags you want.
@ -279,19 +287,19 @@ LAMMPS.
.. code-block:: make .. code-block:: make
CC = mpicxx CC = mpicxx
CCFLAGS = -g -O3 CCFLAGS = -g -O3
LINK = mpicxx LINK = mpicxx
LINKFLAGS = -g -O LINKFLAGS = -g -O
Serial build with GNU gcc (see ``src/MAKE/Makefile.serial``): Serial build with GNU gcc (see ``src/MAKE/Makefile.serial``):
.. code-block:: make .. code-block:: make
CC = g++ CC = g++
CCFLAGS = -g -O3 CCFLAGS = -g -O3
LINK = g++ LINK = g++
LINKFLAGS = -g -O LINKFLAGS = -g -O
.. note:: .. note::
@ -317,10 +325,10 @@ LAMMPS.
there may be specific compiler or linker flags that are either there may be specific compiler or linker flags that are either
required or recommended to enable required features and to required or recommended to enable required features and to
achieve optimal performance. You need to include these in the achieve optimal performance. You need to include these in the
CCFLAGS and LINKFLAGS settings above. For details, see the ``CCFLAGS`` and ``LINKFLAGS`` settings above. For details, see the
documentation for the individual packages listed on the documentation for the individual packages listed on the
:doc:`Speed_packages` page. Or examine these files in the :doc:`Speed_packages` page. Or examine these files in the
src/MAKE/OPTIONS directory. They correspond to each of the 5 ``src/MAKE/OPTIONS`` directory. They correspond to each of the 5
accelerator packages and their hardware variants: accelerator packages and their hardware variants:
.. code-block:: bash .. code-block:: bash
@ -389,7 +397,8 @@ running LAMMPS from Python via its library interface.
make machine # build LAMMPS executable lmp_machine make machine # build LAMMPS executable lmp_machine
make mode=static machine # same as "make machine" make mode=static machine # same as "make machine"
make mode=shared machine # build LAMMPS shared lib liblammps_machine.so instead make mode=shared machine # build LAMMPS shared lib liblammps_machine.so
# instead
The "static" build will generate a static library called The "static" build will generate a static library called
``liblammps_machine.a`` and an executable named ``lmp_machine``\ , ``liblammps_machine.a`` and an executable named ``lmp_machine``\ ,
@ -451,7 +460,7 @@ installation.
Including or removing debug support Including or removing debug support
----------------------------------- -----------------------------------
By default the compilation settings will include the *-g* flag which By default the compilation settings will include the ``-g`` flag which
instructs the compiler to include debug information (e.g. which line of instructs the compiler to include debug information (e.g. which line of
source code a particular instruction correspond to). This can be source code a particular instruction correspond to). This can be
extremely useful in case LAMMPS crashes and can help to provide crucial extremely useful in case LAMMPS crashes and can help to provide crucial
@ -464,7 +473,7 @@ If this is a concern, you can change the compilation settings or remove
the debug information from the LAMMPS executable: the debug information from the LAMMPS executable:
- **Traditional make**: edit your ``Makefile.<machine>`` to remove the - **Traditional make**: edit your ``Makefile.<machine>`` to remove the
*-g* flag from the ``CCFLAGS`` and ``LINKFLAGS`` definitions ``-g`` flag from the ``CCFLAGS`` and ``LINKFLAGS`` definitions
- **CMake**: use ``-D CMAKE_BUILD_TYPE=Release`` or explicitly reset - **CMake**: use ``-D CMAKE_BUILD_TYPE=Release`` or explicitly reset
the applicable compiler flags (best done using the text mode or the applicable compiler flags (best done using the text mode or
graphical user interface). graphical user interface).
@ -489,8 +498,10 @@ using CMake or Make.
.. code-block:: bash .. code-block:: bash
-D BUILD_TOOLS=value # yes or no (default) -D BUILD_TOOLS=value # yes or no (default). Build binary2txt,
-D BUILD_LAMMPS_SHELL=value # yes or no (default) # chain.x, micelle2d.x, msi2lmp, phana,
# stl_bin2txt
-D BUILD_LAMMPS_GUI=value # yes or no (default). Build LAMMPS-GUI
The generated binaries will also become part of the LAMMPS installation The generated binaries will also become part of the LAMMPS installation
(see below). (see below).
@ -504,10 +515,10 @@ using CMake or Make.
make binary2txt # build only binary2txt tool make binary2txt # build only binary2txt tool
make chain # build only chain tool make chain # build only chain tool
make micelle2d # build only micelle2d tool make micelle2d # build only micelle2d tool
make thermo_extract # build only thermo_extract tool
cd lammps/tools/lammps-shell .. note::
make # build LAMMPS shell
Building the LAMMPS-GUI *requires* building LAMMPS with CMake.
---------- ----------

View File

@ -16,8 +16,7 @@ environments is on a :doc:`separate page <Howto_cmake>`.
.. note:: .. note::
LAMMPS currently requires that CMake version 3.10 or later is available; LAMMPS currently requires that CMake version 3.16 or later is available.
version 3.12 or later is preferred.
.. warning:: .. warning::
@ -34,19 +33,18 @@ Advantages of using CMake
^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^
CMake is an alternative to compiling LAMMPS in the traditional way CMake is an alternative to compiling LAMMPS in the traditional way
through :doc:`(manually customized) makefiles <Build_make>` and a recent through :doc:`(manually customized) makefiles <Build_make>`. Using
addition to LAMMPS thanks to the efforts of Christoph Junghans (LANL) CMake has multiple advantages that are specifically helpful for
and Richard Berger (Temple U). Using CMake has multiple advantages that people with limited experience in compiling software or for people
are specifically helpful for people with limited experience in compiling that want to modify or extend LAMMPS.
software or for people that want to modify or extend LAMMPS.
- CMake can detect available hardware, tools, features, and libraries - CMake can detect available hardware, tools, features, and libraries
and adapt the LAMMPS default build configuration accordingly. and adapt the LAMMPS default build configuration accordingly.
- CMake can generate files for different build tools and integrated - CMake can generate files for different build tools and integrated
development environments (IDE). development environments (IDE).
- CMake supports customization of settings with a command line, text - CMake supports customization of settings with a command line, text
mode, or graphical user interface. No knowledge of file formats or mode, or graphical user interface. No manual editing of files,
complex command line syntax is required. knowledge of file formats or complex command line syntax is required.
- All enabled components are compiled in a single build operation. - All enabled components are compiled in a single build operation.
- Automated dependency tracking for all files and configuration options. - Automated dependency tracking for all files and configuration options.
- Support for true out-of-source compilation. Multiple configurations - Support for true out-of-source compilation. Multiple configurations
@ -133,20 +131,20 @@ file called ``CMakeLists.txt`` (for LAMMPS it is located in the
configuration step. The cache file contains all current CMake settings. configuration step. The cache file contains all current CMake settings.
To modify settings, enable or disable features, you need to set To modify settings, enable or disable features, you need to set
*variables* with either the *-D* command line flag (``-D *variables* with either the ``-D`` command line flag (``-D
VARIABLE1_NAME=value``) or change them in the text mode of the graphical VARIABLE1_NAME=value``) or change them in the text mode of the graphical
user interface. The *-D* flag can be used several times in one command. user interface. The ``-D`` flag can be used several times in one command.
For your convenience, we provide :ref:`CMake presets <cmake_presets>` For your convenience, we provide :ref:`CMake presets <cmake_presets>`
that combine multiple settings to enable optional LAMMPS packages or use that combine multiple settings to enable optional LAMMPS packages or use
a different compiler tool chain. Those are loaded with the *-C* flag a different compiler tool chain. Those are loaded with the ``-C`` flag
(``-C ../cmake/presets/basic.cmake``). This step would only be needed (``-C ../cmake/presets/basic.cmake``). This step would only be needed
once, as the settings from the preset files are stored in the once, as the settings from the preset files are stored in the
``CMakeCache.txt`` file. It is also possible to customize the build ``CMakeCache.txt`` file. It is also possible to customize the build
by adding one or more *-D* flags to the CMake command line. by adding one or more ``-D`` flags to the CMake command line.
Generating files for alternate build tools (e.g. Ninja) and project files Generating files for alternate build tools (e.g. Ninja) and project files
for IDEs like Eclipse, CodeBlocks, or Kate can be selected using the *-G* for IDEs like Eclipse, CodeBlocks, or Kate can be selected using the ``-G``
command line flag. A list of available generator settings for your command line flag. A list of available generator settings for your
specific CMake version is given when running ``cmake --help``. specific CMake version is given when running ``cmake --help``.
@ -173,19 +171,19 @@ files. E.g. with:
In that case the resulting binaries are not in the build folder directly In that case the resulting binaries are not in the build folder directly
but in subdirectories corresponding to the build type (i.e. Release in but in subdirectories corresponding to the build type (i.e. Release in
the example from above). Similarly, for running unit tests the the example from above). Similarly, for running unit tests the
configuration is selected with the *-C* flag: configuration is selected with the ``-C`` flag:
.. code-block:: bash .. code-block:: bash
ctest -C Debug ctest -C Debug
The CMake scripts in LAMMPS have basic support for being compiled using a The CMake scripts in LAMMPS have basic support for being compiled using
multi-config build system, but not all of it has been ported. This is in a multi-config build system, but not all of it has been ported. This is
particular applicable to compiling packages that require additional libraries in particular applicable to compiling packages that require additional
that would be downloaded and compiled by CMake. The "windows" preset file libraries that would be downloaded and compiled by CMake. The
tries to keep track of which packages can be compiled natively with the ``windows.cmake`` preset file tries to keep track of which packages can
MSVC compilers out-of-the box. Not all of those external libraries are be compiled natively with the MSVC compilers out-of-the box. Not all of
portable to Windows, either. the external libraries are portable to Windows, either.
Installing CMake Installing CMake

View File

@ -88,8 +88,8 @@ on recording all commands required to do the compilation.
.. _sanitizer: .. _sanitizer:
Address, Undefined Behavior, and Thread Sanitizer Support (CMake only) Address, Leak, Undefined Behavior, and Thread Sanitizer Support (CMake only)
---------------------------------------------------------------------- ----------------------------------------------------------------------------
Compilers such as GCC and Clang support generating instrumented binaries Compilers such as GCC and Clang support generating instrumented binaries
which use different sanitizer libraries to detect problems in the code which use different sanitizer libraries to detect problems in the code
@ -110,6 +110,7 @@ compilation and linking stages. This is done through setting the
-D ENABLE_SANITIZER=none # no sanitizer active (default) -D ENABLE_SANITIZER=none # no sanitizer active (default)
-D ENABLE_SANITIZER=address # enable address sanitizer / memory leak checker -D ENABLE_SANITIZER=address # enable address sanitizer / memory leak checker
-D ENABLE_SANITIZER=hwaddress # enable hardware assisted address sanitizer / memory leak checker
-D ENABLE_SANITIZER=leak # enable memory leak checker (only) -D ENABLE_SANITIZER=leak # enable memory leak checker (only)
-D ENABLE_SANITIZER=undefined # enable undefined behavior sanitizer -D ENABLE_SANITIZER=undefined # enable undefined behavior sanitizer
-D ENABLE_SANITIZER=thread # enable thread sanitizer -D ENABLE_SANITIZER=thread # enable thread sanitizer
@ -122,32 +123,59 @@ Code Coverage and Unit Testing (CMake only)
------------------------------------------- -------------------------------------------
The LAMMPS code is subject to multiple levels of automated testing The LAMMPS code is subject to multiple levels of automated testing
during development: integration testing (i.e. whether the code compiles during development:
on various platforms and with a variety of settings), unit testing
(i.e. whether certain individual parts of the code produce the expected
results for given inputs), run testing (whether selected complete input
decks run without crashing for multiple configurations), and regression
testing (i.e. whether selected input examples reproduce the same
results over a given number of steps and operations within a given
error margin). The status of this automated testing can be viewed on
`https://ci.lammps.org <https://ci.lammps.org>`_.
The scripts and inputs for integration, run, and regression testing - Integration testing (i.e. whether the code compiles
are maintained in a on various platforms and with a variety of compilers and settings),
`separate repository <https://github.com/lammps/lammps-testing>`_ - Unit testing (i.e. whether certain functions or classes of the code
of the LAMMPS project on GitHub. produce the expected results for given inputs),
- Run testing (i.e. whether selected input decks can run to completion
without crashing for multiple configurations),
- Regression testing (i.e. whether selected input examples reproduce the
same results over a given number of steps and operations within a
given error margin).
The unit testing facility is integrated into the CMake build process The status of this automated testing can be viewed on `https://ci.lammps.org
of the LAMMPS source code distribution itself. It can be enabled by <https://ci.lammps.org>`_.
The scripts and inputs for integration, run, and legacy regression
testing are maintained in a `separate repository
<https://github.com/lammps/lammps-testing>`_ of the LAMMPS project on
GitHub. A few tests are also run as GitHub Actions and their
configuration files are in the ``.github/workflows/`` folder of the
LAMMPS git tree.
Regression tests can also be performed locally with the :ref:`regression
tester tool <regression>`. The tool checks if a given LAMMPS binary run
with selected input examples produces thermo output that is consistent
with the provided log files. The script can be run in one pass over all
available input files, but it can also first create multiple lists of
inputs or folders that can then be run with multiple workers
concurrently to speed things up. Another mode allows to do a quick
check of inputs that contain commands that have changes in the current
checkout branch relative to a git branch. This works similar to the two
pass mode, but will select only shorter runs and no more than 100 inputs
that are chosen randomly. This ensures that this test runs
significantly faster compared to the full test run. These test runs can
also be performed with instrumented LAMMPS binaries (see previous
section).
The unit testing facility is integrated into the CMake build process of
the LAMMPS source code distribution itself. It can be enabled by
setting ``-D ENABLE_TESTING=on`` during the CMake configuration step. setting ``-D ENABLE_TESTING=on`` during the CMake configuration step.
It requires the `YAML <https://pyyaml.org/>`_ library and development It requires the `YAML <https://pyyaml.org/>`_ library and matching
headers (if those are not found locally a recent version will be development headers to compile (if those are not found locally a recent
downloaded and compiled along with LAMMPS and the test program) to version of that library will be downloaded and compiled along with
compile and will download and compile a specific recent version of the LAMMPS and the test programs) and will download and compile a specific
`Googletest <https://github.com/google/googletest/>`_ C++ test framework version of the `GoogleTest <https://github.com/google/googletest/>`_ C++
for implementing the tests. test framework that is used to implement the tests. Those unit tests
may be combined with memory access and leak checking with valgrind
(see below for how to enable it). In that case, running so-called
death tests will create a lot of false positives and thus they can be
disabled by configuring compilation with the additional setting
``-D SKIP_DEATH_TESTS=on``.
.. admonition:: Software version requirements for testing .. admonition:: Software version and LAMMPS configuration requirements
:class: note :class: note
The compiler and library version requirements for the testing The compiler and library version requirements for the testing
@ -155,7 +183,7 @@ for implementing the tests.
example the default GNU C++ and Fortran compilers of RHEL/CentOS 7.x example the default GNU C++ and Fortran compilers of RHEL/CentOS 7.x
(version 4.8.x) are not sufficient. The CMake configuration will try (version 4.8.x) are not sufficient. The CMake configuration will try
to detect incompatible versions and either skip incompatible tests or to detect incompatible versions and either skip incompatible tests or
stop with an error. Also the number of tests will depend on stop with an error. Also the number of available tests will depend on
installed LAMMPS packages, development environment, operating system, installed LAMMPS packages, development environment, operating system,
and configuration settings. and configuration settings.
@ -168,24 +196,24 @@ The output of this command will be looking something like this:
$ ctest $ ctest
Test project /home/akohlmey/compile/lammps/build-testing Test project /home/akohlmey/compile/lammps/build-testing
Start 1: RunLammps Start 1: RunLammps
1/563 Test #1: RunLammps .......................................... Passed 0.28 sec 1/563 Test #1: RunLammps .................................. Passed 0.28 sec
Start 2: HelpMessage Start 2: HelpMessage
2/563 Test #2: HelpMessage ........................................ Passed 0.06 sec 2/563 Test #2: HelpMessage ................................ Passed 0.06 sec
Start 3: InvalidFlag Start 3: InvalidFlag
3/563 Test #3: InvalidFlag ........................................ Passed 0.06 sec 3/563 Test #3: InvalidFlag ................................ Passed 0.06 sec
Start 4: Tokenizer Start 4: Tokenizer
4/563 Test #4: Tokenizer .......................................... Passed 0.05 sec 4/563 Test #4: Tokenizer .................................. Passed 0.05 sec
Start 5: MemPool Start 5: MemPool
5/563 Test #5: MemPool ............................................ Passed 0.05 sec 5/563 Test #5: MemPool .................................... Passed 0.05 sec
Start 6: ArgUtils Start 6: ArgUtils
6/563 Test #6: ArgUtils ........................................... Passed 0.05 sec 6/563 Test #6: ArgUtils ................................... Passed 0.05 sec
[...] [...]
Start 561: ImproperStyle:zero Start 561: ImproperStyle:zero
561/563 Test #561: ImproperStyle:zero ................................. Passed 0.07 sec 561/563 Test #561: ImproperStyle:zero ......................... Passed 0.07 sec
Start 562: TestMliapPyUnified Start 562: TestMliapPyUnified
562/563 Test #562: TestMliapPyUnified ................................. Passed 0.16 sec 562/563 Test #562: TestMliapPyUnified ......................... Passed 0.16 sec
Start 563: TestPairList Start 563: TestPairList
563/563 Test #563: TestPairList ....................................... Passed 0.06 sec 563/563 Test #563: TestPairList ............................... Passed 0.06 sec
100% tests passed, 0 tests failed out of 563 100% tests passed, 0 tests failed out of 563
@ -200,24 +228,25 @@ The output of this command will be looking something like this:
The ``ctest`` command has many options, the most important ones are: The ``ctest`` command has many options, the most important ones are:
.. list-table:: .. list-table::
:widths: 20 80
* - Option * - Option
- Function - Function
* - -V * - ``-V``
- verbose output: display output of individual test runs - verbose output: display output of individual test runs
* - -j <num> * - ``-j <num>``
- parallel run: run <num> tests in parallel - parallel run: run <num> tests in parallel
* - -R <regex> * - ``-R <regex>``
- run subset of tests matching the regular expression <regex> - run subset of tests matching the regular expression <regex>
* - -E <regex> * - ``-E <regex>``
- exclude subset of tests matching the regular expression <regex> - exclude subset of tests matching the regular expression <regex>
* - -L <regex> * - ``-L <regex>``
- run subset of tests with a label matching the regular expression <regex> - run subset of tests with a label matching the regular expression <regex>
* - -LE <regex> * - ``-LE <regex>``
- exclude subset of tests with a label matching the regular expression <regex> - exclude subset of tests with a label matching the regular expression <regex>
* - -N * - ``-N``
- dry-run: display list of tests without running them - dry-run: display list of tests without running them
* - -T memcheck * - ``-T memcheck``
- run tests with valgrind memory checker (if available) - run tests with valgrind memory checker (if available)
In its full implementation, the unit test framework will consist of multiple In its full implementation, the unit test framework will consist of multiple
@ -234,12 +263,31 @@ will be skipped if prerequisite features are not available in LAMMPS.
time. Preference is given to parts of the code base that are easy to time. Preference is given to parts of the code base that are easy to
test or commonly used. test or commonly used.
Tests for styles of the same kind of style (e.g. pair styles or bond Tests as shown by the ``ctest`` program are command lines defined in the
styles) are performed with the same test executable using different ``CMakeLists.txt`` files in the ``unittest`` directory tree. A few
input files in YAML format. So to add a test for another style of the tests simply execute LAMMPS with specific command line flags and check
same kind it may be sufficient to add a suitable YAML file. the output to the screen for expected content. A large number of unit
:doc:`Detailed instructions for adding tests <Developer_unittest>` are tests are special tests programs using the `GoogleTest framework
provided in the Programmer Guide part of the manual. <https://github.com/google/googletest/>`_ and linked to the LAMMPS
library that test individual functions or create a LAMMPS class
instance, execute one or more commands and check data inside the LAMMPS
class hierarchy. There are also tests for the C-library, Fortran, and
Python module interfaces to LAMMPS. The Python tests use the Python
"unittest" module in a similar fashion than the others use `GoogleTest`.
These special test programs are structured to perform multiple
individual tests internally and each of those contains several checks
(aka assertions) for internal data being changed as expected.
Tests for force computing or modifying styles (e.g. styles for non-bonded
and bonded interactions and selected fixes) are run by using a more generic
test program that reads its input from files in YAML format. The YAML file
provides the information on how to customized the test program to test
a specific style and - if needed - with specific settings.
To add a test for another, similar style (e.g. a new pair style) it is
usually sufficient to add a suitable YAML file. :doc:`Detailed
instructions for adding tests <Developer_unittest>` are provided in the
Programmer Guide part of the manual. A description of what happens
during the tests is given below.
Unit tests for force styles Unit tests for force styles
^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -255,16 +303,18 @@ A test run is then a a collection multiple individual test runs each
with many comparisons to reference results based on template input with many comparisons to reference results based on template input
files, individual command settings, relative error margins, and files, individual command settings, relative error margins, and
reference data stored in a YAML format file with ``.yaml`` reference data stored in a YAML format file with ``.yaml``
suffix. Currently the programs ``test_pair_style``, ``test_bond_style``, and suffix. Currently the programs ``test_pair_style``, ``test_bond_style``,
``test_angle_style`` are implemented. They will compare forces, energies and ``test_angle_style``, ``test_dihedral_style``, and
(global) stress for all atoms after a ``run 0`` calculation and after a ``test_improper_style`` are implemented. They will compare forces,
few steps of MD with :doc:`fix nve <fix_nve>`, each in multiple variants energies and (global) stress for all atoms after a ``run 0`` calculation
with different settings and also for multiple accelerated styles. If a and after a few steps of MD with :doc:`fix nve <fix_nve>`, each in
prerequisite style or package is missing, the individual tests are multiple variants with different settings and also for multiple
skipped. All tests will be executed on a single MPI process, so using accelerated styles. If a prerequisite style or package is missing, the
the CMake option ``-D BUILD_MPI=off`` can significantly speed up testing, individual tests are skipped. All force style tests will be executed on
since this will skip the MPI initialization for each test run. a single MPI process, so using the CMake option ``-D BUILD_MPI=off`` can
Below is an example command and output: significantly speed up testing, since this will skip the MPI
initialization for each test run. Below is an example command and
output:
.. code-block:: console .. code-block:: console
@ -302,16 +352,17 @@ paths in the individual source files.
The force style test programs have a common set of options: The force style test programs have a common set of options:
.. list-table:: .. list-table::
:widths: 25 75
* - Option * - Option
- Function - Function
* - -g <newfile> * - ``-g <newfile>``
- regenerate reference data in new YAML file - regenerate reference data in new YAML file
* - -u * - ``-u``
- update reference data in the original YAML file - update reference data in the original YAML file
* - -s * - ``-s``
- print error statistics for each group of comparisons - print error statistics for each group of comparisons
* - -v * - ``-v``
- verbose output: also print the executed LAMMPS commands - verbose output: also print the executed LAMMPS commands
The ``ctest`` tool has no mechanism to directly pass flags to the individual The ``ctest`` tool has no mechanism to directly pass flags to the individual
@ -325,10 +376,10 @@ set in an environment variable ``TEST_ARGS``. Example:
To add a test for a style that is not yet covered, it is usually best To add a test for a style that is not yet covered, it is usually best
to copy a YAML file for a similar style to a new file, edit the details to copy a YAML file for a similar style to a new file, edit the details
of the style (how to call it, how to set its coefficients) and then of the style (how to call it, how to set its coefficients) and then
run test command with either the *-g* and the replace the initial run test command with either the ``-g`` and the replace the initial
test file with the regenerated one or the *-u* option. The *-u* option test file with the regenerated one or the ``-u`` option. The ``-u`` option
will destroy the original file, if the generation run does not complete, will destroy the original file, if the generation run does not complete,
so using *-g* is recommended unless the YAML file is fully tested so using ``-g`` is recommended unless the YAML file is fully tested
and working. and working.
Some of the force style tests are rather slow to run and some are very Some of the force style tests are rather slow to run and some are very
@ -416,15 +467,16 @@ When compiling LAMMPS with enabled tests, most test executables will
need to be linked against the LAMMPS library. Since this can be a very need to be linked against the LAMMPS library. Since this can be a very
large library with many C++ objects when many packages are enabled, link large library with many C++ objects when many packages are enabled, link
times can become very long on machines that use the GNU BFD linker (e.g. times can become very long on machines that use the GNU BFD linker (e.g.
Linux systems). Alternatives like the ``lld`` linker of the LLVM project Linux systems). Alternatives like the ``mold`` linker, the ``lld``
or the ``gold`` linker available with GNU binutils can speed up this step linker of the LLVM project, or the ``gold`` linker available with GNU
substantially. CMake will by default test if any of the two can be binutils can speed up this step substantially (in this order). CMake
enabled and use it when ``ENABLE_TESTING`` is active. It can also be will by default test if any of the three can be enabled and use it when
selected manually through the ``CMAKE_CUSTOM_LINKER`` CMake variable. ``ENABLE_TESTING`` is active. It can also be selected manually through
Allowed values are ``lld``, ``gold``, ``bfd``, or ``default``. The the ``CMAKE_CUSTOM_LINKER`` CMake variable. Allowed values are
``default`` option will use the system default linker otherwise, the ``mold``, ``lld``, ``gold``, ``bfd``, or ``default``. The ``default``
linker is chosen explicitly. This option is only available for the option will use the system default linker otherwise, the linker is
GNU or Clang C++ compiler. chosen explicitly. This option is only available for the GNU or Clang
C++ compilers.
Tests for other components and utility functions Tests for other components and utility functions
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -477,27 +529,51 @@ After post-processing with ``gen_coverage_html`` the results are in
a folder ``coverage_html`` and can be viewed with a web browser. a folder ``coverage_html`` and can be viewed with a web browser.
The images below illustrate how the data is presented. The images below illustrate how the data is presented.
.. list-table:: .. only:: not latex
* - .. figure:: JPG/coverage-overview-top.png .. list-table::
:scale: 25%
Top of the overview page * - .. figure:: JPG/coverage-overview-top.png
:scale: 25%
- .. figure:: JPG/coverage-overview-manybody.png Top of the overview page
:scale: 25%
Styles with good coverage - .. figure:: JPG/coverage-overview-manybody.png
:scale: 25%
- .. figure:: JPG/coverage-file-top.png Styles with good coverage
:scale: 25%
Top of individual source page - .. figure:: JPG/coverage-file-top.png
:scale: 25%
- .. figure:: JPG/coverage-file-branches.png Top of individual source page
:scale: 25%
Source page with branches - .. figure:: JPG/coverage-file-branches.png
:scale: 25%
Source page with branches
.. only:: latex
.. figure:: JPG/coverage-overview-top.png
:width: 60%
Top of the overview page
.. figure:: JPG/coverage-overview-manybody.png
:width: 60%
Styles with good coverage
.. figure:: JPG/coverage-file-top.png
:width: 60%
Top of individual source page
.. figure:: JPG/coverage-file-branches.png
:width: 60%
Source page with branches
Coding style utilities Coding style utilities
---------------------- ----------------------
@ -518,6 +594,8 @@ The following options are available.
make fix-errordocs # remove error docs in header files make fix-errordocs # remove error docs in header files
make check-permissions # search for files with permissions issues make check-permissions # search for files with permissions issues
make fix-permissions # correct permissions issues in files make fix-permissions # correct permissions issues in files
make check-docs # search for several issues in the manual
make check-version # list files with pending release version tags
make check # run all check targets from above make check # run all check targets from above
These should help to make source and documentation files conforming These should help to make source and documentation files conforming
@ -567,11 +645,35 @@ The following target are available for both, GNU make and CMake:
GitHub command line interface GitHub command line interface
----------------------------- -----------------------------
GitHub is developing a `tool for the command line GitHub has developed a `command line tool <https://cli.github.com>`_
<https://cli.github.com>`_ that interacts with the GitHub website via a to interact with the GitHub website via a command called ``gh``.
command called ``gh``. This can be extremely convenient when working This is extremely convenient when working with a Git repository hosted
with a Git repository hosted on GitHub (like LAMMPS). It is thus highly on GitHub (like LAMMPS). It is thus highly recommended to install it
recommended to install it when doing LAMMPS development. when doing LAMMPS development. To use ``gh`` you must be within a git
checkout of a repository and you must obtain an authentication token
to connect your checkout with a GitHub user. This is done with the
command: ``gh auth login`` where you then have to follow the prompts.
Here are some examples:
The capabilities of the ``gh`` command is continually expanding, so .. list-table::
please see the documentation at https://cli.github.com/manual/ :header-rows: 1
:widths: 34 66
* - Command
- Description
* - ``gh pr list``
- List currently open pull requests
* - ``gh pr checks 404``
- Shows the status of all checks for pull request #404
* - ``gh pr view 404``
- Shows the description and recent comments for pull request #404
* - ``gh co 404``
- Check out the branch from pull request #404; set up for pushing changes
* - ``gh issue list``
- List currently open issues
* - ``gh issue view 430 --comments``
- Shows the description and all comments for issue #430
The capabilities of the ``gh`` command are continually expanding, so
for more details please see the documentation at https://cli.github.com/manual/
or use ``gh --help`` or ``gh <command> --help`` for embedded help.

File diff suppressed because it is too large Load Diff

View File

@ -37,7 +37,7 @@ executable code from the library is copied into the calling executable.
.. tab:: CMake build .. tab:: CMake build
This assumes that LAMMPS has been configured without setting a This assumes that LAMMPS has been configured without setting a
``LAMMPS_MACHINE`` name, installed with "make install", and the ``LAMMPS_MACHINE`` name, installed with ``make install``, and the
``PKG_CONFIG_PATH`` environment variable has been updated to ``PKG_CONFIG_PATH`` environment variable has been updated to
include the ``liblammps.pc`` file installed into the configured include the ``liblammps.pc`` file installed into the configured
destination folder. The commands to compile and link a coupled destination folder. The commands to compile and link a coupled
@ -45,8 +45,8 @@ executable code from the library is copied into the calling executable.
.. code-block:: bash .. code-block:: bash
mpicc -c -O $(pkgconf liblammps --cflags) caller.c mpicc -c -O $(pkg-config --cflags liblammps) caller.c
mpicxx -o caller caller.o -$(pkgconf liblammps --libs) mpicxx -o caller caller.o -$(pkg-config --libs liblammps)
.. tab:: Traditional make .. tab:: Traditional make
@ -59,10 +59,10 @@ executable code from the library is copied into the calling executable.
mpicc -c -O -I${HOME}/lammps/src caller.c mpicc -c -O -I${HOME}/lammps/src caller.c
mpicxx -o caller caller.o -L${HOME}/lammps/src -llammps_mpi mpicxx -o caller caller.o -L${HOME}/lammps/src -llammps_mpi
The *-I* argument is the path to the location of the ``library.h`` The ``-I`` argument is the path to the location of the ``library.h``
header file containing the interface to the LAMMPS C-style library header file containing the interface to the LAMMPS C-style library
interface. The *-L* argument is the path to where the interface. The ``-L`` argument is the path to where the
``liblammps_mpi.a`` file is located. The *-llammps_mpi* argument ``liblammps_mpi.a`` file is located. The ``-llammps_mpi`` argument
is shorthand for telling the compiler to link the file is shorthand for telling the compiler to link the file
``liblammps_mpi.a``. If LAMMPS has been built as a shared ``liblammps_mpi.a``. If LAMMPS has been built as a shared
library, then the linker will use ``liblammps_mpi.so`` instead. library, then the linker will use ``liblammps_mpi.so`` instead.
@ -142,7 +142,7 @@ When linking to LAMMPS built as a shared library, the situation becomes
much simpler, as all dependent libraries and objects are either included much simpler, as all dependent libraries and objects are either included
in the shared library or registered as a dependent library in the shared in the shared library or registered as a dependent library in the shared
library file. Thus, those libraries need not be specified when linking library file. Thus, those libraries need not be specified when linking
the calling executable. Only the *-I* flags are needed. So the example the calling executable. Only the ``-I`` flags are needed. So the example
case from above of the serial version static LAMMPS library with the case from above of the serial version static LAMMPS library with the
POEMS package installed becomes: POEMS package installed becomes:
@ -155,8 +155,8 @@ POEMS package installed becomes:
.. code-block:: bash .. code-block:: bash
mpicc -c -O $(pkgconf liblammps --cflags) caller.c mpicc -c -O $(pkg-config --cflags liblammps) caller.c
mpicxx -o caller caller.o -$(pkgconf --libs) mpicxx -o caller caller.o -$(pkg-config --libs liblammps)
.. tab:: Traditional make .. tab:: Traditional make

View File

@ -25,7 +25,7 @@ additional tools to be available and functioning.
require adding flags like ``-std=c++11`` to enable the C++11 mode. require adding flags like ``-std=c++11`` to enable the C++11 mode.
* A Bourne shell compatible "Unix" shell program (frequently this is ``bash``) * A Bourne shell compatible "Unix" shell program (frequently this is ``bash``)
* A few shell utilities: ``ls``, ``mv``, ``ln``, ``rm``, ``grep``, ``sed``, ``tr``, ``cat``, ``touch``, ``diff``, ``dirname`` * A few shell utilities: ``ls``, ``mv``, ``ln``, ``rm``, ``grep``, ``sed``, ``tr``, ``cat``, ``touch``, ``diff``, ``dirname``
* Python (optional, required for ``make lib-<pkg>`` in the src * Python (optional, required for ``make lib-<pkg>`` in the ``src``
folder). Python scripts are currently tested with python 2.7 and folder). Python scripts are currently tested with python 2.7 and
3.6 to 3.11. The procedure for :doc:`building the documentation 3.6 to 3.11. The procedure for :doc:`building the documentation
<Build_manual>` *requires* Python 3.5 or later. <Build_manual>` *requires* Python 3.5 or later.

View File

@ -55,7 +55,6 @@ packages:
* :ref:`ML-POD <ml-pod>` * :ref:`ML-POD <ml-pod>`
* :ref:`ML-QUIP <ml-quip>` * :ref:`ML-QUIP <ml-quip>`
* :ref:`MOLFILE <molfile>` * :ref:`MOLFILE <molfile>`
* :ref:`MSCG <mscg>`
* :ref:`NETCDF <netcdf>` * :ref:`NETCDF <netcdf>`
* :ref:`OPENMP <openmp>` * :ref:`OPENMP <openmp>`
* :ref:`OPT <opt>` * :ref:`OPT <opt>`
@ -63,6 +62,7 @@ packages:
* :ref:`POEMS <poems>` * :ref:`POEMS <poems>`
* :ref:`PYTHON <python>` * :ref:`PYTHON <python>`
* :ref:`QMMM <qmmm>` * :ref:`QMMM <qmmm>`
* :ref:`RHEO <rheo>`
* :ref:`SCAFACOS <scafacos>` * :ref:`SCAFACOS <scafacos>`
* :ref:`VORONOI <voronoi>` * :ref:`VORONOI <voronoi>`
* :ref:`VTK <vtk>` * :ref:`VTK <vtk>`
@ -100,10 +100,10 @@ versus make.
.. code-block:: bash .. code-block:: bash
cd lammps/src cd lammps/src
make ps # check which packages are currently installed make ps # check which packages are currently installed
make yes-name # install a package with name make yes-name # install a package with name
make no-name # uninstall a package with name make no-name # uninstall a package with name
make mpi # build LAMMPS with whatever packages are now installed make mpi # build LAMMPS with whatever packages are now installed
Examples: Examples:
@ -172,17 +172,41 @@ make a copy of one of them and modify it to suit your needs.
.. code-block:: bash .. code-block:: bash
cmake -C ../cmake/presets/basic.cmake [OPTIONS] ../cmake # enable just a few core packages # enable just a few core packages
cmake -C ../cmake/presets/most.cmake [OPTIONS] ../cmake # enable most packages cmake -C ../cmake/presets/basic.cmake [OPTIONS] ../cmake
cmake -C ../cmake/presets/download.cmake [OPTIONS] ../cmake # enable packages which download sources or potential files
cmake -C ../cmake/presets/nolib.cmake [OPTIONS] ../cmake # disable packages that do require extra libraries or tools # enable most packages
cmake -C ../cmake/presets/clang.cmake [OPTIONS] ../cmake # change settings to use the Clang compilers by default cmake -C ../cmake/presets/most.cmake [OPTIONS] ../cmake
cmake -C ../cmake/presets/gcc.cmake [OPTIONS] ../cmake # change settings to use the GNU compilers by default
cmake -C ../cmake/presets/intel.cmake [OPTIONS] ../cmake # change settings to use the Intel compilers by default # enable packages which download sources or potential files
cmake -C ../cmake/presets/pgi.cmake [OPTIONS] ../cmake # change settings to use the PGI compilers by default cmake -C ../cmake/presets/download.cmake [OPTIONS] ../cmake
cmake -C ../cmake/presets/all_on.cmake [OPTIONS] ../cmake # enable all packages
cmake -C ../cmake/presets/all_off.cmake [OPTIONS] ../cmake # disable all packages # disable packages that do require extra libraries or tools
mingw64-cmake -C ../cmake/presets/mingw-cross.cmake [OPTIONS] ../cmake # compile with MinGW cross-compilers cmake -C ../cmake/presets/nolib.cmake [OPTIONS] ../cmake
# change settings to use the Clang compilers by default
cmake -C ../cmake/presets/clang.cmake [OPTIONS] ../cmake
# change settings to use the GNU compilers by default
cmake -C ../cmake/presets/gcc.cmake [OPTIONS] ../cmake
# change settings to use the Intel compilers by default
cmake -C ../cmake/presets/intel.cmake [OPTIONS] ../cmake
# change settings to use the PGI compilers by default
cmake -C ../cmake/presets/pgi.cmake [OPTIONS] ../cmake
# enable all packages
cmake -C ../cmake/presets/all_on.cmake [OPTIONS] ../cmake
# disable all packages
cmake -C ../cmake/presets/all_off.cmake [OPTIONS] ../cmake
# compile with MinGW cross-compilers
mingw64-cmake -C ../cmake/presets/mingw-cross.cmake [OPTIONS] ../cmake
# compile serial multi-arch binaries on macOS
cmake -C ../cmake/presets/macos-multiarch.cmake [OPTIONS] ../cmake
Presets that have names starting with "windows" are specifically for Presets that have names starting with "windows" are specifically for
compiling LAMMPS :doc:`natively on Windows <Build_windows>` and compiling LAMMPS :doc:`natively on Windows <Build_windows>` and
@ -208,7 +232,8 @@ Example
# GPU package and configure it for using CUDA. You can run. # GPU package and configure it for using CUDA. You can run.
mkdir build mkdir build
cd build cd build
cmake -C ../cmake/presets/most.cmake -C ../cmake/presets/nolib.cmake -D PKG_GPU=on -D GPU_API=cuda ../cmake cmake -C ../cmake/presets/most.cmake -C ../cmake/presets/nolib.cmake \
-D PKG_GPU=on -D GPU_API=cuda ../cmake
# to add another package, say BODY to the previous configuration you can run: # to add another package, say BODY to the previous configuration you can run:
cmake -D PKG_BODY=on . cmake -D PKG_BODY=on .

View File

@ -1,3 +1,7 @@
.. raw:: latex
\clearpage
Optional build settings Optional build settings
======================= =======================
@ -8,7 +12,8 @@ explains how to do this for building both with CMake and make.
* `FFT library`_ for use with the :doc:`kspace_style pppm <kspace_style>` command * `FFT library`_ for use with the :doc:`kspace_style pppm <kspace_style>` command
* `Size of LAMMPS integer types and size limits`_ * `Size of LAMMPS integer types and size limits`_
* `Read or write compressed files`_ * `Read or write compressed files`_
* `Output of JPG, PNG, and move files` via the :doc:`dump image <dump_image>` or :doc:`dump movie <dump_image>` commands * `Output of JPEG, PNG, and movie files`_ via the :doc:`dump image <dump_image>` or :doc:`dump movie <dump_image>` commands
* `Support for downloading files`_
* `Memory allocation alignment`_ * `Memory allocation alignment`_
* `Workaround for long long integers`_ * `Workaround for long long integers`_
* `Exception handling when using LAMMPS as a library`_ to capture errors * `Exception handling when using LAMMPS as a library`_ to capture errors
@ -19,7 +24,7 @@ explains how to do this for building both with CMake and make.
.. _cxx11: .. _cxx11:
C++11 standard compliance C++11 standard compliance
------------------------------------------ -------------------------
A C++11 standard compatible compiler is a requirement for compiling LAMMPS. A C++11 standard compatible compiler is a requirement for compiling LAMMPS.
LAMMPS version 3 March 2020 is the last version compatible with the previous LAMMPS version 3 March 2020 is the last version compatible with the previous
@ -31,12 +36,16 @@ flags to enable C++11 compliance. Example for GNU c++ 4.8.x:
CCFLAGS = -g -O3 -std=c++11 CCFLAGS = -g -O3 -std=c++11
Individual packages may require compliance with a later C++ standard
like C++14 or C++17. These requirements will be documented with the
:doc:`individual packages <Packages_details>`.
---------- ----------
.. _fft: .. _fft:
FFT library FFT library
--------------------- -----------
When the KSPACE package is included in a LAMMPS build, the When the KSPACE package is included in a LAMMPS build, the
:doc:`kspace_style pppm <kspace_style>` command performs 3d FFTs which :doc:`kspace_style pppm <kspace_style>` command performs 3d FFTs which
@ -44,21 +53,36 @@ require use of an FFT library to compute 1d FFTs. The KISS FFT
library is included with LAMMPS, but other libraries can be faster. library is included with LAMMPS, but other libraries can be faster.
LAMMPS can use them if they are available on your system. LAMMPS can use them if they are available on your system.
.. versionadded:: 7Feb2024
Alternatively, LAMMPS can use the `heFFTe
<https://icl-utk-edu.github.io/heffte/>`_ library for the MPI
communication algorithms, which comes with many optimizations for
special cases, e.g. leveraging available 2D and 3D FFTs in the back end
libraries and better pipelining for packing and communication.
.. tabs:: .. tabs::
.. tab:: CMake build .. tab:: CMake build
.. code-block:: bash .. code-block:: bash
-D FFT=value # FFTW3 or MKL or KISS, default is FFTW3 if found, else KISS -D FFT=value # FFTW3 or MKL or NVPL or KISS,
# default is FFTW3 if found, else KISS
-D FFT_KOKKOS=value # FFTW3 or MKL or NVPL or KISS or CUFFT
# or HIPFFT or MKL_GPU, default is KISS
-D FFT_SINGLE=value # yes or no (default), no = double precision -D FFT_SINGLE=value # yes or no (default), no = double precision
-D FFT_PACK=value # array (default) or pointer or memcpy -D FFT_PACK=value # array (default) or pointer or memcpy
-D FFT_USE_HEFFTE=value # yes or no (default), yes links to heFFTe
.. note:: .. note::
The values for the FFT variable must be in upper-case. This is When the Kokkos variant of a package is compiled and selected at run time,
an exception to the rule that all CMake variables can be specified the FFT library selected by the ``FFT_KOKKOS`` variable applies. Otherwise,
with lower-case values. the FFT library selected by the FFT variable applies.
The same FFT settings apply to both. ``FFT_KOKKOS`` must be compatible with the
Kokkos back end - for example, when using the CUDA back end of Kokkos,
you must use either ``CUFFT`` or ``KISS``.
Usually these settings are all that is needed. If FFTW3 is Usually these settings are all that is needed. If FFTW3 is
selected, then CMake will try to detect, if threaded FFTW selected, then CMake will try to detect, if threaded FFTW
@ -76,6 +100,19 @@ LAMMPS can use them if they are available on your system.
-D MKL_INCLUDE_DIR=path # ditto for Intel MKL library -D MKL_INCLUDE_DIR=path # ditto for Intel MKL library
-D FFT_MKL_THREADS=on # enable using threaded FFTs with MKL libraries -D FFT_MKL_THREADS=on # enable using threaded FFTs with MKL libraries
-D MKL_LIBRARY=path # path to MKL libraries -D MKL_LIBRARY=path # path to MKL libraries
-D FFT_HEFFTE_BACKEND=value # FFTW or MKL or empty/undefined for the stock
# heFFTe back end
-D Heffte_ROOT=path # path to an existing heFFTe installation
-D nvpl_fft_INCLUDE_DIR=path # path to NVPL FFT include files
-D nvpl_fft_LIBRARY_DIR=path # path to NVPL FFT libraries
.. note::
heFFTe comes with a builtin (= stock) back end for FFTs, i.e. a
default internal FFT implementation; however, this stock back
end is intended for testing purposes only and is not optimized
for production runs.
.. tab:: Traditional make .. tab:: Traditional make
@ -85,32 +122,82 @@ LAMMPS can use them if they are available on your system.
.. code-block:: make .. code-block:: make
FFT_INC = -DFFT_FFTW3 # -DFFT_FFTW3, -DFFT_FFTW (same as -DFFT_FFTW3), -DFFT_MKL, or -DFFT_KISS FFT_INC = -DFFT_<NAME> # where <NAME> is KISS (default), FFTW3,
# default is KISS if not specified # FFTW (same as FFTW3), NVPL, or MKL
FFT_INC = -DFFT_SINGLE # do not specify for double precision FFT_INC = -DFFT_KOKKOS_<NAME> # where <NAME> is KISS (default), FFTW3,
FFT_INC = -DFFT_FFTW_THREADS # enable using threaded FFTW3 libraries # FFTW (same as FFTW3), NVPL, MKL, CUFFT,
FFT_INC = -DFFT_MKL_THREADS # enable using threaded FFTs with MKL libraries # HIPFFT, or MKL_GPU
FFT_INC = -DFFT_PACK_ARRAY # or -DFFT_PACK_POINTER or -DFFT_PACK_MEMCPY FFT_INC = -DFFT_SINGLE # do not specify for double precision
# default is FFT_PACK_ARRAY if not specified FFT_INC = -DFFT_FFTW_THREADS # enable using threaded FFTW3 libraries
FFT_INC = -DFFT_MKL_THREADS # enable using threaded FFTs with MKL libraries
FFT_INC = -DFFT_PACK_ARRAY # or -DFFT_PACK_POINTER or -DFFT_PACK_MEMCPY
# default is FFT_PACK_ARRAY if not specified
.. code-block:: make .. code-block:: make
FFT_INC = -I/usr/local/include FFT_INC = -I/usr/local/include
FFT_PATH = -L/usr/local/lib FFT_PATH = -L/usr/local/lib
FFT_LIB = -lfftw3 # FFTW3 double precision
FFT_LIB = -lfftw3 -lfftw3_omp # FFTW3 double precision with threads (needs -DFFT_FFTW_THREADS) # hipFFT either precision
FFT_LIB = -lfftw3 -lfftw3f # FFTW3 single precision FFT_LIB = -lhipfft
FFT_LIB = -lmkl_intel_lp64 -lmkl_sequential -lmkl_core # MKL with Intel compiler, serial interface
FFT_LIB = -lmkl_gf_lp64 -lmkl_sequential -lmkl_core # MKL with GNU compiler, serial interface # cuFFT either precision
FFT_LIB = -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core # MKL with Intel compiler, threaded interface FFT_LIB = -lcufft
FFT_LIB = -lmkl_gf_lp64 -lmkl_gnu_thread -lmkl_core # MKL with GNU compiler, threaded interface
FFT_LIB = -lmkl_rt # MKL with automatic runtime selection of interface libs # MKL_GPU either precision
FFT_LIB = -lmkl_sycl_dft -lmkl_intel_ilp64 -lmkl_tbb_thread -lmkl_core -ltbb
# FFTW3 double precision
FFT_LIB = -lfftw3
# FFTW3 double precision with threads (needs -DFFT_FFTW_THREADS)
FFT_LIB = -lfftw3 -lfftw3_omp
# FFTW3 single precision
FFT_LIB = -lfftw3 -lfftw3f
# serial MKL with Intel compiler
FFT_LIB = -lmkl_intel_lp64 -lmkl_sequential -lmkl_core
# serial MKL with GNU compiler
FFT_LIB = -lmkl_gf_lp64 -lmkl_sequential -lmkl_core
# threaded MKL with Intel compiler
FFT_LIB = -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core
# threaded MKL with GNU compiler
FFT_LIB = -lmkl_gf_lp64 -lmkl_gnu_thread -lmkl_core
# MKL with automatic runtime selection of interface libs
FFT_LIB = -lmkl_rt
# threaded NVPL FFT
FFT_LIB = -lnvpl_fftw
As with CMake, you do not need to set paths in ``FFT_INC`` or As with CMake, you do not need to set paths in ``FFT_INC`` or
``FFT_PATH``, if the compiler can find the FFT header and library ``FFT_PATH``, if the compiler can find the FFT header and library
files in its default search path. You must specify ``FFT_LIB`` files in its default search path. You must specify ``FFT_LIB``
with the appropriate FFT libraries to include in the link. with the appropriate FFT libraries to include in the link.
Traditional make can also link to heFFTe using an existing installation
.. code-block:: make
include <path-to-heffte-installation>/share/heffte/HeffteMakefile.in
FFT_INC = -DFFT_HEFFTE -DFFT_HEFFTE_FFTW $(heffte_include)
FFT_PATH =
FFT_LIB = $(heffte_link) $(heffte_libs)
The heFFTe install path will contain ``HeffteMakefile.in``.
which will define the ``heffte_`` include variables needed to link to heFFTe from
an external project using traditional make.
The ``-DFFT_HEFFTE`` is required to switch to using heFFTe, while the optional ``-DFFT_HEFFTE_FFTW``
selects the desired heFFTe back end, e.g., ``-DFFT_HEFFTE_FFTW`` or ``-DFFT_HEFFTE_MKL``,
omitting the variable will default to the `stock` back end.
The heFFTe `stock` back end is intended to be used for testing and debugging,
but is not performance optimized for large scale production runs.
The `KISS FFT library <https://github.com/mborgerding/kissfft>`_ is The `KISS FFT library <https://github.com/mborgerding/kissfft>`_ is
included in the LAMMPS distribution. It is portable across all included in the LAMMPS distribution. It is portable across all
platforms. Depending on the size of the FFTs and the number of platforms. Depending on the size of the FFTs and the number of
@ -134,13 +221,23 @@ it from `www.fftw.org <https://www.fftw.org>`_. LAMMPS requires version
Building FFTW for your box should be as simple as ``./configure; make; Building FFTW for your box should be as simple as ``./configure; make;
make install``. The install command typically requires root privileges make install``. The install command typically requires root privileges
(e.g. invoke it via sudo), unless you specify a local directory with (e.g. invoke it via sudo), unless you specify a local directory with
the "--prefix" option of configure. Type ``./configure --help`` to see the ``--prefix`` option of configure. Type ``./configure --help`` to see
various options. various options.
The Intel MKL math library is part of the Intel compiler suite. It The Intel MKL math library is part of the Intel compiler suite. It
can be used with the Intel or GNU compiler (see the ``FFT_LIB`` setting can be used with the Intel or GNU compiler (see the ``FFT_LIB`` setting
above). above).
The NVIDIA Performance Libraries (NVPL) FFT library is optimized for NVIDIA
Grace Armv9.0 architecture. You can download it from https://docs.nvidia.com/nvpl/
The cuFFT and hipFFT FFT libraries are packaged with NVIDIA's CUDA and
AMD's HIP installations, respectively. These FFT libraries require the
Kokkos acceleration package to be enabled and the Kokkos back end to be
GPU-resident (i.e., HIP or CUDA). Similarly, GPU offload of FFTs on
Intel GPUs with oneMKL currently requires the Kokkos acceleration
package to be enabled with the SYCL back end.
Performing 3d FFTs in parallel can be time-consuming due to data access Performing 3d FFTs in parallel can be time-consuming due to data access
and required communication. This cost can be reduced by performing and required communication. This cost can be reduced by performing
single-precision FFTs instead of double precision. Single precision single-precision FFTs instead of double precision. Single precision
@ -152,11 +249,11 @@ generally less than the difference in precision. Using the
``-DFFT_SINGLE`` setting trades off a little accuracy for reduced memory ``-DFFT_SINGLE`` setting trades off a little accuracy for reduced memory
use and parallel communication costs for transposing 3d FFT data. use and parallel communication costs for transposing 3d FFT data.
When using ``-DFFT_SINGLE`` with FFTW3, you may need to build the FFTW When using ``-DFFT_SINGLE`` with FFTW3, you may need to ensure that
library a second time with support for single-precision. the FFTW3 installation includes support for single-precision.
For FFTW3, do the following, which should produce the additional When compiler FFTW3 from source, you can do the following, which should
library ``libfftw3f.a`` or ``libfftw3f.so``\ . produce the additional libraries ``libfftw3f.a`` and/or ``libfftw3f.so``\ .
.. code-block:: bash .. code-block:: bash
@ -165,13 +262,27 @@ library ``libfftw3f.a`` or ``libfftw3f.so``\ .
Performing 3d FFTs requires communication to transpose the 3d FFT Performing 3d FFTs requires communication to transpose the 3d FFT
grid. The data packing/unpacking for this can be done in one of 3 grid. The data packing/unpacking for this can be done in one of 3
modes (ARRAY, POINTER, MEMCPY) as set by the FFT_PACK syntax above. modes (ARRAY, POINTER, MEMCPY) as set by the ``FFT_PACK`` syntax above.
Depending on the machine, the size of the FFT grid, the number of Depending on the machine, the size of the FFT grid, the number of
processors used, one option may be slightly faster. The default is processors used, one option may be slightly faster. The default is
ARRAY mode. ARRAY mode.
When using ``-DFFT_HEFFTE`` CMake will first look for an existing
install with hints provided by ``-DHeffte_ROOT``, as recommended by the
CMake standard and note that the name is case sensitive. If CMake cannot
find a heFFTe installation with the correct back end (e.g., FFTW or
MKL), it will attempt to download and build the library automatically.
In this case, LAMMPS CMake will also accept all heFFTe specific
variables listed in the `heFFTe documentation
<https://mkstoyanov.bitbucket.io/heffte/md_doxygen_installation.html>`_
and those variables will be passed into the heFFTe build.
---------- ----------
.. raw:: latex
\clearpage
.. _size: .. _size:
Size of LAMMPS integer types and size limits Size of LAMMPS integer types and size limits
@ -212,7 +323,7 @@ LAMMPS system size restrictions
.. list-table:: .. list-table::
:header-rows: 1 :header-rows: 1
:widths: auto :widths: 18 27 28 27
:align: center :align: center
* - * -
@ -281,8 +392,8 @@ in whichever ``lib/gpu/Makefile`` is used must be the same as above.
.. _graphics: .. _graphics:
Output of JPG, PNG, and movie files Output of JPEG, PNG, and movie files
-------------------------------------------------- ------------------------------------
The :doc:`dump image <dump_image>` command has options to output JPEG or The :doc:`dump image <dump_image>` command has options to output JPEG or
PNG image files. Likewise, the :doc:`dump movie <dump_image>` command PNG image files. Likewise, the :doc:`dump movie <dump_image>` command
@ -295,12 +406,13 @@ requires the following settings:
.. code-block:: bash .. code-block:: bash
-D WITH_JPEG=value # yes or no -D WITH_JPEG=value # yes or no
# default = yes if CMake finds JPEG files, else no # default = yes if CMake finds JPEG development files, else no
-D WITH_PNG=value # yes or no -D WITH_PNG=value # yes or no
# default = yes if CMake finds PNG and ZLIB files, else no # default = yes if CMake finds PNG and ZLIB development files,
-D WITH_FFMPEG=value # yes or no # else no
# default = yes if CMake can find ffmpeg, else no -D WITH_FFMPEG=value # yes or no
# default = yes if CMake can find ffmpeg, else no
Usually these settings are all that is needed. If CMake cannot Usually these settings are all that is needed. If CMake cannot
find the graphics header, library, executable files, you can set find the graphics header, library, executable files, you can set
@ -322,8 +434,10 @@ requires the following settings:
LMP_INC = -DLAMMPS_JPEG -DLAMMPS_PNG -DLAMMPS_FFMPEG <other LMP_INC settings> LMP_INC = -DLAMMPS_JPEG -DLAMMPS_PNG -DLAMMPS_FFMPEG <other LMP_INC settings>
JPG_INC = -I/usr/local/include # path to jpeglib.h, png.h, zlib.h header files if make cannot find them JPG_INC = -I/usr/local/include # path to jpeglib.h, png.h, zlib.h headers
JPG_PATH = -L/usr/lib # paths to libjpeg.a, libpng.a, libz.a (.so) files if make cannot find them # if make cannot find them
JPG_PATH = -L/usr/lib # paths to libjpeg.a, libpng.a, libz.a (.so)
# files if make cannot find them
JPG_LIB = -ljpeg -lpng -lz # library names JPG_LIB = -ljpeg -lpng -lz # library names
As with CMake, you do not need to set ``JPG_INC`` or ``JPG_PATH``, As with CMake, you do not need to set ``JPG_INC`` or ``JPG_PATH``,
@ -354,8 +468,8 @@ Read or write compressed files
If this option is enabled, large files can be read or written with If this option is enabled, large files can be read or written with
compression by ``gzip`` or similar tools by several LAMMPS commands, compression by ``gzip`` or similar tools by several LAMMPS commands,
including :doc:`read_data <read_data>`, :doc:`rerun <rerun>`, and including :doc:`read_data <read_data>`, :doc:`rerun <rerun>`, and
:doc:`dump <dump>`. Supported compression tools are currently :doc:`dump <dump>`. Supported compression tools and algorithms are currently
``gzip``, ``bzip2``, ``zstd``, and ``lzma``. ``gzip``, ``bzip2``, ``zstd``, ``xz``, ``lz4``, and ``lzma`` (via xz).
.. tabs:: .. tabs::
@ -363,8 +477,8 @@ including :doc:`read_data <read_data>`, :doc:`rerun <rerun>`, and
.. code-block:: bash .. code-block:: bash
-D WITH_GZIP=value # yes or no -D WITH_GZIP=value # yes or no
# default is yes if CMake can find the gzip program, else no # default is yes if CMake can find the gzip program
.. tab:: Traditional make .. tab:: Traditional make
@ -386,18 +500,64 @@ during a run.
available using a compression library instead, which is what the available using a compression library instead, which is what the
:ref:`COMPRESS package <PKG-COMPRESS>` enables. :ref:`COMPRESS package <PKG-COMPRESS>` enables.
--------------------------------------------------
.. _libcurl:
Support for downloading files
-----------------------------
.. versionadded:: 29Aug2024
The :doc:`geturl command <geturl>` command uses the `the libcurl library
<https://curl.se/libcurl/>`_ to download files. This requires that
LAMMPS is compiled accordingly which needs the following settings:
.. tabs::
.. tab:: CMake build
.. code-block:: bash
-D WITH_CURL=value # yes or no
# default = yes if CMake finds CURL development files, else no
Usually these settings are all that is needed. If CMake cannot
find the graphics header, library, executable files, you can set
these variables:
.. code-block:: bash
-D CURL_INCLUDE_DIR=path # path to folder which contains curl.h header file
-D CURL_LIBRARY=path # path to libcurls.a (.so) file
.. tab:: Traditional make
.. code-block:: make
LMP_INC = -DLAMMPS_CURL <other LMP_INC settings>
CURL_INC = -I/usr/local/include # path to curl folder with curl.h
CURL_PATH = -L/usr/lib # paths to libcurl.a(.so) if make cannot find it
CURL_LIB = -lcurl # library names
As with CMake, you do not need to set ``CURL_INC`` or ``CURL_PATH``,
if make can find the libcurl header and library files in their
default system locations. You must specify ``CURL_LIB`` with a
paths or linker flags to link to libcurl.
---------- ----------
.. _align: .. _align:
Memory allocation alignment Memory allocation alignment
--------------------------------------- ---------------------------
This setting enables the use of the "posix_memalign()" call instead of This setting enables the use of the ``posix_memalign()`` call instead of
"malloc()" when LAMMPS allocates large chunks of memory. Vector ``malloc()`` when LAMMPS allocates large chunks of memory. Vector
instructions on CPUs may become more efficient, if dynamically allocated instructions on CPUs may become more efficient, if dynamically allocated
memory is aligned on larger-than-default byte boundaries. On most memory is aligned on larger-than-default byte boundaries. On most
current operating systems, the "malloc()" implementation returns current operating systems, the ``malloc()`` implementation returns
pointers that are aligned to 16-byte boundaries. Using SSE vector pointers that are aligned to 16-byte boundaries. Using SSE vector
instructions efficiently, however, requires memory blocks being aligned instructions efficiently, however, requires memory blocks being aligned
on 64-byte boundaries. on 64-byte boundaries.
@ -411,9 +571,9 @@ on 64-byte boundaries.
-D LAMMPS_MEMALIGN=value # 0, 8, 16, 32, 64 (default) -D LAMMPS_MEMALIGN=value # 0, 8, 16, 32, 64 (default)
Use a ``LAMMPS_MEMALIGN`` value of 0 to disable using Use a ``LAMMPS_MEMALIGN`` value of 0 to disable using
"posix_memalign()" and revert to using the "malloc()" C-library ``posix_memalign()`` and revert to using the ``malloc()`` C-library
function instead. When compiling LAMMPS for Windows systems, function instead. When compiling LAMMPS for Windows systems,
"malloc()" will always be used and this setting is ignored. ``malloc()`` will always be used and this setting is ignored.
.. tab:: Traditional make .. tab:: Traditional make
@ -422,7 +582,7 @@ on 64-byte boundaries.
LMP_INC = -DLAMMPS_MEMALIGN=value # 8, 16, 32, 64 LMP_INC = -DLAMMPS_MEMALIGN=value # 8, 16, 32, 64
Do not set ``-DLAMMPS_MEMALIGN``, if you want to have memory Do not set ``-DLAMMPS_MEMALIGN``, if you want to have memory
allocated with the "malloc()" function call allocated with the ``malloc()`` function call
instead. ``-DLAMMPS_MEMALIGN`` **cannot** be used on Windows, as instead. ``-DLAMMPS_MEMALIGN`` **cannot** be used on Windows, as
Windows different function calls with different semantics for Windows different function calls with different semantics for
allocating aligned memory, that are not compatible with how LAMMPS allocating aligned memory, that are not compatible with how LAMMPS
@ -459,27 +619,13 @@ those systems:
.. _exceptions: .. _exceptions:
Exception handling when using LAMMPS as a library Exception handling when using LAMMPS as a library
------------------------------------------------------------------ -------------------------------------------------
This setting is useful when external codes drive LAMMPS as a library. LAMMPS errors do not kill the calling code, but throw an exception. In
With this option enabled, LAMMPS errors do not kill the calling code. the C-library interface, the call stack is unwound and control returns
Instead, the call stack is unwound and control returns to the caller, to the caller, e.g. to Python or a code that is coupled to LAMMPS. The
e.g. to Python. Of course, the calling code has to be set up to error status can then be queried. When using C++ directly, the calling
*catch* exceptions thrown from within LAMMPS. code has to be set up to *catch* exceptions thrown from within LAMMPS.
.. tabs::
.. tab:: CMake build
.. code-block:: bash
-D LAMMPS_EXCEPTIONS=value # yes or no (default)
.. tab:: Traditional make
.. code-block:: make
LMP_INC = -DLAMMPS_EXCEPTIONS <other LMP_INC settings>
.. note:: .. note::

View File

@ -1,26 +1,30 @@
.. table_from_list:: .. only:: html
:columns: 3
* :doc:`General commands <Commands_all>` .. table_from_list::
* :doc:`Fix styles <Commands_fix>` :columns: 5
* :doc:`Compute styles <Commands_compute>`
* :doc:`Pair styles <Commands_pair>` * :doc:`General commands <Commands_all>`
* :ref:`Bond styles <bond>` * :doc:`Fix styles <Commands_fix>`
* :ref:`Angle styles <angle>` * :doc:`Compute styles <Commands_compute>`
* :ref:`Dihedral styles <dihedral>` * :doc:`Pair styles <Commands_pair>`
* :ref:`Improper styles <improper>` * :ref:`Bond styles <bond>`
* :doc:`KSpace styles <Commands_kspace>` * :ref:`Angle styles <angle>`
* :doc:`Dump styles <Commands_dump>` * :ref:`Dihedral styles <dihedral>`
* :ref:`Improper styles <improper>`
* :doc:`KSpace styles <Commands_kspace>`
* :doc:`Dump styles <Commands_dump>`
.. raw:: latex
\clearpage
General commands General commands
================ ================
An alphabetic list of general LAMMPS commands. Note that style An alphabetic list of general LAMMPS commands.
commands with many variants, can be more easily accessed via the small
table above.
.. table_from_list:: .. table_from_list::
:columns: 5 :columns: 6
* :doc:`angle_coeff <angle_coeff>` * :doc:`angle_coeff <angle_coeff>`
* :doc:`angle_style <angle_style>` * :doc:`angle_style <angle_style>`
@ -54,6 +58,7 @@ table above.
* :doc:`echo <echo>` * :doc:`echo <echo>`
* :doc:`fix <fix>` * :doc:`fix <fix>`
* :doc:`fix_modify <fix_modify>` * :doc:`fix_modify <fix_modify>`
* :doc:`geturl <geturl>`
* :doc:`group <group>` * :doc:`group <group>`
* :doc:`if <if>` * :doc:`if <if>`
* :doc:`improper_coeff <improper_coeff>` * :doc:`improper_coeff <improper_coeff>`
@ -121,7 +126,7 @@ commands have accelerated versions. This is indicated by an
additional letter in parenthesis: k = KOKKOS. additional letter in parenthesis: k = KOKKOS.
.. table_from_list:: .. table_from_list::
:columns: 5 :columns: 6
* :doc:`dynamical_matrix (k) <dynamical_matrix>` * :doc:`dynamical_matrix (k) <dynamical_matrix>`
* :doc:`group2ndx <group2ndx>` * :doc:`group2ndx <group2ndx>`

View File

@ -1,21 +1,7 @@
.. table_from_list::
:columns: 3
* :doc:`General commands <Commands_all>`
* :doc:`Fix styles <Commands_fix>`
* :doc:`Compute styles <Commands_compute>`
* :doc:`Pair styles <Commands_pair>`
* :ref:`Bond styles <bond>`
* :ref:`Angle styles <angle>`
* :ref:`Dihedral styles <dihedral>`
* :ref:`Improper styles <improper>`
* :doc:`KSpace styles <Commands_kspace>`
* :doc:`Dump styles <Commands_dump>`
.. _bond: .. _bond:
Bond_style potentials Bond styles
===================== ===========
All LAMMPS :doc:`bond_style <bond_style>` commands. Some styles have All LAMMPS :doc:`bond_style <bond_style>` commands. Some styles have
accelerated versions. This is indicated by additional letters in accelerated versions. This is indicated by additional letters in
@ -23,11 +9,13 @@ parenthesis: g = GPU, i = INTEL, k = KOKKOS, o = OPENMP, t =
OPT. OPT.
.. table_from_list:: .. table_from_list::
:columns: 4 :columns: 5
* :doc:`none <bond_none>` * :doc:`none <bond_none>`
* :doc:`zero <bond_zero>` * :doc:`zero <bond_zero>`
* :doc:`hybrid <bond_hybrid>` * :doc:`hybrid (k) <bond_hybrid>`
*
*
* *
* *
* *
@ -54,13 +42,14 @@ OPT.
* :doc:`oxdna2/fene <bond_oxdna>` * :doc:`oxdna2/fene <bond_oxdna>`
* :doc:`oxrna2/fene <bond_oxdna>` * :doc:`oxrna2/fene <bond_oxdna>`
* :doc:`quartic (o) <bond_quartic>` * :doc:`quartic (o) <bond_quartic>`
* :doc:`rheo/shell <bond_rheo_shell>`
* :doc:`special <bond_special>` * :doc:`special <bond_special>`
* :doc:`table (o) <bond_table>` * :doc:`table (o) <bond_table>`
.. _angle: .. _angle:
Angle_style potentials Angle styles
====================== ============
All LAMMPS :doc:`angle_style <angle_style>` commands. Some styles have All LAMMPS :doc:`angle_style <angle_style>` commands. Some styles have
accelerated versions. This is indicated by additional letters in accelerated versions. This is indicated by additional letters in
@ -68,11 +57,13 @@ parenthesis: g = GPU, i = INTEL, k = KOKKOS, o = OPENMP, t =
OPT. OPT.
.. table_from_list:: .. table_from_list::
:columns: 4 :columns: 5
* :doc:`none <angle_none>` * :doc:`none <angle_none>`
* :doc:`zero <angle_zero>` * :doc:`zero <angle_zero>`
* :doc:`hybrid <angle_hybrid>` * :doc:`hybrid (k) <angle_hybrid>`
*
*
* *
* *
* *
@ -89,6 +80,7 @@ OPT.
* :doc:`cosine/shift (o) <angle_cosine_shift>` * :doc:`cosine/shift (o) <angle_cosine_shift>`
* :doc:`cosine/shift/exp (o) <angle_cosine_shift_exp>` * :doc:`cosine/shift/exp (o) <angle_cosine_shift_exp>`
* :doc:`cosine/squared (o) <angle_cosine_squared>` * :doc:`cosine/squared (o) <angle_cosine_squared>`
* :doc:`cosine/squared/restricted (o) <angle_cosine_squared_restricted>`
* :doc:`cross <angle_cross>` * :doc:`cross <angle_cross>`
* :doc:`dipole (o) <angle_dipole>` * :doc:`dipole (o) <angle_dipole>`
* :doc:`fourier (o) <angle_fourier>` * :doc:`fourier (o) <angle_fourier>`
@ -99,13 +91,13 @@ OPT.
* :doc:`mesocnt <angle_mesocnt>` * :doc:`mesocnt <angle_mesocnt>`
* :doc:`mm3 <angle_mm3>` * :doc:`mm3 <angle_mm3>`
* :doc:`quartic (o) <angle_quartic>` * :doc:`quartic (o) <angle_quartic>`
* :doc:`spica (o) <angle_spica>` * :doc:`spica (ko) <angle_spica>`
* :doc:`table (o) <angle_table>` * :doc:`table (o) <angle_table>`
.. _dihedral: .. _dihedral:
Dihedral_style potentials Dihedral styles
========================= ===============
All LAMMPS :doc:`dihedral_style <dihedral_style>` commands. Some styles All LAMMPS :doc:`dihedral_style <dihedral_style>` commands. Some styles
have accelerated versions. This is indicated by additional letters in have accelerated versions. This is indicated by additional letters in
@ -113,20 +105,23 @@ parenthesis: g = GPU, i = INTEL, k = KOKKOS, o = OPENMP, t =
OPT. OPT.
.. table_from_list:: .. table_from_list::
:columns: 4 :columns: 5
* :doc:`none <dihedral_none>` * :doc:`none <dihedral_none>`
* :doc:`zero <dihedral_zero>` * :doc:`zero <dihedral_zero>`
* :doc:`hybrid <dihedral_hybrid>` * :doc:`hybrid (k) <dihedral_hybrid>`
*
*
* *
* *
* *
* *
* *
* :doc:`charmm (iko) <dihedral_charmm>` * :doc:`charmm (iko) <dihedral_charmm>`
* :doc:`charmmfsw <dihedral_charmm>` * :doc:`charmmfsw (k) <dihedral_charmm>`
* :doc:`class2 (ko) <dihedral_class2>` * :doc:`class2 (ko) <dihedral_class2>`
* :doc:`cosine/shift/exp (o) <dihedral_cosine_shift_exp>` * :doc:`cosine/shift/exp (o) <dihedral_cosine_shift_exp>`
* :doc:`cosine/squared/restricted <dihedral_cosine_squared_restricted>`
* :doc:`fourier (io) <dihedral_fourier>` * :doc:`fourier (io) <dihedral_fourier>`
* :doc:`harmonic (iko) <dihedral_harmonic>` * :doc:`harmonic (iko) <dihedral_harmonic>`
* :doc:`helix (o) <dihedral_helix>` * :doc:`helix (o) <dihedral_helix>`
@ -141,8 +136,8 @@ OPT.
.. _improper: .. _improper:
Improper_style potentials Improper styles
========================= ===============
All LAMMPS :doc:`improper_style <improper_style>` commands. Some styles All LAMMPS :doc:`improper_style <improper_style>` commands. Some styles
have accelerated versions. This is indicated by additional letters in have accelerated versions. This is indicated by additional letters in
@ -150,11 +145,13 @@ parenthesis: g = GPU, i = INTEL, k = KOKKOS, o = OPENMP, t =
OPT. OPT.
.. table_from_list:: .. table_from_list::
:columns: 4 :columns: 5
* :doc:`none <improper_none>` * :doc:`none <improper_none>`
* :doc:`zero <improper_zero>` * :doc:`zero <improper_zero>`
* :doc:`hybrid <improper_hybrid>` * :doc:`hybrid (k) <improper_hybrid>`
*
*
* *
* *
* *

View File

@ -1,3 +1,7 @@
.. raw:: latex
\clearpage
Commands by category Commands by category
==================== ====================
@ -6,8 +10,8 @@ This page lists most of the LAMMPS commands, grouped by category. The
alphabetically. Style options for entries like fix, compute, pair etc. alphabetically. Style options for entries like fix, compute, pair etc.
have their own pages where they are listed alphabetically. have their own pages where they are listed alphabetically.
Initialization: Initialization
------------------------------ --------------
.. table_from_list:: .. table_from_list::
:columns: 5 :columns: 5
@ -18,8 +22,8 @@ Initialization:
* :doc:`suffix <suffix>` * :doc:`suffix <suffix>`
* :doc:`units <units>` * :doc:`units <units>`
Setup simulation box: Setup simulation box
------------------------------ --------------------
.. table_from_list:: .. table_from_list::
:columns: 4 :columns: 4
@ -31,8 +35,8 @@ Setup simulation box:
* :doc:`lattice <lattice>` * :doc:`lattice <lattice>`
* :doc:`region <region>` * :doc:`region <region>`
Setup atoms: Setup atoms
------------------------------ -----------
.. table_from_list:: .. table_from_list::
:columns: 4 :columns: 4
@ -55,8 +59,8 @@ Setup atoms:
* :doc:`set <set>` * :doc:`set <set>`
* :doc:`velocity <velocity>` * :doc:`velocity <velocity>`
Force fields: Force fields
------------------------------ ------------
.. table_from_list:: .. table_from_list::
:columns: 4 :columns: 4
@ -79,8 +83,8 @@ Force fields:
* :doc:`pair_write <pair_write>` * :doc:`pair_write <pair_write>`
* :doc:`special_bonds <special_bonds>` * :doc:`special_bonds <special_bonds>`
Settings: Settings
------------------------------ --------
.. table_from_list:: .. table_from_list::
:columns: 4 :columns: 4
@ -98,8 +102,8 @@ Settings:
* :doc:`timer <timer>` * :doc:`timer <timer>`
* :doc:`timestep <timestep>` * :doc:`timestep <timestep>`
Operations within timestepping (fixes) and diagnostics (computes): Operations within timestepping (fixes) and diagnostics (computes)
------------------------------------------------------------------------------------------ -----------------------------------------------------------------
.. table_from_list:: .. table_from_list::
:columns: 4 :columns: 4
@ -111,8 +115,8 @@ Operations within timestepping (fixes) and diagnostics (computes):
* :doc:`uncompute <uncompute>` * :doc:`uncompute <uncompute>`
* :doc:`unfix <unfix>` * :doc:`unfix <unfix>`
Output: Output
------------------------------ ------
.. table_from_list:: .. table_from_list::
:columns: 4 :columns: 4
@ -131,8 +135,8 @@ Output:
* :doc:`write_dump <write_dump>` * :doc:`write_dump <write_dump>`
* :doc:`write_restart <write_restart>` * :doc:`write_restart <write_restart>`
Actions: Actions
------------------------------ -------
.. table_from_list:: .. table_from_list::
:columns: 6 :columns: 6
@ -146,8 +150,8 @@ Actions:
* :doc:`tad <tad>` * :doc:`tad <tad>`
* :doc:`temper <temper>` * :doc:`temper <temper>`
Input script control: Input script control
------------------------------ --------------------
.. table_from_list:: .. table_from_list::
:columns: 7 :columns: 7

View File

@ -1,19 +1,5 @@
.. table_from_list:: Compute styles
:columns: 3 ==============
* :doc:`General commands <Commands_all>`
* :doc:`Fix styles <Commands_fix>`
* :doc:`Compute styles <Commands_compute>`
* :doc:`Pair styles <Commands_pair>`
* :ref:`Bond styles <bond>`
* :ref:`Angle styles <angle>`
* :ref:`Dihedral styles <dihedral>`
* :ref:`Improper styles <improper>`
* :doc:`KSpace styles <Commands_kspace>`
* :doc:`Dump styles <Commands_dump>`
Compute commands
================
An alphabetic list of all LAMMPS :doc:`compute <compute>` commands. An alphabetic list of all LAMMPS :doc:`compute <compute>` commands.
Some styles have accelerated versions. This is indicated by Some styles have accelerated versions. This is indicated by
@ -21,7 +7,7 @@ additional letters in parenthesis: g = GPU, i = INTEL, k =
KOKKOS, o = OPENMP, t = OPT. KOKKOS, o = OPENMP, t = OPT.
.. table_from_list:: .. table_from_list::
:columns: 5 :columns: 4
* :doc:`ackland/atom <compute_ackland_atom>` * :doc:`ackland/atom <compute_ackland_atom>`
* :doc:`adf <compute_adf>` * :doc:`adf <compute_adf>`
@ -91,6 +77,7 @@ KOKKOS, o = OPENMP, t = OPT.
* :doc:`ke/atom/eff <compute_ke_atom_eff>` * :doc:`ke/atom/eff <compute_ke_atom_eff>`
* :doc:`ke/eff <compute_ke_eff>` * :doc:`ke/eff <compute_ke_eff>`
* :doc:`ke/rigid <compute_ke_rigid>` * :doc:`ke/rigid <compute_ke_rigid>`
* :doc:`composition/atom (k) <compute_composition_atom>`
* :doc:`mliap <compute_mliap>` * :doc:`mliap <compute_mliap>`
* :doc:`momentum <compute_momentum>` * :doc:`momentum <compute_momentum>`
* :doc:`msd <compute_msd>` * :doc:`msd <compute_msd>`
@ -99,6 +86,7 @@ KOKKOS, o = OPENMP, t = OPT.
* :doc:`nbond/atom <compute_nbond_atom>` * :doc:`nbond/atom <compute_nbond_atom>`
* :doc:`omega/chunk <compute_omega_chunk>` * :doc:`omega/chunk <compute_omega_chunk>`
* :doc:`orientorder/atom (k) <compute_orientorder_atom>` * :doc:`orientorder/atom (k) <compute_orientorder_atom>`
* :doc:`pace <compute_pace>`
* :doc:`pair <compute_pair>` * :doc:`pair <compute_pair>`
* :doc:`pair/local <compute_pair_local>` * :doc:`pair/local <compute_pair_local>`
* :doc:`pe <compute_pe>` * :doc:`pe <compute_pe>`
@ -106,6 +94,10 @@ KOKKOS, o = OPENMP, t = OPT.
* :doc:`pe/mol/tally <compute_tally>` * :doc:`pe/mol/tally <compute_tally>`
* :doc:`pe/tally <compute_tally>` * :doc:`pe/tally <compute_tally>`
* :doc:`plasticity/atom <compute_plasticity_atom>` * :doc:`plasticity/atom <compute_plasticity_atom>`
* :doc:`pod/atom <compute_pod_atom>`
* :doc:`podd/atom <compute_pod_atom>`
* :doc:`pod/local <compute_pod_atom>`
* :doc:`pod/global <compute_pod_atom>`
* :doc:`pressure <compute_pressure>` * :doc:`pressure <compute_pressure>`
* :doc:`pressure/alchemy <compute_pressure_alchemy>` * :doc:`pressure/alchemy <compute_pressure_alchemy>`
* :doc:`pressure/uef <compute_pressure_uef>` * :doc:`pressure/uef <compute_pressure_uef>`
@ -114,12 +106,16 @@ KOKKOS, o = OPENMP, t = OPT.
* :doc:`property/grid <compute_property_grid>` * :doc:`property/grid <compute_property_grid>`
* :doc:`property/local <compute_property_local>` * :doc:`property/local <compute_property_local>`
* :doc:`ptm/atom <compute_ptm_atom>` * :doc:`ptm/atom <compute_ptm_atom>`
* :doc:`rattlers/atom <compute_rattlers_atom>`
* :doc:`rdf <compute_rdf>` * :doc:`rdf <compute_rdf>`
* :doc:`reaxff/atom (k) <compute_reaxff_atom>`
* :doc:`reduce <compute_reduce>` * :doc:`reduce <compute_reduce>`
* :doc:`reduce/chunk <compute_reduce_chunk>` * :doc:`reduce/chunk <compute_reduce_chunk>`
* :doc:`reduce/region <compute_reduce>` * :doc:`reduce/region <compute_reduce>`
* :doc:`rheo/property/atom <compute_rheo_property_atom>`
* :doc:`rigid/local <compute_rigid_local>` * :doc:`rigid/local <compute_rigid_local>`
* :doc:`saed <compute_saed>` * :doc:`saed <compute_saed>`
* :doc:`slcsa/atom <compute_slcsa_atom>`
* :doc:`slice <compute_slice>` * :doc:`slice <compute_slice>`
* :doc:`smd/contact/radius <compute_smd_contact_radius>` * :doc:`smd/contact/radius <compute_smd_contact_radius>`
* :doc:`smd/damage <compute_smd_damage>` * :doc:`smd/damage <compute_smd_damage>`

View File

@ -1,39 +1,22 @@
.. table_from_list:: Dump styles
:columns: 3 ===========
* :doc:`General commands <Commands_all>`
* :doc:`Fix styles <Commands_fix>`
* :doc:`Compute styles <Commands_compute>`
* :doc:`Pair styles <Commands_pair>`
* :ref:`Bond styles <bond>`
* :ref:`Angle styles <angle>`
* :ref:`Dihedral styles <dihedral>`
* :ref:`Improper styles <improper>`
* :doc:`KSpace styles <Commands_kspace>`
* :doc:`Dump styles <Commands_dump>`
Dump commands
=============
An alphabetic list of all LAMMPS :doc:`dump <dump>` commands. An alphabetic list of all LAMMPS :doc:`dump <dump>` commands.
.. table_from_list:: .. table_from_list::
:columns: 5 :columns: 6
* :doc:`atom <dump>` * :doc:`atom <dump>`
* :doc:`atom/adios <dump_adios>` * :doc:`atom/adios <dump_adios>`
* :doc:`atom/gz <dump>` * :doc:`atom/gz <dump>`
* :doc:`atom/mpiio <dump>`
* :doc:`atom/zstd <dump>` * :doc:`atom/zstd <dump>`
* :doc:`cfg <dump>` * :doc:`cfg <dump>`
* :doc:`cfg/gz <dump>` * :doc:`cfg/gz <dump>`
* :doc:`cfg/mpiio <dump>`
* :doc:`cfg/uef <dump_cfg_uef>` * :doc:`cfg/uef <dump_cfg_uef>`
* :doc:`cfg/zstd <dump>` * :doc:`cfg/zstd <dump>`
* :doc:`custom <dump>` * :doc:`custom <dump>`
* :doc:`custom/adios <dump_adios>` * :doc:`custom/adios <dump_adios>`
* :doc:`custom/gz <dump>` * :doc:`custom/gz <dump>`
* :doc:`custom/mpiio <dump>`
* :doc:`custom/zstd <dump>` * :doc:`custom/zstd <dump>`
* :doc:`dcd <dump>` * :doc:`dcd <dump>`
* :doc:`grid <dump>` * :doc:`grid <dump>`
@ -51,7 +34,6 @@ An alphabetic list of all LAMMPS :doc:`dump <dump>` commands.
* :doc:`xtc <dump>` * :doc:`xtc <dump>`
* :doc:`xyz <dump>` * :doc:`xyz <dump>`
* :doc:`xyz/gz <dump>` * :doc:`xyz/gz <dump>`
* :doc:`xyz/mpiio <dump>`
* :doc:`xyz/zstd <dump>` * :doc:`xyz/zstd <dump>`
* :doc:`yaml <dump>` * :doc:`yaml <dump>`

View File

@ -1,19 +1,5 @@
.. table_from_list:: Fix styles
:columns: 3 ==========
* :doc:`General commands <Commands_all>`
* :doc:`Fix styles <Commands_fix>`
* :doc:`Compute styles <Commands_compute>`
* :doc:`Pair styles <Commands_pair>`
* :ref:`Bond styles <bond>`
* :ref:`Angle styles <angle>`
* :ref:`Dihedral styles <dihedral>`
* :ref:`Improper styles <improper>`
* :doc:`KSpace styles <Commands_kspace>`
* :doc:`Dump styles <Commands_dump>`
Fix commands
============
An alphabetic list of all LAMMPS :doc:`fix <fix>` commands. Some styles An alphabetic list of all LAMMPS :doc:`fix <fix>` commands. Some styles
have accelerated versions. This is indicated by additional letters in have accelerated versions. This is indicated by additional letters in
@ -21,13 +7,14 @@ parenthesis: g = GPU, i = INTEL, k = KOKKOS, o = OPENMP, t =
OPT. OPT.
.. table_from_list:: .. table_from_list::
:columns: 5 :columns: 4
* :doc:`accelerate/cos <fix_accelerate_cos>` * :doc:`accelerate/cos <fix_accelerate_cos>`
* :doc:`acks2/reaxff (k) <fix_acks2_reaxff>` * :doc:`acks2/reaxff (k) <fix_acks2_reaxff>`
* :doc:`adapt <fix_adapt>` * :doc:`adapt <fix_adapt>`
* :doc:`adapt/fep <fix_adapt_fep>` * :doc:`adapt/fep <fix_adapt_fep>`
* :doc:`addforce <fix_addforce>` * :doc:`addforce <fix_addforce>`
* :doc:`add/heat <fix_add_heat>`
* :doc:`addtorque <fix_addtorque>` * :doc:`addtorque <fix_addtorque>`
* :doc:`alchemy <fix_alchemy>` * :doc:`alchemy <fix_alchemy>`
* :doc:`amoeba/bitorsion <fix_amoeba_bitorsion>` * :doc:`amoeba/bitorsion <fix_amoeba_bitorsion>`
@ -56,11 +43,12 @@ OPT.
* :doc:`brownian/asphere <fix_brownian>` * :doc:`brownian/asphere <fix_brownian>`
* :doc:`brownian/sphere <fix_brownian>` * :doc:`brownian/sphere <fix_brownian>`
* :doc:`charge/regulation <fix_charge_regulation>` * :doc:`charge/regulation <fix_charge_regulation>`
* :doc:`cmap <fix_cmap>` * :doc:`cmap (k) <fix_cmap>`
* :doc:`colvars <fix_colvars>` * :doc:`colvars <fix_colvars>`
* :doc:`controller <fix_controller>` * :doc:`controller <fix_controller>`
* :doc:`damping/cundall <fix_damping_cundall>` * :doc:`damping/cundall <fix_damping_cundall>`
* :doc:`deform (k) <fix_deform>` * :doc:`deform (k) <fix_deform>`
* :doc:`deform/pressure <fix_deform_pressure>`
* :doc:`deposit <fix_deposit>` * :doc:`deposit <fix_deposit>`
* :doc:`dpd/energy (k) <fix_dpd_energy>` * :doc:`dpd/energy (k) <fix_dpd_energy>`
* :doc:`drag <fix_drag>` * :doc:`drag <fix_drag>`
@ -69,7 +57,7 @@ OPT.
* :doc:`drude/transform/inverse <fix_drude_transform>` * :doc:`drude/transform/inverse <fix_drude_transform>`
* :doc:`dt/reset (k) <fix_dt_reset>` * :doc:`dt/reset (k) <fix_dt_reset>`
* :doc:`edpd/source <fix_dpd_source>` * :doc:`edpd/source <fix_dpd_source>`
* :doc:`efield <fix_efield>` * :doc:`efield (k) <fix_efield>`
* :doc:`efield/tip4p <fix_efield>` * :doc:`efield/tip4p <fix_efield>`
* :doc:`ehex <fix_ehex>` * :doc:`ehex <fix_ehex>`
* :doc:`electrode/conp (i) <fix_electrode>` * :doc:`electrode/conp (i) <fix_electrode>`
@ -116,13 +104,13 @@ OPT.
* :doc:`momentum (k) <fix_momentum>` * :doc:`momentum (k) <fix_momentum>`
* :doc:`momentum/chunk <fix_momentum>` * :doc:`momentum/chunk <fix_momentum>`
* :doc:`move <fix_move>` * :doc:`move <fix_move>`
* :doc:`mscg <fix_mscg>`
* :doc:`msst <fix_msst>` * :doc:`msst <fix_msst>`
* :doc:`mvv/dpd <fix_mvv_dpd>` * :doc:`mvv/dpd <fix_mvv_dpd>`
* :doc:`mvv/edpd <fix_mvv_dpd>` * :doc:`mvv/edpd <fix_mvv_dpd>`
* :doc:`mvv/tdpd <fix_mvv_dpd>` * :doc:`mvv/tdpd <fix_mvv_dpd>`
* :doc:`neb <fix_neb>` * :doc:`neb <fix_neb>`
* :doc:`neb/spin <fix_neb_spin>` * :doc:`neb/spin <fix_neb_spin>`
* :doc:`nonaffine/displacement <fix_nonaffine_displacement>`
* :doc:`nph (ko) <fix_nh>` * :doc:`nph (ko) <fix_nh>`
* :doc:`nph/asphere (o) <fix_nph_asphere>` * :doc:`nph/asphere (o) <fix_nph_asphere>`
* :doc:`nph/body <fix_nph_body>` * :doc:`nph/body <fix_nph_body>`
@ -146,7 +134,7 @@ OPT.
* :doc:`nve/dot <fix_nve_dot>` * :doc:`nve/dot <fix_nve_dot>`
* :doc:`nve/dotc/langevin <fix_nve_dotc_langevin>` * :doc:`nve/dotc/langevin <fix_nve_dotc_langevin>`
* :doc:`nve/eff <fix_nve_eff>` * :doc:`nve/eff <fix_nve_eff>`
* :doc:`nve/limit <fix_nve_limit>` * :doc:`nve/limit (k) <fix_nve_limit>`
* :doc:`nve/line <fix_nve_line>` * :doc:`nve/line <fix_nve_line>`
* :doc:`nve/manifold/rattle <fix_nve_manifold_rattle>` * :doc:`nve/manifold/rattle <fix_nve_manifold_rattle>`
* :doc:`nve/noforce <fix_nve_noforce>` * :doc:`nve/noforce <fix_nve_noforce>`
@ -182,6 +170,7 @@ OPT.
* :doc:`pour <fix_pour>` * :doc:`pour <fix_pour>`
* :doc:`precession/spin <fix_precession_spin>` * :doc:`precession/spin <fix_precession_spin>`
* :doc:`press/berendsen <fix_press_berendsen>` * :doc:`press/berendsen <fix_press_berendsen>`
* :doc:`press/langevin <fix_press_langevin>`
* :doc:`print <fix_print>` * :doc:`print <fix_print>`
* :doc:`propel/self <fix_propel_self>` * :doc:`propel/self <fix_propel_self>`
* :doc:`property/atom (k) <fix_property_atom>` * :doc:`property/atom (k) <fix_property_atom>`
@ -189,6 +178,7 @@ OPT.
* :doc:`python/move <fix_python_move>` * :doc:`python/move <fix_python_move>`
* :doc:`qbmsst <fix_qbmsst>` * :doc:`qbmsst <fix_qbmsst>`
* :doc:`qeq/comb (o) <fix_qeq_comb>` * :doc:`qeq/comb (o) <fix_qeq_comb>`
* :doc:`qeq/ctip <fix_qeq>`
* :doc:`qeq/dynamic <fix_qeq>` * :doc:`qeq/dynamic <fix_qeq>`
* :doc:`qeq/fire <fix_qeq>` * :doc:`qeq/fire <fix_qeq>`
* :doc:`qeq/point <fix_qeq>` * :doc:`qeq/point <fix_qeq>`
@ -197,11 +187,17 @@ OPT.
* :doc:`qeq/slater <fix_qeq>` * :doc:`qeq/slater <fix_qeq>`
* :doc:`qmmm <fix_qmmm>` * :doc:`qmmm <fix_qmmm>`
* :doc:`qtb <fix_qtb>` * :doc:`qtb <fix_qtb>`
* :doc:`qtpie/reaxff <fix_qtpie_reaxff>`
* :doc:`rattle <fix_shake>` * :doc:`rattle <fix_shake>`
* :doc:`reaxff/bonds (k) <fix_reaxff_bonds>` * :doc:`reaxff/bonds (k) <fix_reaxff_bonds>`
* :doc:`reaxff/species (k) <fix_reaxff_species>` * :doc:`reaxff/species (k) <fix_reaxff_species>`
* :doc:`recenter <fix_recenter>` * :doc:`recenter (k) <fix_recenter>`
* :doc:`restrain <fix_restrain>` * :doc:`restrain <fix_restrain>`
* :doc:`rheo <fix_rheo>`
* :doc:`rheo/oxidation <fix_rheo_oxidation>`
* :doc:`rheo/pressure <fix_rheo_pressure>`
* :doc:`rheo/thermal <fix_rheo_thermal>`
* :doc:`rheo/viscosity <fix_rheo_viscosity>`
* :doc:`rhok <fix_rhok>` * :doc:`rhok <fix_rhok>`
* :doc:`rigid (o) <fix_rigid>` * :doc:`rigid (o) <fix_rigid>`
* :doc:`rigid/meso <fix_rigid_meso>` * :doc:`rigid/meso <fix_rigid_meso>`
@ -233,15 +229,15 @@ OPT.
* :doc:`spring <fix_spring>` * :doc:`spring <fix_spring>`
* :doc:`spring/chunk <fix_spring_chunk>` * :doc:`spring/chunk <fix_spring_chunk>`
* :doc:`spring/rg <fix_spring_rg>` * :doc:`spring/rg <fix_spring_rg>`
* :doc:`spring/self <fix_spring_self>` * :doc:`spring/self (k) <fix_spring_self>`
* :doc:`srd <fix_srd>` * :doc:`srd <fix_srd>`
* :doc:`store/force <fix_store_force>` * :doc:`store/force <fix_store_force>`
* :doc:`store/state <fix_store_state>` * :doc:`store/state <fix_store_state>`
* :doc:`tdpd/source <fix_dpd_source>` * :doc:`tdpd/source <fix_dpd_source>`
* :doc:`temp/berendsen <fix_temp_berendsen>` * :doc:`temp/berendsen (k) <fix_temp_berendsen>`
* :doc:`temp/csld <fix_temp_csvr>` * :doc:`temp/csld <fix_temp_csvr>`
* :doc:`temp/csvr <fix_temp_csvr>` * :doc:`temp/csvr <fix_temp_csvr>`
* :doc:`temp/rescale <fix_temp_rescale>` * :doc:`temp/rescale (k) <fix_temp_rescale>`
* :doc:`temp/rescale/eff <fix_temp_rescale_eff>` * :doc:`temp/rescale/eff <fix_temp_rescale_eff>`
* :doc:`tfmc <fix_tfmc>` * :doc:`tfmc <fix_tfmc>`
* :doc:`tgnpt/drude <fix_tgnh_drude>` * :doc:`tgnpt/drude <fix_tgnh_drude>`
@ -261,6 +257,7 @@ OPT.
* :doc:`wall/body/polyhedron <fix_wall_body_polyhedron>` * :doc:`wall/body/polyhedron <fix_wall_body_polyhedron>`
* :doc:`wall/colloid <fix_wall>` * :doc:`wall/colloid <fix_wall>`
* :doc:`wall/ees <fix_wall_ees>` * :doc:`wall/ees <fix_wall_ees>`
* :doc:`wall/flow (k) <fix_wall_flow>`
* :doc:`wall/gran (k) <fix_wall_gran>` * :doc:`wall/gran (k) <fix_wall_gran>`
* :doc:`wall/gran/region <fix_wall_gran_region>` * :doc:`wall/gran/region <fix_wall_gran_region>`
* :doc:`wall/harmonic <fix_wall>` * :doc:`wall/harmonic <fix_wall>`
@ -272,7 +269,7 @@ OPT.
* :doc:`wall/piston <fix_wall_piston>` * :doc:`wall/piston <fix_wall_piston>`
* :doc:`wall/reflect (k) <fix_wall_reflect>` * :doc:`wall/reflect (k) <fix_wall_reflect>`
* :doc:`wall/reflect/stochastic <fix_wall_reflect_stochastic>` * :doc:`wall/reflect/stochastic <fix_wall_reflect_stochastic>`
* :doc:`wall/region <fix_wall_region>` * :doc:`wall/region (k) <fix_wall_region>`
* :doc:`wall/region/ees <fix_wall_ees>` * :doc:`wall/region/ees <fix_wall_ees>`
* :doc:`wall/srd <fix_wall_srd>` * :doc:`wall/srd <fix_wall_srd>`
* :doc:`wall/table <fix_wall>` * :doc:`wall/table <fix_wall>`

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