Merge branch 'master' into refactor-reaxff-parser
# Conflicts: # doc/src/fix_qeq_reax.rst # src/OPENMP/reaxc_bond_orders_omp.h # src/OPENMP/reaxc_bonds_omp.h # src/OPENMP/reaxc_forces_omp.h # src/OPENMP/reaxc_hydrogen_bonds_omp.h # src/OPENMP/reaxc_init_md_omp.cpp # src/OPENMP/reaxc_init_md_omp.h # src/OPENMP/reaxc_multi_body_omp.h # src/OPENMP/reaxc_nonbonded_omp.h # src/OPENMP/reaxc_torsion_angles_omp.h # src/OPENMP/reaxc_valence_angles_omp.h # src/OPENMP/reaxff_omp.h # src/Purge.list # src/QEQ/fix_qeq.cpp # src/QEQ/fix_qeq.h # src/QEQ/fix_qeq_dynamic.cpp # src/QEQ/fix_qeq_fire.cpp # src/REAXFF/fix_qeq_reax.cpp # src/REAXFF/reaxc_allocate.h # src/REAXFF/reaxc_bond_orders.h # src/REAXFF/reaxc_bonds.h # src/REAXFF/reaxc_control.h # src/REAXFF/reaxc_defs.h # src/REAXFF/reaxc_ffield.h # src/REAXFF/reaxc_forces.h # src/REAXFF/reaxc_hydrogen_bonds.h # src/REAXFF/reaxc_init_md.cpp # src/REAXFF/reaxc_init_md.h # src/REAXFF/reaxc_io_tools.cpp # src/REAXFF/reaxc_io_tools.h # src/REAXFF/reaxc_list.h # src/REAXFF/reaxc_lookup.h # src/REAXFF/reaxc_multi_body.h # src/REAXFF/reaxc_nonbonded.h # src/REAXFF/reaxc_reset_tools.h # src/REAXFF/reaxc_system_props.cpp # src/REAXFF/reaxc_system_props.h # src/REAXFF/reaxc_tool_box.h # src/REAXFF/reaxc_torsion_angles.h # src/REAXFF/reaxc_traj.cpp # src/REAXFF/reaxc_traj.h # src/REAXFF/reaxc_types.h # src/REAXFF/reaxc_valence_angles.h # src/REAXFF/reaxc_vector.cpp # src/REAXFF/reaxc_vector.h # src/REAXFF/reaxff_api.h # src/REAXFF/reaxff_defs.h # src/REAXFF/reaxff_inline.h # src/REAXFF/reaxff_types.h # src/text_file_reader.cpp # src/text_file_reader.h # unittest/force-styles/tests/atomic-pair-reax_c.yaml # unittest/force-styles/tests/atomic-pair-reax_c_lgvdw.yaml # unittest/force-styles/tests/atomic-pair-yukawa_colloid.yaml
This commit is contained in:
2
.gitattributes
vendored
2
.gitattributes
vendored
@ -1,3 +1,5 @@
|
||||
.gitattributes export-ignore
|
||||
.gitignore export-ignore
|
||||
.github export-ignore
|
||||
.lgtm.yml export-ignore
|
||||
SECURITY.md export-ignore
|
||||
|
||||
59
.github/CODEOWNERS
vendored
59
.github/CODEOWNERS
vendored
@ -13,33 +13,42 @@ lib/kim/* @ellio167
|
||||
lib/mesont/* @iafoss
|
||||
|
||||
# whole packages
|
||||
src/COMPRESS/* @akohlmey
|
||||
src/COMPRESS/* @rbberger
|
||||
src/GPU/* @ndtrung81
|
||||
src/KOKKOS/* @stanmoore1
|
||||
src/KIM/* @ellio167
|
||||
src/LATTE/* @cnegre
|
||||
src/MESSAGE/* @sjplimp
|
||||
src/MLIAP/* @athomps
|
||||
src/SNAP/* @athomps
|
||||
src/SPIN/* @julient31
|
||||
src/USER-CGDNA/* @ohenrich
|
||||
src/USER-CGSDK/* @akohlmey
|
||||
src/USER-COLVARS/* @giacomofiorin
|
||||
src/USER-INTEL/* @wmbrownintel
|
||||
src/USER-MANIFOLD/* @Pakketeretet2
|
||||
src/USER-MEAMC/* @martok
|
||||
src/USER-MESONT/* @iafoss
|
||||
src/USER-MOFFF/* @hheenen
|
||||
src/USER-MOLFILE/* @akohlmey
|
||||
src/USER-NETCDF/* @pastewka
|
||||
src/USER-PLUMED/* @gtribello
|
||||
src/USER-PHONON/* @lingtikong
|
||||
src/USER-PTM/* @pmla
|
||||
src/USER-OMP/* @akohlmey
|
||||
src/USER-QMMM/* @akohlmey
|
||||
src/USER-REAXC/* @hasanmetin
|
||||
src/USER-SCAFACOS/* @rhalver
|
||||
src/USER-TALLY/* @akohlmey
|
||||
src/USER-UEF/* @danicholson
|
||||
src/USER-VTK/* @rbberger
|
||||
src/BROWNIAN/* @samueljmcameron
|
||||
src/CG-DNA/* @ohenrich
|
||||
src/CG-SDK/* @akohlmey
|
||||
src/COLVARS/* @giacomofiorin
|
||||
src/DIELECTRIC/* @ndtrung81
|
||||
src/FEP/* @agiliopadua
|
||||
src/ML-HDNNP/* @singraber
|
||||
src/INTEL/* @wmbrownintel
|
||||
src/MANIFOLD/* @Pakketeretet2
|
||||
src/MDI/* @taylor-a-barnes
|
||||
src/MEAM/* @martok
|
||||
src/MESONT/* @iafoss
|
||||
src/MOFFF/* @hheenen
|
||||
src/MOLFILE/* @akohlmey
|
||||
src/NETCDF/* @pastewka
|
||||
src/ML-PACE/* @yury-lysogorskiy
|
||||
src/PLUMED/* @gtribello
|
||||
src/PHONON/* @lingtikong
|
||||
src/PTM/* @pmla
|
||||
src/OPENMP/* @akohlmey
|
||||
src/QMMM/* @akohlmey
|
||||
src/REAXFF/* @hasanmetin
|
||||
src/REACTION/* @jrgissing
|
||||
src/SCAFACOS/* @rhalver
|
||||
src/TALLY/* @akohlmey
|
||||
src/UEF/* @danicholson
|
||||
src/VTK/* @rbberger
|
||||
|
||||
|
||||
# individual files in packages
|
||||
@ -47,7 +56,6 @@ src/GPU/pair_vashishta_gpu.* @andeplane
|
||||
src/KOKKOS/pair_vashishta_kokkos.* @andeplane
|
||||
src/MANYBODY/pair_vashishta_table.* @andeplane
|
||||
src/MANYBODY/pair_atm.* @sergeylishchuk
|
||||
src/USER-REACTION/fix_bond_react.* @jrgissing
|
||||
src/USER-MISC/*_grem.* @dstelter92
|
||||
src/USER-MISC/compute_stress_mop*.* @RomainVermorel
|
||||
|
||||
@ -122,15 +130,17 @@ tools/emacs/* @HaoZeke
|
||||
tools/singularity/* @akohlmey @rbberger
|
||||
tools/code_standard/* @rbberger
|
||||
tools/valgrind/* @akohlmey
|
||||
tools/swig/* @akohlmey
|
||||
tools/offline/* @rbberger
|
||||
|
||||
# tests
|
||||
unittest/* @akohlmey @rbberger
|
||||
|
||||
# cmake
|
||||
cmake/* @junghans @rbberger
|
||||
cmake/Modules/Packages/USER-COLVARS.cmake @junghans @rbberger @giacomofiorin
|
||||
cmake/Modules/Packages/COLVARS.cmake @junghans @rbberger @giacomofiorin
|
||||
cmake/Modules/Packages/KIM.cmake @junghans @rbberger @ellio167
|
||||
cmake/presets/*.cmake @junghans @rbberger @akohlmey
|
||||
cmake/presets/*.cmake @akohlmey
|
||||
|
||||
# python
|
||||
python/* @rbberger
|
||||
@ -142,6 +152,7 @@ fortran/* @akohlmey
|
||||
doc/utils/*/* @rbberger
|
||||
doc/Makefile @rbberger
|
||||
doc/README @rbberger
|
||||
examples/plugin/* @akohlmey
|
||||
|
||||
# for releases
|
||||
src/version.h @sjplimp
|
||||
|
||||
14
.github/CONTRIBUTING.md
vendored
14
.github/CONTRIBUTING.md
vendored
@ -26,11 +26,11 @@ __
|
||||
|
||||
## 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 the ['lammps-users' mailing list](https://lammps.sandia.gov/mail.html). 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.
|
||||
> **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 moved to a more general category.
|
||||
|
||||
## How Can I Contribute?
|
||||
|
||||
There are several ways how you can actively contribute to the LAMMPS project: you can discuss compiling and using LAMMPS, and solving LAMMPS related problems with other LAMMPS users on the lammps-users mailing list, you can report bugs or suggest enhancements by creating issues on GitHub (or posting them to the lammps-users mailing list), 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, 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.
|
||||
|
||||
### Discussing How To Use LAMMPS
|
||||
@ -42,6 +42,8 @@ Anyone can browse/search previous questions/answers in the archives. You do not
|
||||
|
||||
If you post a message and you are a subscriber, your message will appear immediately. If you are not a subscriber, your message will be moderated, which typically takes one business day. Either way, when someone replies the reply will usually be sent to both, your personal email address and the mailing list. When replying to people, that responded to your post to the list, please always included the mailing list in your replies (i.e. use "Reply All" and **not** "Reply"). Responses will appear on the list in a few minutes, but it can take a few hours for postings and replies to show up in the SourceForge archive. Sending replies also to the mailing list is important, so that responses are archived and people with a similar issue can search for possible solutions in the mailing list archive.
|
||||
|
||||
The LAMMPS Materials Science Discourse forum was created recently to facilitate discussion not just about LAMMPS and as part of a larger effort towards building a materials science community. The forum contains a read-only sub-category with the continually updated mailing list archive, so you won't miss anything by joining only the forum and not the mailing list.
|
||||
|
||||
### 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.
|
||||
@ -72,13 +74,13 @@ Here is a checklist of steps you need to follow to submit a single file or user
|
||||
* For consistency with the rest of LAMMPS and especially, if you want your contribution(s) to be added to main LAMMPS code or one of its standard packages, it needs to be written in a style compatible with other LAMMPS source files. This means: 2-character indentation per level, no tabs, no trailing whitespace, no lines over 80 characters. I/O is done via the C-style stdio library, style class header files should not import any system headers, STL containers should be avoided in headers, and forward declarations used where possible or needed. All added code should be placed into the LAMMPS_NS namespace or a sub-namespace; global or static variables should be avoided, as they conflict with the modular nature of LAMMPS and the C++ class structure. There MUST NOT be any "using namespace XXX;" statements in headers. In the implementation file (<name>.cpp) system includes should be placed in angular brackets (<>) and for c-library functions the C++ style header files should be included (<cstdio> instead of <stdio.h>, or <cstring> instead of <string.h>). This all is so the developers can more easily understand, integrate, and maintain your contribution and reduce conflicts with other parts of LAMMPS. This basically means that the code accesses data structures, performs its operations, and is formatted similar to other LAMMPS source files, including the use of the error class for error and warning messages.
|
||||
* Source, style name, and documentation file should follow the following naming convention: style names should be lowercase and words separated by a forward slash; for a new fix style 'foo/bar', the class should be named FixFooBar, the name of the source files should be 'fix_foo_bar.h' and 'fix_foo_bar.cpp' and the corresponding documentation should be in a file 'fix_foo_bar.rst'.
|
||||
* If you want your contribution to be added as a user-contributed feature, and it is a single file (actually a `<name>.cpp` and `<name>.h` file) it can be rapidly added to the USER-MISC directory. Include the one-line entry to add to the USER-MISC/README file in that directory, along with the 2 source files. You can do this multiple times if you wish to contribute several individual features.
|
||||
* If you want your contribution to be added as a user-contribution and it is several related features, it is probably best to make it a user package directory with a name like USER-FOO. In addition to your new files, the directory should contain a README text file. The README should contain your name and contact information and a brief description of what your new package does. If your files depend on other LAMMPS style files also being installed (e.g. because your file is a derived class from the other LAMMPS class), then an Install.sh file is also needed to check for those dependencies. See other README and Install.sh files in other USER directories as examples. Send us a tarball of this USER-FOO directory.
|
||||
* If you want your contribution to be added as a user-contribution and it is several related features, it is probably best to make it a user package directory with a name like FOO. In addition to your new files, the directory should contain a README text file. The README should contain your name and contact information and a brief description of what your new package does. If your files depend on other LAMMPS style files also being installed (e.g. because your file is a derived class from the other LAMMPS class), then an Install.sh file is also needed to check for those dependencies. See other README and Install.sh files in other USER directories as examples. Send us a tarball of this FOO directory.
|
||||
* Your new source files need to have the LAMMPS copyright, GPL notice, and your name and email address at the top, like other user-contributed LAMMPS source files. They need to create a class that is inside the LAMMPS namespace. If the file is for one of the USER packages, including USER-MISC, then we are not as picky about the coding style (see above). I.e. the files do not need to be in the same stylistic format and syntax as other LAMMPS files, though that would be nice for developers as well as users who try to read your code.
|
||||
* You **must** also create or extend a documentation file for each new command or style you are adding to LAMMPS. For simplicity and convenience, the documentation of groups of closely related commands or styles may be combined into a single file. This will be one file for a single-file feature. For a package, it might be several files. These are files in the [reStructuredText](https://docutils.sourceforge.io/rst.html) markup language, that are then converted to HTML and PDF. The tools for this conversion are included in the source distribution, and the translation can be as simple as doing "make html pdf" in the doc folder. Thus the documentation source files must be in the same format and style as other `<name>.rst` files in the lammps/doc/src directory for similar commands and styles; use one or more of them as a starting point. An introduction to reStructuredText can be found at [https://docutils.sourceforge.io/docs/user/rst/quickstart.html](https://docutils.sourceforge.io/docs/user/rst/quickstart.html). The text files can include mathematical expressions and symbol in ".. math::" sections or ":math:" expressions or figures (see doc/JPG for examples), or even additional PDF files with further details (see doc/PDF for examples). The doc page should also include literature citations as appropriate; see the bottom of doc/fix_nh.rst for examples and the earlier part of the same file for how to format the cite itself. The "Restrictions" section of the doc page should indicate that your command is only available if LAMMPS is built with the appropriate USER-MISC or USER-FOO package. See other user package doc files for examples of how to do this. The prerequisite for building the HTML format files are Python 3.x and virtualenv. Please run at least `make html`, `make pdf` and `make spelling` and carefully inspect and proofread the resulting HTML format doc page as well as the output produced to the screen. Make sure that all spelling errors are fixed or the necessary false positives are added to the `doc/utils/sphinx-config/false_positives.txt` file. For new styles, those usually also need to be added to lists on the respective overview pages. This can be checked for also with `make style_check`.
|
||||
* For a new package (or even a single command) you should include one or more example scripts demonstrating its use. These should run in no more than a couple minutes, even on a single processor, and not require large data files as input. See directories under examples/USER for examples of input scripts other users provided for their packages. These example inputs are also required for validating memory accesses and testing for memory leaks with valgrind
|
||||
* You **must** also create or extend a documentation file for each new command or style you are adding to LAMMPS. For simplicity and convenience, the documentation of groups of closely related commands or styles may be combined into a single file. This will be one file for a single-file feature. For a package, it might be several files. These are files in the [reStructuredText](https://docutils.sourceforge.io/rst.html) markup language, that are then converted to HTML and PDF. The tools for this conversion are included in the source distribution, and the translation can be as simple as doing "make html pdf" in the doc folder. Thus the documentation source files must be in the same format and style as other `<name>.rst` files in the lammps/doc/src directory for similar commands and styles; use one or more of them as a starting point. An introduction to reStructuredText can be found at [https://docutils.sourceforge.io/docs/user/rst/quickstart.html](https://docutils.sourceforge.io/docs/user/rst/quickstart.html). The text files can include mathematical expressions and symbol in ".. math::" sections or ":math:" expressions or figures (see doc/JPG for examples), or even additional PDF files with further details (see doc/PDF for examples). The doc page should also include literature citations as appropriate; see the bottom of doc/fix_nh.rst for examples and the earlier part of the same file for how to format the cite itself. The "Restrictions" section of the doc page should indicate that your command is only available if LAMMPS is built with the appropriate USER-MISC or FOO package. See other user package doc files for examples of how to do this. The prerequisite for building the HTML format files are Python 3.x and virtualenv. Please run at least `make html`, `make pdf` and `make spelling` and carefully inspect and proofread the resulting HTML format doc page as well as the output produced to the screen. Make sure that all spelling errors are fixed or the necessary false positives are added to the `doc/utils/sphinx-config/false_positives.txt` file. For new styles, those usually also need to be added to lists on the respective overview pages. This can be checked for also with `make style_check`.
|
||||
* For a new package (or even a single command) you should include one or more example scripts demonstrating its use. These should run in no more than a couple minutes, even on a single processor, and not require large data files as input. See directories under examples/PACKAGES for examples of input scripts other users provided for their packages. These example inputs are also required for validating memory accesses and testing for memory leaks with valgrind
|
||||
* For new utility functions or class (i.e. anything that does not depend on a LAMMPS object), new unit tests should be added to the unittest tree.
|
||||
* When adding a new LAMMPS style, a .yaml file with a test configuration and reference data should be added for the styles where a suitable tester program already exists (e.g. pair styles, bond styles, etc.).
|
||||
* If there is a paper of yours describing your feature (either the algorithm/science behind the feature itself, or its initial usage, or its implementation in LAMMPS), you can add the citation to the <name>.cpp source file. See src/USER-EFF/atom_vec_electron.cpp for an example. A LaTeX citation is stored in a variable at the top of the file and a single line of code that references the variable is added to the constructor of the class. Whenever a user invokes your feature from their input script, this will cause LAMMPS to output the citation to a log.cite file and prompt the user to examine the file. Note that you should only use this for a paper you or your group authored. E.g. adding a cite in the code for a paper by Nose and Hoover if you write a fix that implements their integrator is not the intended usage. That kind of citation should just be in the doc page you provide.
|
||||
* If there is a paper of yours describing your feature (either the algorithm/science behind the feature itself, or its initial usage, or its implementation in LAMMPS), you can add the citation to the <name>.cpp source file. See src/EFF/atom_vec_electron.cpp for an example. A LaTeX citation is stored in a variable at the top of the file and a single line of code that references the variable is added to the constructor of the class. Whenever a user invokes your feature from their input script, this will cause LAMMPS to output the citation to a log.cite file and prompt the user to examine the file. Note that you should only use this for a paper you or your group authored. E.g. adding a cite in the code for a paper by Nose and Hoover if you write a fix that implements their integrator is not the intended usage. That kind of citation should just be in the doc page you provide.
|
||||
|
||||
Finally, as a general rule-of-thumb, the more clear and self-explanatory you make your documentation and README files, and the easier you make it for people to get started, e.g. by providing example scripts, the more likely it is that users will try out your new feature.
|
||||
|
||||
|
||||
4
.github/codeql/cpp.yml
vendored
Normal file
4
.github/codeql/cpp.yml
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
paths:
|
||||
- src
|
||||
- lib
|
||||
- tools
|
||||
5
.github/codeql/python.yml
vendored
Normal file
5
.github/codeql/python.yml
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
paths:
|
||||
- python/lammps
|
||||
|
||||
queries:
|
||||
- uses: security-and-quality
|
||||
8
.github/workflows/codeql-analysis.yml
vendored
8
.github/workflows/codeql-analysis.yml
vendored
@ -31,16 +31,18 @@ jobs:
|
||||
uses: github/codeql-action/init@v1
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
config-file: ./.github/codeql/${{ matrix.language }}.yml
|
||||
|
||||
- name: Create Build Environment
|
||||
run: cmake -E make_directory ${{github.workspace}}/build
|
||||
if: ${{ matrix.language == 'cpp' }}
|
||||
run: mkdir build
|
||||
|
||||
- name: Building LAMMPS via CMake
|
||||
if: ${{ matrix.language == 'cpp' }}
|
||||
shell: bash
|
||||
working-directory: ${{github.workspace}}/build
|
||||
working-directory: build
|
||||
run: |
|
||||
cmake -C $GITHUB_WORKSPACE/cmake/presets/most.cmake $GITHUB_WORKSPACE/cmake
|
||||
cmake -C ../cmake/presets/most.cmake ../cmake
|
||||
cmake --build . --parallel 2
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
|
||||
32
.github/workflows/unittest-macos.yml
vendored
32
.github/workflows/unittest-macos.yml
vendored
@ -10,6 +10,8 @@ jobs:
|
||||
name: MacOS Unit Test
|
||||
if: ${{ github.repository == 'lammps/lammps' }}
|
||||
runs-on: macos-latest
|
||||
env:
|
||||
CCACHE_DIR: ${{ github.workspace }}/.ccache
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
@ -17,20 +19,36 @@ jobs:
|
||||
with:
|
||||
fetch-depth: 2
|
||||
|
||||
- name: Install ccache
|
||||
run: brew install ccache
|
||||
|
||||
- name: Create Build Environment
|
||||
run: cmake -E make_directory ${{github.workspace}}/build
|
||||
run: mkdir build
|
||||
|
||||
- name: Set up ccache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ${{ env.CCACHE_DIR }}
|
||||
key: macos-ccache-${{ github.sha }}
|
||||
restore-keys: macos-ccache-
|
||||
|
||||
- name: Building LAMMPS via CMake
|
||||
shell: bash
|
||||
working-directory: ${{github.workspace}}/build
|
||||
working-directory: build
|
||||
run: |
|
||||
cmake -C $GITHUB_WORKSPACE/cmake/presets/clang.cmake \
|
||||
-C $GITHUB_WORKSPACE/cmake/presets/most.cmake \
|
||||
$GITHUB_WORKSPACE/cmake \
|
||||
-DENABLE_TESTING=ON -DBUILD_SHARED_LIBS=ON -DLAMMPS_EXCEPTIONS=ON
|
||||
ccache -z
|
||||
cmake -C ../cmake/presets/clang.cmake \
|
||||
-C ../cmake/presets/most.cmake \
|
||||
-D CMAKE_CXX_COMPILER_LAUNCHER=ccache \
|
||||
-D CMAKE_C_COMPILER_LAUNCHER=ccache \
|
||||
-D ENABLE_TESTING=on \
|
||||
-D BUILD_SHARED_LIBS=on \
|
||||
-D LAMMPS_EXCEPTIONS=on \
|
||||
../cmake
|
||||
cmake --build . --parallel 2
|
||||
ccache -s
|
||||
|
||||
- name: Run Tests
|
||||
working-directory: ${{github.workspace}}/build
|
||||
working-directory: build
|
||||
shell: bash
|
||||
run: ctest -V
|
||||
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@ -12,6 +12,7 @@
|
||||
*.sif
|
||||
*.dll
|
||||
*.pyc
|
||||
a.out
|
||||
__pycache__
|
||||
|
||||
Obj_*
|
||||
|
||||
14
.lgtm.yml
Normal file
14
.lgtm.yml
Normal file
@ -0,0 +1,14 @@
|
||||
extraction:
|
||||
cpp:
|
||||
configure:
|
||||
command:
|
||||
- "mkdir build"
|
||||
- "cd build"
|
||||
- "cmake -G Ninja -C ../cmake/presets/most.cmake ../cmake"
|
||||
index:
|
||||
build_command:
|
||||
- "cd build"
|
||||
- "ninja"
|
||||
python:
|
||||
python_setup:
|
||||
version: 3
|
||||
20
README
20
README
@ -14,10 +14,10 @@ LAMMPS is a classical molecular dynamics simulation code designed to
|
||||
run efficiently on parallel computers. It was developed at Sandia
|
||||
National Laboratories, a US Department of Energy facility, with
|
||||
funding from the DOE. It is an open-source code, distributed freely
|
||||
under the terms of the GNU Public License (GPL).
|
||||
under the terms of the GNU Public License (GPL) version 2.
|
||||
|
||||
The primary author of the code is Steve Plimpton, who can be emailed
|
||||
at sjplimp@sandia.gov. The LAMMPS WWW Site at lammps.sandia.gov has
|
||||
at sjplimp@sandia.gov. The LAMMPS WWW Site at www.lammps.org has
|
||||
more information about the code and its uses.
|
||||
|
||||
The LAMMPS distribution includes the following files and directories:
|
||||
@ -37,14 +37,14 @@ tools pre- and post-processing tools
|
||||
|
||||
Point your browser at any of these files to get started:
|
||||
|
||||
https://lammps.sandia.gov/doc/Manual.html LAMMPS manual
|
||||
https://lammps.sandia.gov/doc/Intro.html hi-level introduction
|
||||
https://lammps.sandia.gov/doc/Build.html how to build LAMMPS
|
||||
https://lammps.sandia.gov/doc/Run_head.html how to run LAMMPS
|
||||
https://lammps.sandia.gov/doc/Commands_all.html Table of available commands
|
||||
https://lammps.sandia.gov/doc/Library.html LAMMPS library interfaces
|
||||
https://lammps.sandia.gov/doc/Modify.html how to modify and extend LAMMPS
|
||||
https://lammps.sandia.gov/doc/Developer.html LAMMPS developer info
|
||||
https://docs.lammps.org/Manual.html LAMMPS manual
|
||||
https://docs.lammps.org/Intro.html hi-level introduction
|
||||
https://docs.lammps.org/Build.html how to build LAMMPS
|
||||
https://docs.lammps.org/Run_head.html how to run LAMMPS
|
||||
https://docs.lammps.org/Commands_all.html Table of available commands
|
||||
https://docs.lammps.org/Library.html LAMMPS library interfaces
|
||||
https://docs.lammps.org/Modify.html how to modify and extend LAMMPS
|
||||
https://docs.lammps.org/Developer.html LAMMPS developer info
|
||||
|
||||
You can also create these doc pages locally:
|
||||
|
||||
|
||||
35
SECURITY.md
Normal file
35
SECURITY.md
Normal file
@ -0,0 +1,35 @@
|
||||
# Security Policy
|
||||
|
||||
LAMMPS is designed as a user-level application to conduct computer
|
||||
simulations for research using classical mechanics. As such LAMMPS
|
||||
depends to some degrees on users providing correctly formatted input and
|
||||
LAMMPS needs to read and write files based on uncontrolled user input.
|
||||
As a parallel application for use in high-performance computing
|
||||
environments, performance critical steps are also done without checking
|
||||
data.
|
||||
|
||||
LAMMPS also is interfaced to a number of external libraries, including
|
||||
libraries with experimental research software, that are not validated
|
||||
and tested by the LAMMPS developers, so it is easy to import bad
|
||||
behavior from calling functions in one of those libraries.
|
||||
|
||||
Thus is is quite easy to crash LAMMPS through malicious input and do all
|
||||
kinds of filesystem manipulations. And because of that LAMMPS should
|
||||
**NEVER** be compiled or **run** as superuser, either from a "root" or
|
||||
"administrator" account directly or indirectly via "sudo" or "su".
|
||||
|
||||
Therefore what could be seen as a security vulnerability is usually
|
||||
either a user mistake or a bug in the code. Bugs can be reported in
|
||||
the LAMMPS project
|
||||
[issue tracker on GitHub](https://github.com/lammps/lammps/issues).
|
||||
|
||||
|
||||
# Version Updates
|
||||
|
||||
LAMMPS follows continuous release development model. We aim to keep all
|
||||
release versions (stable or patch) fully functional and employ a variety
|
||||
of automatic testing procedures to detect failures of existing
|
||||
functionality from adding new features before releases are made. Thus
|
||||
bugfixes and updates are only integrated into the current development
|
||||
branch and thus the next (patch) release and users are recommended to
|
||||
update regularly.
|
||||
@ -1,7 +1,7 @@
|
||||
These are input scripts used to run benchmark tests for many of the
|
||||
interatomic potentials in LAMMPS. The results of running these
|
||||
scripts on different machines are shown on the Potentials section of
|
||||
the Benchmark page of the LAMMPS WWW site (lammps.sandia.gov/bench).
|
||||
the Benchmark page of the LAMMPS WWW site (https://www.lammps.org/bench.html).
|
||||
|
||||
Examples are shown below of how to run these scripts. Log files for
|
||||
running them on 1 and 4 processors of a Linux box are included in the
|
||||
|
||||
@ -8,7 +8,7 @@ region box block 0 20 0 20 0 20
|
||||
create_box 1 box
|
||||
create_atoms 1 box
|
||||
|
||||
pair_style meam/c
|
||||
pair_style meam
|
||||
pair_coeff * * library.meam Ni4 Ni.meam Ni4
|
||||
|
||||
velocity all create 1600.0 376847 loop geom
|
||||
@ -15,7 +15,7 @@ create_atoms 1 box
|
||||
Created 32000 atoms
|
||||
create_atoms CPU = 0.002 seconds
|
||||
|
||||
pair_style meam/c
|
||||
pair_style meam
|
||||
pair_coeff * * library.meam Ni4 Ni.meam Ni4
|
||||
Reading potential file library.meam with DATE: 2012-06-29
|
||||
Reading potential file Ni.meam with DATE: 2007-06-11
|
||||
@ -38,12 +38,12 @@ Neighbor list info ...
|
||||
ghost atom cutoff = 5
|
||||
binsize = 2.5, bins = 29 29 29
|
||||
2 neighbor lists, perpetual/occasional/extra = 2 0 0
|
||||
(1) pair meam/c, perpetual
|
||||
(1) pair meam, perpetual
|
||||
attributes: full, newton on
|
||||
pair build: full/bin/atomonly
|
||||
stencil: full/bin/3d
|
||||
bin: standard
|
||||
(2) pair meam/c, perpetual, half/full from (1)
|
||||
(2) pair meam, perpetual, half/full from (1)
|
||||
attributes: half, newton on
|
||||
pair build: halffull/newton
|
||||
stencil: none
|
||||
@ -15,7 +15,7 @@ create_atoms 1 box
|
||||
Created 32000 atoms
|
||||
create_atoms CPU = 0.001 seconds
|
||||
|
||||
pair_style meam/c
|
||||
pair_style meam
|
||||
pair_coeff * * library.meam Ni4 Ni.meam Ni4
|
||||
Reading potential file library.meam with DATE: 2012-06-29
|
||||
Reading potential file Ni.meam with DATE: 2007-06-11
|
||||
@ -38,12 +38,12 @@ Neighbor list info ...
|
||||
ghost atom cutoff = 5
|
||||
binsize = 2.5, bins = 29 29 29
|
||||
2 neighbor lists, perpetual/occasional/extra = 2 0 0
|
||||
(1) pair meam/c, perpetual
|
||||
(1) pair meam, perpetual
|
||||
attributes: full, newton on
|
||||
pair build: full/bin/atomonly
|
||||
stencil: full/bin/3d
|
||||
bin: standard
|
||||
(2) pair meam/c, perpetual, half/full from (1)
|
||||
(2) pair meam, perpetual, half/full from (1)
|
||||
attributes: half, newton on
|
||||
pair build: halffull/newton
|
||||
stencil: none
|
||||
@ -24,7 +24,7 @@ velocity all create 300.0 9999
|
||||
|
||||
pair_style reax/c NULL
|
||||
pair_coeff * * ffield.reax C H O N
|
||||
WARNING: Changed valency_val to valency_boc for X (src/USER-REAXC/reaxc_ffield.cpp:315)
|
||||
WARNING: Changed valency_val to valency_boc for X (src/REAXFF/reaxc_ffield.cpp:315)
|
||||
|
||||
timestep 0.1
|
||||
fix 1 all nve
|
||||
|
||||
@ -24,7 +24,7 @@ velocity all create 300.0 9999
|
||||
|
||||
pair_style reax/c NULL
|
||||
pair_coeff * * ffield.reax C H O N
|
||||
WARNING: Changed valency_val to valency_boc for X (src/USER-REAXC/reaxc_ffield.cpp:315)
|
||||
WARNING: Changed valency_val to valency_boc for X (src/REAXFF/reaxc_ffield.cpp:315)
|
||||
|
||||
timestep 0.1
|
||||
fix 1 all nve
|
||||
|
||||
@ -2,7 +2,7 @@ LAMMPS benchmark problems
|
||||
|
||||
This directory contains 5 benchmark problems which are discussed in
|
||||
the Benchmark section of the LAMMPS documentation, and on the
|
||||
Benchmark page of the LAMMPS WWW site (lammps.sandia.gov/bench).
|
||||
Benchmark page of the LAMMPS WWW site (https://www.lammps.org/bench.html).
|
||||
|
||||
This directory also has several sub-directories:
|
||||
|
||||
@ -11,7 +11,7 @@ KEPLER benchmark scripts for GPU cluster with Kepler GPUs
|
||||
POTENTIALS benchmarks scripts for various potentials in LAMMPS
|
||||
|
||||
The results for all of these benchmarks are displayed and discussed on
|
||||
the Benchmark page of the LAMMPS WWW site: lammps.sandia.gov/bench.
|
||||
the Benchmark page of the LAMMPS WWW site: https://www.lammps.org/bench.html
|
||||
|
||||
The remainder of this file refers to the 5 problems in the top-level
|
||||
of this directory and how to run them on CPUs, either in serial or
|
||||
|
||||
@ -7,6 +7,11 @@ cmake_minimum_required(VERSION 3.10)
|
||||
if(POLICY CMP0074)
|
||||
cmake_policy(SET CMP0074 NEW)
|
||||
endif()
|
||||
# set policy to silence warnings about missing executable permissions in
|
||||
# pythonx.y-config when cross-compiling. review occasionally if it may be set to NEW
|
||||
if(POLICY CMP0109)
|
||||
cmake_policy(SET CMP0109 OLD)
|
||||
endif()
|
||||
########################################
|
||||
|
||||
project(lammps CXX)
|
||||
@ -72,7 +77,7 @@ check_for_autogen_files(${LAMMPS_SOURCE_DIR})
|
||||
include(CheckIncludeFileCXX)
|
||||
|
||||
# set required compiler flags and compiler/CPU arch specific optimizations
|
||||
if(${CMAKE_CXX_COMPILER_ID} STREQUAL "Intel")
|
||||
if((CMAKE_CXX_COMPILER_ID STREQUAL "Intel") OR (CMAKE_CXX_COMPILER_ID STREQUAL "IntelLLVM"))
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -restrict")
|
||||
if(CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 17.3 OR CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 17.4)
|
||||
set(CMAKE_TUNE_DEFAULT "-xCOMMON-AVX512")
|
||||
@ -86,6 +91,11 @@ set(CMAKE_CXX_STANDARD 11)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
set(CMAKE_CXX_EXTENSIONS OFF CACHE BOOL "Use compiler extensions")
|
||||
|
||||
# export all symbols when building a .dll file on windows
|
||||
if((CMAKE_SYSTEM_NAME STREQUAL "Windows") AND BUILD_SHARED_LIBS)
|
||||
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
|
||||
endif()
|
||||
|
||||
########################################################################
|
||||
# User input options #
|
||||
########################################################################
|
||||
@ -104,11 +114,23 @@ endif()
|
||||
option(BUILD_TOOLS "Build and install LAMMPS tools (msi2lmp, binary2txt, chain)" OFF)
|
||||
option(BUILD_LAMMPS_SHELL "Build and install the LAMMPS shell" OFF)
|
||||
|
||||
# allow enabling clang-tidy for C++ files
|
||||
set(ENABLE_CLANG_TIDY OFF CACHE BOOL "Include clang-tidy processing when compiling")
|
||||
if(ENABLE_CLANG_TIDY)
|
||||
set(CMAKE_CXX_CLANG_TIDY "clang-tidy;-checks=*-header-filter=.*" CACHE STRING "")
|
||||
endif()
|
||||
|
||||
include(GNUInstallDirs)
|
||||
file(GLOB ALL_SOURCES ${LAMMPS_SOURCE_DIR}/[^.]*.cpp)
|
||||
file(GLOB MAIN_SOURCES ${LAMMPS_SOURCE_DIR}/main.cpp)
|
||||
list(REMOVE_ITEM ALL_SOURCES ${MAIN_SOURCES})
|
||||
add_library(lammps ${ALL_SOURCES})
|
||||
|
||||
# tell CMake to export all symbols to a .dll on Windows with MinGW cross-compilers
|
||||
if(BUILD_SHARED_LIBS AND (CMAKE_SYSTEM_NAME STREQUAL "Windows") AND CMAKE_CROSSCOMPILING)
|
||||
set_target_properties(lammps PROPERTIES LINK_FLAGS "-Wl,--export-all-symbols")
|
||||
endif()
|
||||
|
||||
add_executable(lmp ${MAIN_SOURCES})
|
||||
target_link_libraries(lmp PRIVATE lammps)
|
||||
set_target_properties(lmp PROPERTIES OUTPUT_NAME ${LAMMPS_BINARY})
|
||||
@ -116,17 +138,86 @@ install(TARGETS lmp EXPORT LAMMPS_Targets DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||
|
||||
option(CMAKE_VERBOSE_MAKEFILE "Generate verbose Makefiles" OFF)
|
||||
|
||||
set(STANDARD_PACKAGES ASPHERE BODY CLASS2 COLLOID COMPRESS DIPOLE
|
||||
GRANULAR KSPACE LATTE MANYBODY MC MESSAGE MISC MLIAP MOLECULE PERI POEMS
|
||||
PLUGIN QEQ REPLICA RIGID SHOCK SPIN SNAP SRD KIM PYTHON MSCG MPIIO VORONOI
|
||||
USER-ADIOS USER-ATC USER-AWPMD USER-BOCS USER-CGDNA USER-MESODPD USER-CGSDK
|
||||
USER-COLVARS USER-DIFFRACTION USER-DPD USER-DRUDE USER-EFF USER-FEP USER-H5MD
|
||||
USER-LB USER-MANIFOLD USER-MEAMC USER-MESONT USER-MGPT USER-MISC USER-MOFFF
|
||||
USER-MOLFILE USER-NETCDF USER-PHONON USER-PLUMED USER-PTM USER-QTB
|
||||
USER-REACTION USER-REAXC USER-SCAFACOS USER-SDPD USER-SMD USER-SMTBQ USER-SPH
|
||||
USER-TALLY USER-UEF USER-VTK USER-QUIP USER-QMMM USER-YAFF USER-PACE)
|
||||
set(STANDARD_PACKAGES
|
||||
ADIOS
|
||||
ASPHERE
|
||||
ATC
|
||||
AWPMD
|
||||
BOCS
|
||||
BODY
|
||||
BROWNIAN
|
||||
CG-DNA
|
||||
CG-SDK
|
||||
CLASS2
|
||||
COLLOID
|
||||
COLVARS
|
||||
COMPRESS
|
||||
DIELECTRIC
|
||||
DIFFRACTION
|
||||
DIPOLE
|
||||
DPD-BASIC
|
||||
DPD-MESO
|
||||
DPD-REACT
|
||||
DPD-SMOOTH
|
||||
DRUDE
|
||||
EFF
|
||||
FEP
|
||||
GRANULAR
|
||||
H5MD
|
||||
KIM
|
||||
KSPACE
|
||||
LATBOLTZ
|
||||
LATTE
|
||||
MACHDYN
|
||||
MANIFOLD
|
||||
MANYBODY
|
||||
MC
|
||||
MDI
|
||||
MEAM
|
||||
MESONT
|
||||
MESSAGE
|
||||
MGPT
|
||||
MISC
|
||||
ML-HDNNP
|
||||
ML-IAP
|
||||
ML-PACE
|
||||
ML-QUIP
|
||||
ML-RANN
|
||||
ML-SNAP
|
||||
MOFFF
|
||||
MOLECULE
|
||||
MOLFILE
|
||||
MPIIO
|
||||
MSCG
|
||||
NETCDF
|
||||
PERI
|
||||
PHONON
|
||||
PLUGIN
|
||||
PLUMED
|
||||
POEMS
|
||||
PTM
|
||||
PYTHON
|
||||
QEQ
|
||||
QMMM
|
||||
QTB
|
||||
REACTION
|
||||
REAXFF
|
||||
REPLICA
|
||||
RIGID
|
||||
SCAFACOS
|
||||
SHOCK
|
||||
SMTBQ
|
||||
SPH
|
||||
SPIN
|
||||
SRD
|
||||
TALLY
|
||||
UEF
|
||||
USER-MISC
|
||||
VORONOI
|
||||
VTK
|
||||
YAFF)
|
||||
|
||||
set(SUFFIX_PACKAGES CORESHELL GPU KOKKOS OPT USER-INTEL USER-OMP)
|
||||
set(SUFFIX_PACKAGES CORESHELL GPU KOKKOS OPT INTEL OPENMP)
|
||||
|
||||
foreach(PKG ${STANDARD_PACKAGES} ${SUFFIX_PACKAGES})
|
||||
option(PKG_${PKG} "Build ${PKG} Package" OFF)
|
||||
@ -137,7 +228,7 @@ endforeach()
|
||||
######################################################
|
||||
target_include_directories(lammps PUBLIC $<BUILD_INTERFACE:${LAMMPS_SOURCE_DIR}>)
|
||||
|
||||
if(PKG_USER-ADIOS)
|
||||
if(PKG_ADIOS)
|
||||
# The search for ADIOS2 must come before MPI because
|
||||
# it includes its own MPI search with the latest FindMPI.cmake
|
||||
# script that defines the MPI::MPI_C target
|
||||
@ -151,12 +242,13 @@ if(NOT CMAKE_CROSSCOMPILING)
|
||||
find_package(MPI QUIET)
|
||||
option(BUILD_MPI "Build MPI version" ${MPI_FOUND})
|
||||
else()
|
||||
set(MPI_CXX_SKIP_MPICXX TRUE)
|
||||
option(BUILD_MPI "Build MPI version" OFF)
|
||||
endif()
|
||||
|
||||
if(BUILD_MPI)
|
||||
# We use a non-standard procedure to cross-compile with MPI on Windows
|
||||
if((CMAKE_SYSTEM_NAME STREQUAL Windows) AND CMAKE_CROSSCOMPILING)
|
||||
if((CMAKE_SYSTEM_NAME STREQUAL "Windows") AND CMAKE_CROSSCOMPILING)
|
||||
include(MPI4WIN)
|
||||
target_link_libraries(lammps PUBLIC MPI::MPI_CXX)
|
||||
else()
|
||||
@ -190,7 +282,7 @@ string(TOUPPER ${LAMMPS_SIZES} LAMMPS_SIZES)
|
||||
target_compile_definitions(lammps PUBLIC -DLAMMPS_${LAMMPS_SIZES})
|
||||
|
||||
# posix_memalign is not available on Windows
|
||||
if(${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
||||
set(LAMMPS_MEMALIGN "0" CACHE STRING "posix_memalign() is not available on Windows" FORCE)
|
||||
else()
|
||||
set(LAMMPS_MEMALIGN "64" CACHE STRING "enables the use of the posix_memalign() call instead of malloc() when large chunks or memory are allocated by LAMMPS. Set to 0 to disable")
|
||||
@ -206,12 +298,13 @@ endif()
|
||||
|
||||
# "hard" dependencies between packages resulting
|
||||
# in an error instead of skipping over files
|
||||
pkg_depends(MLIAP SNAP)
|
||||
pkg_depends(ML-IAP ML-SNAP)
|
||||
pkg_depends(MPIIO MPI)
|
||||
pkg_depends(USER-ATC MANYBODY)
|
||||
pkg_depends(USER-LB MPI)
|
||||
pkg_depends(USER-PHONON KSPACE)
|
||||
pkg_depends(USER-SCAFACOS MPI)
|
||||
pkg_depends(ATC MANYBODY)
|
||||
pkg_depends(LATBOLTZ MPI)
|
||||
pkg_depends(PHONON KSPACE)
|
||||
pkg_depends(SCAFACOS MPI)
|
||||
pkg_depends(DIELECTRIC KSPACE)
|
||||
|
||||
# detect if we may enable OpenMP support by default
|
||||
set(BUILD_OMP_DEFAULT OFF)
|
||||
@ -232,8 +325,10 @@ if(BUILD_OMP)
|
||||
message(FATAL_ERROR "Cannot find the 'omp.h' header file required for full OpenMP support")
|
||||
endif()
|
||||
|
||||
if (((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 9.0)) OR
|
||||
(CMAKE_CXX_COMPILER_ID STREQUAL "PGI") OR
|
||||
if(((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 9.0)) OR
|
||||
(CMAKE_CXX_COMPILER_ID STREQUAL "PGI") OR (CMAKE_CXX_COMPILER_ID STREQUAL "NVHPC") 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 "Clang") 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)))
|
||||
# GCC 9.x and later plus Clang 10.x and later implement strict OpenMP 4.0 semantics for consts.
|
||||
@ -245,70 +340,7 @@ if(BUILD_OMP)
|
||||
target_link_libraries(lammps PRIVATE OpenMP::OpenMP_CXX)
|
||||
endif()
|
||||
|
||||
# Compiler specific features for testing
|
||||
if(${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU")
|
||||
option(ENABLE_COVERAGE "Enable collecting code coverage data" OFF)
|
||||
mark_as_advanced(ENABLE_COVERAGE)
|
||||
if(ENABLE_COVERAGE)
|
||||
if(CMAKE_VERSION VERSION_LESS 3.13)
|
||||
if(CMAKE_CXX_FLAGS)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --coverage")
|
||||
else()
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_${CMAKE_BUILD_TYPE}_FLAGS} --coverage")
|
||||
endif()
|
||||
else()
|
||||
target_compile_options(lammps PUBLIC --coverage)
|
||||
target_link_options(lammps PUBLIC --coverage)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
#######################################
|
||||
# add custom target for IWYU analysis
|
||||
#######################################
|
||||
set(ENABLE_IWYU OFF CACHE BOOL "Add 'iwyu' build target to call the include-what-you-use tool")
|
||||
mark_as_advanced(ENABLE_IWYU)
|
||||
if(ENABLE_IWYU)
|
||||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||
find_program(IWYU_EXE NAMES include-what-you-use iwyu)
|
||||
find_program(IWYU_TOOL NAMES iwyu_tool iwyu-tool iwyu_tool.py)
|
||||
if (IWYU_EXE AND IWYU_TOOL)
|
||||
add_custom_target(
|
||||
iwyu
|
||||
${IWYU_TOOL} -o clang -p ${CMAKE_CURRENT_BINARY_DIR} -- -Xiwyu --mapping_file=${CMAKE_CURRENT_SOURCE_DIR}/iwyu/iwyu-extra-map.imp
|
||||
COMMENT "Running IWYU")
|
||||
add_dependencies(iwyu lammps)
|
||||
else()
|
||||
message(FATAL_ERROR "To use IWYU you need the include-what-you-use/iwyu executable"
|
||||
"and the iwyu-tool/iwyu_tool script installed in your PATH")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(ENABLE_SANITIZER "none" CACHE STRING "Select a code sanitizer option (none (default), address, leak, thread, undefined)")
|
||||
mark_as_advanced(ENABLE_SANITIZER)
|
||||
set(ENABLE_SANITIZER_VALUES none address leak thread undefined)
|
||||
set_property(CACHE ENABLE_SANITIZER PROPERTY STRINGS ${ENABLE_SANITIZER_VALUES})
|
||||
validate_option(ENABLE_SANITIZER ENABLE_SANITIZER_VALUES)
|
||||
string(TOLOWER ${ENABLE_SANITIZER} ENABLE_SANITIZER)
|
||||
if(NOT ENABLE_SANITIZER STREQUAL "none")
|
||||
if((${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU") OR (${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang"))
|
||||
if(CMAKE_VERSION VERSION_LESS 3.13)
|
||||
if(CMAKE_CXX_FLAGS)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=${ENABLE_SANITIZER}")
|
||||
else()
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_${CMAKE_BUILD_TYPE}_FLAGS} -fsanitize=${ENABLE_SANITIZER}")
|
||||
endif()
|
||||
else()
|
||||
target_compile_options(lammps PUBLIC -fsanitize=${ENABLE_SANITIZER})
|
||||
target_link_options(lammps PUBLIC -fsanitize=${ENABLE_SANITIZER})
|
||||
endif()
|
||||
else()
|
||||
message(WARNING "ENABLE_SANITIZER option not supported by ${CMAKE_CXX_COMPILER_ID} compilers. Ignoring.")
|
||||
set(ENABLE_SANITIZER "none")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(PKG_MSCG OR PKG_USER-ATC OR PKG_USER-AWPMD OR PKG_USER-QUIP OR PKG_LATTE)
|
||||
if(PKG_MSCG OR PKG_ATC OR PKG_AWPMD OR PKG_ML-QUIP OR PKG_LATTE)
|
||||
enable_language(C)
|
||||
find_package(LAPACK)
|
||||
find_package(BLAS)
|
||||
@ -359,7 +391,7 @@ find_program(GZIP_EXECUTABLE gzip)
|
||||
find_package_handle_standard_args(GZIP REQUIRED_VARS GZIP_EXECUTABLE)
|
||||
option(WITH_GZIP "Enable GZIP support" ${GZIP_FOUND})
|
||||
if(WITH_GZIP)
|
||||
if(GZIP_FOUND OR ((CMAKE_SYSTEM_NAME STREQUAL Windows) AND CMAKE_CROSSCOMPILING))
|
||||
if(GZIP_FOUND OR ((CMAKE_SYSTEM_NAME STREQUAL "Windows") AND CMAKE_CROSSCOMPILING))
|
||||
target_compile_definitions(lammps PRIVATE -DLAMMPS_GZIP)
|
||||
else()
|
||||
message(FATAL_ERROR "gzip executable not found")
|
||||
@ -370,7 +402,7 @@ find_program(FFMPEG_EXECUTABLE ffmpeg)
|
||||
find_package_handle_standard_args(FFMPEG REQUIRED_VARS FFMPEG_EXECUTABLE)
|
||||
option(WITH_FFMPEG "Enable FFMPEG support" ${FFMPEG_FOUND})
|
||||
if(WITH_FFMPEG)
|
||||
if(FFMPEG_FOUND OR ((CMAKE_SYSTEM_NAME STREQUAL Windows) AND CMAKE_CROSSCOMPILING))
|
||||
if(FFMPEG_FOUND OR ((CMAKE_SYSTEM_NAME STREQUAL "Windows") AND CMAKE_CROSSCOMPILING))
|
||||
target_compile_definitions(lammps PRIVATE -DLAMMPS_FFMPEG)
|
||||
else()
|
||||
message(FATAL_ERROR "ffmpeg executable not found")
|
||||
@ -387,10 +419,10 @@ else()
|
||||
set(CUDA_REQUEST_PIC)
|
||||
endif()
|
||||
|
||||
foreach(PKG_WITH_INCL KSPACE PYTHON MLIAP VORONOI USER-COLVARS USER-MOLFILE USER-NETCDF USER-PLUMED USER-QMMM
|
||||
USER-QUIP USER-SCAFACOS USER-SMD USER-VTK KIM LATTE MESSAGE MSCG COMPRESS USER-PACE)
|
||||
foreach(PKG_WITH_INCL KSPACE PYTHON ML-IAP VORONOI COLVARS ML-HDNNP MDI MOLFILE NETCDF
|
||||
PLUMED QMMM ML-QUIP SCAFACOS MACHDYN VTK KIM LATTE MESSAGE MSCG COMPRESS ML-PACE)
|
||||
if(PKG_${PKG_WITH_INCL})
|
||||
include(Packages/${PKG_WITH_INCL})
|
||||
include(Packages/${PKG_WITH_INCL})
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
@ -481,11 +513,10 @@ endforeach()
|
||||
##############################################
|
||||
# add lib sources of (simple) enabled packages
|
||||
############################################
|
||||
foreach(SIMPLE_LIB POEMS USER-ATC USER-AWPMD USER-H5MD USER-MESONT)
|
||||
if(PKG_${SIMPLE_LIB})
|
||||
string(REGEX REPLACE "^USER-" "" PKG_LIB "${SIMPLE_LIB}")
|
||||
foreach(PKG_LIB POEMS ATC AWPMD H5MD MESONT)
|
||||
if(PKG_${PKG_LIB})
|
||||
string(TOLOWER "${PKG_LIB}" PKG_LIB)
|
||||
if(PKG_LIB STREQUAL mesont)
|
||||
if(PKG_LIB STREQUAL "mesont")
|
||||
enable_language(Fortran)
|
||||
file(GLOB_RECURSE ${PKG_LIB}_SOURCES
|
||||
${LAMMPS_LIB_SOURCE_DIR}/${PKG_LIB}/[^.]*.f90)
|
||||
@ -497,9 +528,9 @@ foreach(SIMPLE_LIB POEMS USER-ATC USER-AWPMD USER-H5MD USER-MESONT)
|
||||
add_library(${PKG_LIB} STATIC ${${PKG_LIB}_SOURCES})
|
||||
set_target_properties(${PKG_LIB} PROPERTIES OUTPUT_NAME lammps_${PKG_LIB}${LAMMPS_MACHINE})
|
||||
target_link_libraries(lammps PRIVATE ${PKG_LIB})
|
||||
if(PKG_LIB STREQUAL awpmd)
|
||||
if(PKG_LIB STREQUAL "awpmd")
|
||||
target_include_directories(awpmd PUBLIC ${LAMMPS_LIB_SOURCE_DIR}/awpmd/systems/interact ${LAMMPS_LIB_SOURCE_DIR}/awpmd/ivutils/include)
|
||||
elseif(PKG_LIB STREQUAL h5md)
|
||||
elseif(PKG_LIB STREQUAL "h5md")
|
||||
target_include_directories(h5md PUBLIC ${LAMMPS_LIB_SOURCE_DIR}/h5md/include ${HDF5_INCLUDE_DIRS})
|
||||
else()
|
||||
target_include_directories(${PKG_LIB} PUBLIC ${LAMMPS_LIB_SOURCE_DIR}/${PKG_LIB})
|
||||
@ -507,13 +538,13 @@ foreach(SIMPLE_LIB POEMS USER-ATC USER-AWPMD USER-H5MD USER-MESONT)
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
if(PKG_USER-AWPMD)
|
||||
if(PKG_AWPMD)
|
||||
target_link_libraries(awpmd PRIVATE ${LAPACK_LIBRARIES})
|
||||
endif()
|
||||
|
||||
if(PKG_USER-ATC)
|
||||
if(LAMMPS_SIZES STREQUAL BIGBIG)
|
||||
message(FATAL_ERROR "The USER-ATC Package is not compatible with -DLAMMPS_BIGBIG")
|
||||
if(PKG_ATC)
|
||||
if(LAMMPS_SIZES STREQUAL "BIGBIG")
|
||||
message(FATAL_ERROR "The ATC Package is not compatible with -DLAMMPS_BIGBIG")
|
||||
endif()
|
||||
target_link_libraries(atc PRIVATE ${LAPACK_LIBRARIES})
|
||||
if(BUILD_MPI)
|
||||
@ -525,15 +556,15 @@ if(PKG_USER-ATC)
|
||||
target_compile_definitions(atc PRIVATE -DLAMMPS_${LAMMPS_SIZES})
|
||||
endif()
|
||||
|
||||
if(PKG_USER-H5MD)
|
||||
include(Packages/USER-H5MD)
|
||||
if(PKG_H5MD)
|
||||
include(Packages/H5MD)
|
||||
endif()
|
||||
|
||||
######################################################################
|
||||
# packages which selectively include variants based on enabled styles
|
||||
# e.g. accelerator packages
|
||||
######################################################################
|
||||
foreach(PKG_WITH_INCL CORESHELL QEQ USER-OMP USER-SDPD KOKKOS OPT USER-INTEL GPU)
|
||||
foreach(PKG_WITH_INCL CORESHELL QEQ OPENMP DPD-SMOOTH KOKKOS OPT INTEL GPU)
|
||||
if(PKG_${PKG_WITH_INCL})
|
||||
include(Packages/${PKG_WITH_INCL})
|
||||
endif()
|
||||
@ -556,7 +587,7 @@ endif()
|
||||
# and the MPI library - if use - has to be linked right before those
|
||||
# and after everything else that is compiled locally
|
||||
######################################################################
|
||||
if(${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
||||
target_link_libraries(lammps PRIVATE -lwsock32 -lpsapi)
|
||||
endif()
|
||||
|
||||
@ -605,8 +636,8 @@ add_dependencies(lammps gitversion)
|
||||
# Actually add executable and lib to build
|
||||
############################################
|
||||
get_property(LANGUAGES GLOBAL PROPERTY ENABLED_LANGUAGES)
|
||||
list (FIND LANGUAGES "Fortran" _index)
|
||||
if(${_index} GREATER -1)
|
||||
list(FIND LANGUAGES "Fortran" _index)
|
||||
if(_index GREATER -1)
|
||||
target_link_libraries(lammps PRIVATE ${CMAKE_Fortran_IMPLICIT_LINK_LIBRARIES})
|
||||
endif()
|
||||
set(LAMMPS_CXX_HEADERS angle.h atom.h bond.h citeme.h comm.h compute.h dihedral.h domain.h error.h fix.h force.h group.h improper.h
|
||||
@ -684,7 +715,7 @@ if(BUILD_SHARED_LIBS)
|
||||
else()
|
||||
find_package(Python COMPONENTS Interpreter)
|
||||
endif()
|
||||
if (Python_EXECUTABLE)
|
||||
if(Python_EXECUTABLE)
|
||||
add_custom_target(
|
||||
install-python ${CMAKE_COMMAND} -E remove_directory build
|
||||
COMMAND ${Python_EXECUTABLE} install.py -v ${LAMMPS_SOURCE_DIR}/version.h
|
||||
@ -717,7 +748,7 @@ if(BUILD_SHARED_LIBS OR PKG_PYTHON)
|
||||
else()
|
||||
find_package(Python COMPONENTS Interpreter)
|
||||
endif()
|
||||
if (Python_EXECUTABLE)
|
||||
if(Python_EXECUTABLE)
|
||||
file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/python)
|
||||
install(CODE "execute_process(COMMAND ${Python_EXECUTABLE} setup.py build -b ${CMAKE_BINARY_DIR}/python install --prefix=${CMAKE_INSTALL_PREFIX} --root=\$ENV{DESTDIR}/ WORKING_DIRECTORY ${LAMMPS_PYTHON_DIR})")
|
||||
endif()
|
||||
@ -762,15 +793,15 @@ if(OPTIONS)
|
||||
message(" Options: ${OPTIONS}")
|
||||
endif()
|
||||
get_property(LANGUAGES GLOBAL PROPERTY ENABLED_LANGUAGES)
|
||||
list (FIND LANGUAGES "Fortran" _index)
|
||||
if(${_index} GREATER -1)
|
||||
list(FIND LANGUAGES "Fortran" _index)
|
||||
if(_index GREATER -1)
|
||||
message(STATUS "Fortran Compiler: ${CMAKE_Fortran_COMPILER}
|
||||
Type: ${CMAKE_Fortran_COMPILER_ID}
|
||||
Version: ${CMAKE_Fortran_COMPILER_VERSION}
|
||||
Fortran Flags:${CMAKE_Fortran_FLAGS} ${CMAKE_Fortran_FLAGS_${BTYPE}}")
|
||||
endif()
|
||||
list (FIND LANGUAGES "C" _index)
|
||||
if(${_index} GREATER -1)
|
||||
list(FIND LANGUAGES "C" _index)
|
||||
if(_index GREATER -1)
|
||||
message(STATUS "C compiler: ${CMAKE_C_COMPILER}
|
||||
Type: ${CMAKE_C_COMPILER_ID}
|
||||
Version: ${CMAKE_C_COMPILER_VERSION}
|
||||
@ -835,7 +866,7 @@ if(PKG_KSPACE)
|
||||
endif()
|
||||
if(PKG_KOKKOS)
|
||||
if(Kokkos_ENABLE_CUDA)
|
||||
if (${FFT} STREQUAL "KISS")
|
||||
if(FFT STREQUAL "KISS")
|
||||
message(STATUS "Kokkos FFT: KISS")
|
||||
else()
|
||||
message(STATUS "Kokkos FFT: cuFFT")
|
||||
|
||||
@ -15,6 +15,11 @@ if(Python3_EXECUTABLE)
|
||||
${Python3_EXECUTABLE} ${LAMMPS_TOOLS_DIR}/coding_standard/whitespace.py .
|
||||
WORKING_DIRECTORY ${LAMMPS_DIR}
|
||||
COMMENT "Check for whitespace errors")
|
||||
add_custom_target(
|
||||
check-homepage
|
||||
${Python3_EXECUTABLE} ${LAMMPS_TOOLS_DIR}/coding_standard/homepage.py .
|
||||
WORKING_DIRECTORY ${LAMMPS_DIR}
|
||||
COMMENT "Check for homepage URL errors")
|
||||
add_custom_target(
|
||||
check-permissions
|
||||
${Python3_EXECUTABLE} ${LAMMPS_TOOLS_DIR}/coding_standard/permissions.py .
|
||||
@ -25,6 +30,11 @@ if(Python3_EXECUTABLE)
|
||||
${Python3_EXECUTABLE} ${LAMMPS_TOOLS_DIR}/coding_standard/whitespace.py -f .
|
||||
WORKING_DIRECTORY ${LAMMPS_DIR}
|
||||
COMMENT "Fix whitespace errors")
|
||||
add_custom_target(
|
||||
fix-homepage
|
||||
${Python3_EXECUTABLE} ${LAMMPS_TOOLS_DIR}/coding_standard/homepage.py -f .
|
||||
WORKING_DIRECTORY ${LAMMPS_DIR}
|
||||
COMMENT "Fix homepage URL errors")
|
||||
add_custom_target(
|
||||
fix-permissions
|
||||
${Python3_EXECUTABLE} ${LAMMPS_TOOLS_DIR}/coding_standard/permissions.py -f .
|
||||
|
||||
@ -55,8 +55,8 @@ if(BUILD_DOC)
|
||||
COMMAND ${DOCENV_BINARY_DIR}/pip $ENV{PIP_OPTIONS} install -r ${DOC_BUILD_DIR}/requirements.txt --upgrade
|
||||
)
|
||||
|
||||
set(MATHJAX_URL "https://github.com/mathjax/MathJax/archive/3.1.2.tar.gz" CACHE STRING "URL for MathJax tarball")
|
||||
set(MATHJAX_MD5 "a4a6a093a89bc2ccab1452d766b98e53" CACHE STRING "MD5 checksum of 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 "d1c98c746888bfd52ca8ebc10704f92f" CACHE STRING "MD5 checksum of MathJax tarball")
|
||||
mark_as_advanced(MATHJAX_URL)
|
||||
|
||||
# download mathjax distribution and unpack to folder "mathjax"
|
||||
|
||||
61
cmake/Modules/FindN2P2.cmake
Normal file
61
cmake/Modules/FindN2P2.cmake
Normal file
@ -0,0 +1,61 @@
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
# Check if N2P2_DIR is set manually.
|
||||
if (DEFINED ENV{N2P2_DIR})
|
||||
set(N2P2_DIR "${N2P2_DIR}")
|
||||
# If not, try if directory "lib/hdnnp/n2p2" exists.
|
||||
else()
|
||||
get_filename_component(_fullpath "${LAMMPS_LIB_SOURCE_DIR}/hdnnp/n2p2" REALPATH)
|
||||
if (EXISTS ${_fullpath})
|
||||
set(N2P2_DIR "${_fullpath}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Set path to include directory.
|
||||
find_path(N2P2_INCLUDE_DIR InterfaceLammps.h HINTS "${N2P2_DIR}/include")
|
||||
# Two libraries need to be linked: libnnp and libnnpif.
|
||||
find_library(N2P2_LIBNNP NAMES nnp HINTS "${N2P2_DIR}/lib")
|
||||
find_library(N2P2_LIBNNPIF NAMES nnpif HINTS "${N2P2_DIR}/lib")
|
||||
# Users could compile n2p2 with extra flags which are then also required for
|
||||
# pair_hdnnp.cpp compilation. To forward them to the LAMMPS build process n2p2
|
||||
# writes a file with cmake commands, e.g.
|
||||
#
|
||||
# target_compile_definitions(lammps PRIVATE -DN2P2_NO_SF_GROUPS)
|
||||
#
|
||||
# to "lib/lammps-extra.cmake" which is then included by ML-HDNNP.cmake.
|
||||
find_file(N2P2_CMAKE_EXTRA NAMES lammps-extra.cmake HINTS "${N2P2_DIR}/lib")
|
||||
|
||||
find_package_handle_standard_args(N2P2 DEFAULT_MSG
|
||||
N2P2_DIR
|
||||
N2P2_INCLUDE_DIR
|
||||
N2P2_LIBNNP
|
||||
N2P2_LIBNNPIF
|
||||
N2P2_CMAKE_EXTRA)
|
||||
|
||||
if(N2P2_FOUND)
|
||||
if (NOT TARGET N2P2::N2P2)
|
||||
# n2p2 core library "libnnp"
|
||||
add_library(N2P2::LIBNNP UNKNOWN IMPORTED)
|
||||
set_target_properties(N2P2::LIBNNP PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES ${N2P2_INCLUDE_DIR}
|
||||
IMPORTED_LOCATION ${N2P2_LIBNNP})
|
||||
# n2p2 interface library "libnnpif"
|
||||
add_library(N2P2::LIBNNPIF UNKNOWN IMPORTED)
|
||||
set_target_properties(N2P2::LIBNNPIF PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES ${N2P2_INCLUDE_DIR}
|
||||
IMPORTED_LOCATION ${N2P2_LIBNNPIF})
|
||||
# Put libnnp, libnnpif and include directory together.
|
||||
add_library(N2P2::N2P2 INTERFACE IMPORTED)
|
||||
set_property(TARGET N2P2::N2P2 PROPERTY
|
||||
INTERFACE_LINK_LIBRARIES N2P2::LIBNNPIF N2P2::LIBNNP)
|
||||
set(N2P2_CMAKE_EXTRAS ${N2P2_CMAKE_EXTRA})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
mark_as_advanced(
|
||||
N2P2_DIR
|
||||
N2P2_INCLUDE_DIR
|
||||
N2P2_LIBNNP
|
||||
N2P2_LIBNNPIF
|
||||
N2P2_CMAKE_EXTRA
|
||||
)
|
||||
@ -1,6 +1,6 @@
|
||||
message(STATUS "Downloading and building Google Test library")
|
||||
|
||||
if(CMAKE_BUILD_TYPE STREQUAL Debug)
|
||||
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||
set(GTEST_LIB_POSTFIX d)
|
||||
else()
|
||||
set(GTEST_LIB_POSTFIX)
|
||||
|
||||
3
cmake/Modules/GenerateOpenCLHeader.cmake
Normal file
3
cmake/Modules/GenerateOpenCLHeader.cmake
Normal file
@ -0,0 +1,3 @@
|
||||
# utility script to call WriteOpenCLHeader function
|
||||
include(${SOURCE_DIR}/Modules/OpenCLUtils.cmake)
|
||||
WriteOpenCLHeader(${VARNAME} ${HEADER_FILE} ${SOURCE_FILES})
|
||||
@ -67,7 +67,7 @@ endfunction()
|
||||
|
||||
macro(pkg_depends PKG1 PKG2)
|
||||
if(PKG_${PKG1} AND NOT (PKG_${PKG2} OR BUILD_${PKG2}))
|
||||
message(FATAL_ERROR "${PKG1} package needs LAMMPS to be build with ${PKG2}")
|
||||
message(FATAL_ERROR "The ${PKG1} package needs LAMMPS to be build with the ${PKG2} package")
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
@ -106,7 +106,7 @@ function(FetchPotentials pkgfolder potfolder)
|
||||
endfunction(FetchPotentials)
|
||||
|
||||
# set CMAKE_LINUX_DISTRO and CMAKE_DISTRO_VERSION on Linux
|
||||
if((CMAKE_SYSTEM_NAME STREQUAL Linux) AND (EXISTS /etc/os-release))
|
||||
if((CMAKE_SYSTEM_NAME STREQUAL "Linux") AND (EXISTS /etc/os-release))
|
||||
file(STRINGS /etc/os-release distro REGEX "^NAME=")
|
||||
string(REGEX REPLACE "NAME=\"?([^\"]*)\"?" "\\1" distro "${distro}")
|
||||
file(STRINGS /etc/os-release disversion REGEX "^VERSION_ID=")
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
message(STATUS "Downloading and building OpenCL loader library")
|
||||
set(OPENCL_LOADER_URL "${LAMMPS_THIRDPARTY_URL}/opencl-loader-2020.12.18.tar.gz" CACHE STRING "URL for OpenCL loader tarball")
|
||||
set(OPENCL_LOADER_MD5 "011cdcbd41030be94f3fced6d763a52a" CACHE STRING "MD5 checksum of OpenCL loader tarball")
|
||||
set(OPENCL_LOADER_URL "${LAMMPS_THIRDPARTY_URL}/opencl-loader-2021.06.30.tar.gz" CACHE STRING "URL for OpenCL loader tarball")
|
||||
set(OPENCL_LOADER_MD5 "f9e55dd550cfbf77f46507adf7cb8fd2" CACHE STRING "MD5 checksum of OpenCL loader tarball")
|
||||
mark_as_advanced(OPENCL_LOADER_URL)
|
||||
mark_as_advanced(OPENCL_LOADER_MD5)
|
||||
|
||||
|
||||
@ -1,10 +1,8 @@
|
||||
function(GenerateOpenCLHeader varname outfile files)
|
||||
message("Creating ${outfile}...")
|
||||
function(WriteOpenCLHeader varname outfile files)
|
||||
file(WRITE ${outfile} "const char * ${varname} = \n")
|
||||
math(EXPR ARG_END "${ARGC}-1")
|
||||
separate_arguments(files)
|
||||
|
||||
foreach(IDX RANGE 2 ${ARG_END})
|
||||
list(GET ARGV ${IDX} filename)
|
||||
foreach(filename ${files})
|
||||
file(READ ${filename} content)
|
||||
string(REGEX REPLACE "\\s*//[^\n]*\n" "\n" content "${content}")
|
||||
string(REGEX REPLACE "\\\\" "\\\\\\\\" content "${content}")
|
||||
@ -15,4 +13,16 @@ function(GenerateOpenCLHeader varname outfile files)
|
||||
endforeach()
|
||||
|
||||
file(APPEND ${outfile} ";\n")
|
||||
endfunction(WriteOpenCLHeader)
|
||||
|
||||
function(GenerateOpenCLHeader varname outfile files)
|
||||
list(REMOVE_AT ARGV 0 1)
|
||||
add_custom_command(OUTPUT ${outfile}
|
||||
COMMAND ${CMAKE_COMMAND} -D SOURCE_DIR=${CMAKE_CURRENT_SOURCE_DIR}
|
||||
-D VARNAME=${varname}
|
||||
-D HEADER_FILE=${outfile}
|
||||
-D SOURCE_FILES="${ARGV}"
|
||||
-P ${CMAKE_CURRENT_SOURCE_DIR}/Modules/GenerateOpenCLHeader.cmake
|
||||
DEPENDS ${ARGV}
|
||||
COMMENT "Generating ${outfile}...")
|
||||
endfunction(GenerateOpenCLHeader)
|
||||
|
||||
@ -1,13 +1,13 @@
|
||||
# Fix rigid/meso requires RIGID to be installed
|
||||
set(USER-SDPD_SOURCES_DIR ${LAMMPS_SOURCE_DIR}/USER-SDPD)
|
||||
set(DPD-SMOOTH_SOURCES_DIR ${LAMMPS_SOURCE_DIR}/DPD-SMOOTH)
|
||||
|
||||
get_property(hlist GLOBAL PROPERTY FIX)
|
||||
if(NOT PKG_RIGID)
|
||||
list(REMOVE_ITEM hlist ${USER-SDPD_SOURCES_DIR}/fix_rigid_meso.h)
|
||||
list(REMOVE_ITEM hlist ${DPD-SMOOTH_SOURCES_DIR}/fix_rigid_meso.h)
|
||||
get_target_property(LAMMPS_SOURCES lammps SOURCES)
|
||||
list(REMOVE_ITEM LAMMPS_SOURCES ${USER-SDPD_SOURCES_DIR}/fix_rigid_meso.cpp)
|
||||
list(REMOVE_ITEM LAMMPS_SOURCES ${DPD-SMOOTH_SOURCES_DIR}/fix_rigid_meso.cpp)
|
||||
set_property(TARGET lammps PROPERTY SOURCES ${LAMMPS_SOURCES})
|
||||
endif()
|
||||
set_property(GLOBAL PROPERTY FIX "${hlist}")
|
||||
|
||||
target_include_directories(lammps PRIVATE ${USER-SDPD_SOURCES_DIR})
|
||||
target_include_directories(lammps PRIVATE ${DPD-SMOOTH_SOURCES_DIR})
|
||||
@ -48,7 +48,7 @@ if(GPU_API STREQUAL "CUDA")
|
||||
|
||||
# ensure that no *cubin.h files exist from a compile in the lib/gpu folder
|
||||
file(GLOB GPU_LIB_OLD_CUBIN_HEADERS ${LAMMPS_LIB_SOURCE_DIR}/gpu/*_cubin.h)
|
||||
if (GPU_LIB_OLD_CUBIN_HEADERS)
|
||||
if(GPU_LIB_OLD_CUBIN_HEADERS)
|
||||
message(FATAL_ERROR "########################################################################\n"
|
||||
"Found file(s) generated by the make-based build system in lib/gpu\n"
|
||||
"Please run\n"
|
||||
@ -112,10 +112,10 @@ if(GPU_API STREQUAL "CUDA")
|
||||
endif()
|
||||
|
||||
cuda_compile_fatbin(GPU_GEN_OBJS ${GPU_LIB_CU} OPTIONS ${CUDA_REQUEST_PIC}
|
||||
-DUNIX -O3 --use_fast_math -Wno-deprecated-gpu-targets -DNV_KERNEL -DUCL_CUDADR ${GPU_CUDA_GENCODE} -D_${GPU_PREC_SETTING})
|
||||
-DUNIX -O3 --use_fast_math -Wno-deprecated-gpu-targets -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}
|
||||
-DUNIX -O3 --use_fast_math -Wno-deprecated-gpu-targets -DUCL_CUDADR ${GPU_CUDA_GENCODE} -D_${GPU_PREC_SETTING})
|
||||
-DUNIX -O3 --use_fast_math -Wno-deprecated-gpu-targets -DUCL_CUDADR ${GPU_CUDA_GENCODE} -D_${GPU_PREC_SETTING} -DLAMMPS_${LAMMPS_SIZES})
|
||||
|
||||
foreach(CU_OBJ ${GPU_GEN_OBJS})
|
||||
get_filename_component(CU_NAME ${CU_OBJ} NAME_WE)
|
||||
@ -145,9 +145,16 @@ if(GPU_API STREQUAL "CUDA")
|
||||
target_include_directories(nvc_get_devices PRIVATE ${CUDA_INCLUDE_DIRS})
|
||||
|
||||
elseif(GPU_API STREQUAL "OPENCL")
|
||||
option(USE_STATIC_OPENCL_LOADER "Download and include a static OpenCL ICD loader" ON)
|
||||
# the static OpenCL loader doesn't seem to work on macOS. use the system provided
|
||||
# version by default instead (for as long as it will be available)
|
||||
if("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin")
|
||||
set(_opencl_static_default OFF)
|
||||
else()
|
||||
set(_opencl_static_default ON)
|
||||
endif()
|
||||
option(USE_STATIC_OPENCL_LOADER "Download and include a static OpenCL ICD loader" ${_opencl_static_default})
|
||||
mark_as_advanced(USE_STATIC_OPENCL_LOADER)
|
||||
if (USE_STATIC_OPENCL_LOADER)
|
||||
if(USE_STATIC_OPENCL_LOADER)
|
||||
include(OpenCLLoader)
|
||||
else()
|
||||
find_package(OpenCL REQUIRED)
|
||||
@ -289,18 +296,18 @@ elseif(GPU_API STREQUAL "HIP")
|
||||
|
||||
if(HIP_COMPILER STREQUAL "clang")
|
||||
add_custom_command(OUTPUT ${CUBIN_FILE}
|
||||
VERBATIM COMMAND ${HIP_HIPCC_EXECUTABLE} --genco --offload-arch=${HIP_ARCH} -O3 -ffast-math -DUSE_HIP -D_${GPU_PREC_SETTING} -I${LAMMPS_LIB_SOURCE_DIR}/gpu -o ${CUBIN_FILE} ${CU_CPP_FILE}
|
||||
VERBATIM COMMAND ${HIP_HIPCC_EXECUTABLE} --genco --offload-arch=${HIP_ARCH} -O3 -ffast-math -DUSE_HIP -D_${GPU_PREC_SETTING} -DLAMMPS_${LAMMPS_SIZES} -I${LAMMPS_LIB_SOURCE_DIR}/gpu -o ${CUBIN_FILE} ${CU_CPP_FILE}
|
||||
DEPENDS ${CU_CPP_FILE}
|
||||
COMMENT "Generating ${CU_NAME}.cubin")
|
||||
else()
|
||||
add_custom_command(OUTPUT ${CUBIN_FILE}
|
||||
VERBATIM COMMAND ${HIP_HIPCC_EXECUTABLE} --genco -t="${HIP_ARCH}" -f=\"-O3 -ffast-math -DUSE_HIP -D_${GPU_PREC_SETTING} -I${LAMMPS_LIB_SOURCE_DIR}/gpu\" -o ${CUBIN_FILE} ${CU_CPP_FILE}
|
||||
VERBATIM COMMAND ${HIP_HIPCC_EXECUTABLE} --genco -t="${HIP_ARCH}" -f=\"-O3 -ffast-math -DUSE_HIP -D_${GPU_PREC_SETTING} -DLAMMPS_${LAMMPS_SIZES} -I${LAMMPS_LIB_SOURCE_DIR}/gpu\" -o ${CUBIN_FILE} ${CU_CPP_FILE}
|
||||
DEPENDS ${CU_CPP_FILE}
|
||||
COMMENT "Generating ${CU_NAME}.cubin")
|
||||
endif()
|
||||
elseif(HIP_PLATFORM STREQUAL "nvcc")
|
||||
add_custom_command(OUTPUT ${CUBIN_FILE}
|
||||
VERBATIM COMMAND ${HIP_HIPCC_EXECUTABLE} --fatbin --use_fast_math -DUSE_HIP -D_${GPU_PREC_SETTING} ${HIP_CUDA_GENCODE} -I${LAMMPS_LIB_SOURCE_DIR}/gpu -o ${CUBIN_FILE} ${CU_FILE}
|
||||
VERBATIM COMMAND ${HIP_HIPCC_EXECUTABLE} --fatbin --use_fast_math -DUSE_HIP -D_${GPU_PREC_SETTING} -DLAMMPS_${LAMMPS_SIZES} ${HIP_CUDA_GENCODE} -I${LAMMPS_LIB_SOURCE_DIR}/gpu -o ${CUBIN_FILE} ${CU_FILE}
|
||||
DEPENDS ${CU_FILE}
|
||||
COMMENT "Generating ${CU_NAME}.cubin")
|
||||
endif()
|
||||
|
||||
@ -5,7 +5,7 @@ endif()
|
||||
|
||||
target_compile_definitions(lammps PRIVATE -DLMP_USER_INTEL)
|
||||
|
||||
set(INTEL_ARCH "cpu" CACHE STRING "Architectures used by USER-INTEL (cpu or knl)")
|
||||
set(INTEL_ARCH "cpu" CACHE STRING "Architectures used by INTEL (cpu or knl)")
|
||||
set(INTEL_ARCH_VALUES cpu knl)
|
||||
set_property(CACHE INTEL_ARCH PROPERTY STRINGS ${INTEL_ARCH_VALUES})
|
||||
validate_option(INTEL_ARCH INTEL_ARCH_VALUES)
|
||||
@ -40,10 +40,10 @@ endif()
|
||||
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
|
||||
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 16)
|
||||
message(FATAL_ERROR "USER-INTEL needs at least a 2016 Intel compiler, found ${CMAKE_CXX_COMPILER_VERSION}")
|
||||
message(FATAL_ERROR "INTEL needs at least a 2016 Intel compiler, found ${CMAKE_CXX_COMPILER_VERSION}")
|
||||
endif()
|
||||
else()
|
||||
message(WARNING "USER-INTEL gives best performance with Intel compilers")
|
||||
message(WARNING "INTEL gives best performance with Intel compilers")
|
||||
endif()
|
||||
|
||||
find_package(TBB_MALLOC QUIET)
|
||||
@ -52,7 +52,7 @@ if(TBB_MALLOC_FOUND)
|
||||
else()
|
||||
target_compile_definitions(lammps PRIVATE -DLMP_INTEL_NO_TBB)
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
|
||||
message(WARNING "USER-INTEL with Intel compilers should use TBB malloc libraries")
|
||||
message(WARNING "INTEL with Intel compilers should use TBB malloc libraries")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@ -65,12 +65,12 @@ else()
|
||||
endif()
|
||||
|
||||
if((NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Windows") AND (NOT ${LAMMPS_MEMALIGN} STREQUAL "64") AND (NOT ${LAMMPS_MEMALIGN} STREQUAL "128") AND (NOT ${LAMMPS_MEMALIGN} STREQUAL "256"))
|
||||
message(FATAL_ERROR "USER-INTEL only supports memory alignment of 64, 128 or 256 on this platform")
|
||||
message(FATAL_ERROR "INTEL only supports memory alignment of 64, 128 or 256 on this platform")
|
||||
endif()
|
||||
|
||||
if(INTEL_ARCH STREQUAL "KNL")
|
||||
if(NOT CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
|
||||
message(FATAL_ERROR "Must use Intel compiler with USER-INTEL for KNL architecture")
|
||||
message(FATAL_ERROR "Must use Intel compiler with INTEL for KNL architecture")
|
||||
endif()
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -xHost -qopenmp -qoffload")
|
||||
set(MIC_OPTIONS "-qoffload-option,mic,compiler,\"-fp-model fast=2 -mGLOB_default_function_attrs=\\\"gather_scatter_loop_unroll=4\\\"\"")
|
||||
@ -79,9 +79,11 @@ if(INTEL_ARCH STREQUAL "KNL")
|
||||
else()
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
|
||||
include(CheckCXXCompilerFlag)
|
||||
foreach(_FLAG -O2 -fp-model fast=2 -no-prec-div -qoverride-limits -qopt-zmm-usage=high -qno-offload -fno-alias -ansi-alias -restrict)
|
||||
check_cxx_compiler_flag("${_FLAG}" COMPILER_SUPPORTS${_FLAG})
|
||||
if(COMPILER_SUPPORTS${_FLAG})
|
||||
foreach(_FLAG -O2 "-fp-model fast=2" -no-prec-div -qoverride-limits -qopt-zmm-usage=high -qno-offload -fno-alias -ansi-alias -restrict)
|
||||
string(REGEX REPLACE "[ =\"]" "" _FLAGX ${_FLAG})
|
||||
check_cxx_compiler_flag("${_FLAG}" COMPILER_SUPPORTS${_FLAGX})
|
||||
if(COMPILER_SUPPORTS${_FLAGX})
|
||||
separate_arguments(_FLAG UNIX_COMMAND "${_FLAG}")
|
||||
target_compile_options(lammps PRIVATE ${_FLAG})
|
||||
endif()
|
||||
endforeach()
|
||||
@ -89,26 +91,26 @@ else()
|
||||
endif()
|
||||
|
||||
# collect sources
|
||||
set(USER-INTEL_SOURCES_DIR ${LAMMPS_SOURCE_DIR}/USER-INTEL)
|
||||
set(USER-INTEL_SOURCES ${USER-INTEL_SOURCES_DIR}/fix_intel.cpp
|
||||
${USER-INTEL_SOURCES_DIR}/fix_nh_intel.cpp
|
||||
${USER-INTEL_SOURCES_DIR}/intel_buffers.cpp
|
||||
${USER-INTEL_SOURCES_DIR}/nbin_intel.cpp
|
||||
${USER-INTEL_SOURCES_DIR}/npair_intel.cpp)
|
||||
set(INTEL_SOURCES_DIR ${LAMMPS_SOURCE_DIR}/INTEL)
|
||||
set(INTEL_SOURCES ${INTEL_SOURCES_DIR}/fix_intel.cpp
|
||||
${INTEL_SOURCES_DIR}/fix_nh_intel.cpp
|
||||
${INTEL_SOURCES_DIR}/intel_buffers.cpp
|
||||
${INTEL_SOURCES_DIR}/nbin_intel.cpp
|
||||
${INTEL_SOURCES_DIR}/npair_intel.cpp)
|
||||
|
||||
set_property(GLOBAL PROPERTY "USER-INTEL_SOURCES" "${USER-INTEL_SOURCES}")
|
||||
set_property(GLOBAL PROPERTY "INTEL_SOURCES" "${INTEL_SOURCES}")
|
||||
|
||||
# detect styles which have a USER-INTEL version
|
||||
RegisterStylesExt(${USER-INTEL_SOURCES_DIR} intel USER-INTEL_SOURCES)
|
||||
RegisterNBinStyle(${USER-INTEL_SOURCES_DIR}/nbin_intel.h)
|
||||
RegisterNPairStyle(${USER-INTEL_SOURCES_DIR}/npair_intel.h)
|
||||
RegisterFixStyle(${USER-INTEL_SOURCES_DIR}/fix_intel.h)
|
||||
# detect styles which have a INTEL version
|
||||
RegisterStylesExt(${INTEL_SOURCES_DIR} intel INTEL_SOURCES)
|
||||
RegisterNBinStyle(${INTEL_SOURCES_DIR}/nbin_intel.h)
|
||||
RegisterNPairStyle(${INTEL_SOURCES_DIR}/npair_intel.h)
|
||||
RegisterFixStyle(${INTEL_SOURCES_DIR}/fix_intel.h)
|
||||
|
||||
get_property(USER-INTEL_SOURCES GLOBAL PROPERTY USER-INTEL_SOURCES)
|
||||
get_property(INTEL_SOURCES GLOBAL PROPERTY INTEL_SOURCES)
|
||||
if(PKG_KSPACE)
|
||||
list(APPEND USER-INTEL_SOURCES ${USER-INTEL_SOURCES_DIR}/verlet_lrt_intel.cpp)
|
||||
RegisterIntegrateStyle(${USER-INTEL_SOURCES_DIR}/verlet_lrt_intel.h)
|
||||
list(APPEND INTEL_SOURCES ${INTEL_SOURCES_DIR}/verlet_lrt_intel.cpp)
|
||||
RegisterIntegrateStyle(${INTEL_SOURCES_DIR}/verlet_lrt_intel.h)
|
||||
endif()
|
||||
|
||||
target_sources(lammps PRIVATE ${USER-INTEL_SOURCES})
|
||||
target_include_directories(lammps PRIVATE ${USER-INTEL_SOURCES_DIR})
|
||||
target_sources(lammps PRIVATE ${INTEL_SOURCES})
|
||||
target_include_directories(lammps PRIVATE ${INTEL_SOURCES_DIR})
|
||||
@ -37,8 +37,8 @@ if(DOWNLOAD_KOKKOS)
|
||||
list(APPEND KOKKOS_LIB_BUILD_ARGS "-DCMAKE_CXX_EXTENSIONS=${CMAKE_CXX_EXTENSIONS}")
|
||||
list(APPEND KOKKOS_LIB_BUILD_ARGS "-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}")
|
||||
include(ExternalProject)
|
||||
set(KOKKOS_URL "https://github.com/kokkos/kokkos/archive/3.3.01.tar.gz" CACHE STRING "URL for KOKKOS tarball")
|
||||
set(KOKKOS_MD5 "08201d1c7cf5bc458ce0f5b44a629d5a" CACHE STRING "MD5 checksum of KOKKOS tarball")
|
||||
set(KOKKOS_URL "https://github.com/kokkos/kokkos/archive/3.4.01.tar.gz" CACHE STRING "URL for KOKKOS tarball")
|
||||
set(KOKKOS_MD5 "4c84698917c93a18985b311bb6caf84f" CACHE STRING "MD5 checksum of KOKKOS tarball")
|
||||
mark_as_advanced(KOKKOS_URL)
|
||||
mark_as_advanced(KOKKOS_MD5)
|
||||
ExternalProject_Add(kokkos_build
|
||||
@ -58,7 +58,7 @@ if(DOWNLOAD_KOKKOS)
|
||||
target_link_libraries(lmp PRIVATE LAMMPS::KOKKOS)
|
||||
add_dependencies(LAMMPS::KOKKOS kokkos_build)
|
||||
elseif(EXTERNAL_KOKKOS)
|
||||
find_package(Kokkos 3.3.01 REQUIRED CONFIG)
|
||||
find_package(Kokkos 3.4.01 REQUIRED CONFIG)
|
||||
target_link_libraries(lammps PRIVATE Kokkos::kokkos)
|
||||
target_link_libraries(lmp PRIVATE Kokkos::kokkos)
|
||||
else()
|
||||
@ -99,7 +99,7 @@ if(PKG_KSPACE)
|
||||
${KOKKOS_PKG_SOURCES_DIR}/gridcomm_kokkos.cpp
|
||||
${KOKKOS_PKG_SOURCES_DIR}/remap_kokkos.cpp)
|
||||
if(Kokkos_ENABLE_CUDA)
|
||||
if(NOT ${FFT} STREQUAL "KISS")
|
||||
if(NOT (FFT STREQUAL "KISS"))
|
||||
target_compile_definitions(lammps PRIVATE -DFFT_CUFFT)
|
||||
target_link_libraries(lammps PRIVATE cufft)
|
||||
endif()
|
||||
@ -116,7 +116,7 @@ RegisterNBinStyle(${KOKKOS_PKG_SOURCES_DIR}/nbin_kokkos.h)
|
||||
RegisterNPairStyle(${KOKKOS_PKG_SOURCES_DIR}/npair_kokkos.h)
|
||||
RegisterNPairStyle(${KOKKOS_PKG_SOURCES_DIR}/npair_halffull_kokkos.h)
|
||||
|
||||
if(PKG_USER-DPD)
|
||||
if(PKG_DPD-REACT)
|
||||
get_property(KOKKOS_PKG_SOURCES GLOBAL PROPERTY KOKKOS_PKG_SOURCES)
|
||||
list(APPEND KOKKOS_PKG_SOURCES ${KOKKOS_PKG_SOURCES_DIR}/npair_ssa_kokkos.cpp)
|
||||
RegisterNPairStyle(${KOKKOS_PKG_SOURCES_DIR}/npair_ssa_kokkos.h)
|
||||
|
||||
118
cmake/Modules/Packages/MDI.cmake
Normal file
118
cmake/Modules/Packages/MDI.cmake
Normal file
@ -0,0 +1,118 @@
|
||||
find_package(mdi QUIET)
|
||||
if(${mdi_FOUND})
|
||||
set(DOWNLOAD_MDI_DEFAULT OFF)
|
||||
else()
|
||||
set(DOWNLOAD_MDI_DEFAULT ON)
|
||||
endif()
|
||||
option(DOWNLOAD_MDI "Download and compile the MDI library instead of using an already installed one" ${DOWNLOAD_MDI_DEFAULT})
|
||||
|
||||
if(DOWNLOAD_MDI)
|
||||
message(STATUS "MDI download requested - we will build our own")
|
||||
set(MDI_URL "https://github.com/MolSSI-MDI/MDI_Library/archive/v1.2.9.tar.gz" CACHE STRING "URL for MDI tarball")
|
||||
set(MDI_MD5 "ddfa46d6ee15b4e59cfd527ec7212184" CACHE STRING "MD5 checksum for MDI tarball")
|
||||
mark_as_advanced(MDI_URL)
|
||||
mark_as_advanced(MDI_MD5)
|
||||
enable_language(C)
|
||||
|
||||
# only ON/OFF are allowed for "mpi" flag when building MDI library
|
||||
# so translate boolean value of BUILD_MPI
|
||||
# always disable MPI when cross-compiling to Windows.
|
||||
if((BUILD_MPI) AND NOT((CMAKE_SYSTEM_NAME STREQUAL "Windows") AND CMAKE_CROSSCOMPILING))
|
||||
set(MDI_USE_MPI ON)
|
||||
else()
|
||||
set(MDI_USE_MPI OFF)
|
||||
endif()
|
||||
|
||||
# detect if we have python development support and thus can enable python plugins
|
||||
set(MDI_USE_PYTHON_PLUGINS OFF)
|
||||
if(CMAKE_VERSION VERSION_LESS 3.12)
|
||||
find_package(PythonLibs QUIET) # Deprecated since version 3.12
|
||||
if(PYTHONLIBS_FOUND)
|
||||
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()
|
||||
|
||||
# download/ build MDI library
|
||||
# always build static library with -fpic
|
||||
# support cross-compilation and ninja-build
|
||||
include(ExternalProject)
|
||||
ExternalProject_Add(mdi_build
|
||||
URL ${MDI_URL}
|
||||
URL_MD5 ${MDI_MD5}
|
||||
CMAKE_ARGS ${CMAKE_REQUEST_PIC}
|
||||
-DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>
|
||||
-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
|
||||
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
|
||||
-DCMAKE_MAKE_PROGRAM=${CMAKE_MAKE_PROGRAM}
|
||||
-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}
|
||||
-Dlanguage=C
|
||||
-Dlibtype=STATIC
|
||||
-Dmpi=${MDI_USE_MPI}
|
||||
-Dpython_plugins=${MDI_USE_PYTHON_PLUGINS}
|
||||
UPDATE_COMMAND ""
|
||||
INSTALL_COMMAND ""
|
||||
BUILD_BYPRODUCTS "<BINARY_DIR>/MDI_Library/libmdi.a"
|
||||
)
|
||||
|
||||
# where is the compiled library?
|
||||
ExternalProject_get_property(mdi_build BINARY_DIR)
|
||||
set(MDI_BINARY_DIR "${BINARY_DIR}/MDI_Library")
|
||||
# workaround for older CMake versions
|
||||
file(MAKE_DIRECTORY ${MDI_BINARY_DIR})
|
||||
|
||||
# create imported target for the MDI library
|
||||
add_library(LAMMPS::MDI UNKNOWN IMPORTED)
|
||||
add_dependencies(LAMMPS::MDI mdi_build)
|
||||
set_target_properties(LAMMPS::MDI PROPERTIES
|
||||
IMPORTED_LOCATION "${MDI_BINARY_DIR}/libmdi.a"
|
||||
INTERFACE_INCLUDE_DIRECTORIES ${MDI_BINARY_DIR}
|
||||
)
|
||||
|
||||
set(MDI_DEP_LIBS "")
|
||||
# if compiling with python plugins we need
|
||||
# to add python libraries as dependency.
|
||||
if(MDI_USE_PYTHON_PLUGINS)
|
||||
if(CMAKE_VERSION VERSION_LESS 3.12)
|
||||
list(APPEND MDI_DEP_LIBS ${PYTHON_LIBRARIES})
|
||||
else()
|
||||
list(APPEND MDI_DEP_LIBS Python::Python)
|
||||
endif()
|
||||
|
||||
endif()
|
||||
# need to add support for dlopen/dlsym, except when compiling for Windows.
|
||||
if(NOT (CMAKE_SYSTEM_NAME STREQUAL "Windows"))
|
||||
list(APPEND MDI_DEP_LIBS "${CMAKE_DL_LIBS}")
|
||||
endif()
|
||||
if(MDI_DEP_LIBS)
|
||||
set_target_properties(LAMMPS::MDI PROPERTIES
|
||||
IMPORTED_LINK_INTERFACE_LIBRARIES "${MDI_DEP_LIBS}")
|
||||
endif()
|
||||
|
||||
target_link_libraries(lammps PRIVATE LAMMPS::MDI)
|
||||
target_link_libraries(lmp PRIVATE LAMMPS::MDI)
|
||||
|
||||
else()
|
||||
|
||||
find_package(mdi)
|
||||
if(NOT mdi_FOUND)
|
||||
message(FATAL_ERROR "MDI library not found. Help CMake to find it "
|
||||
"by setting mdi_LIBRARY and mdi_INCLUDE_DIR, or set DOWNLOAD_MDI=ON "
|
||||
"to download and compile it")
|
||||
endif()
|
||||
|
||||
# Link the lammps library against MDI
|
||||
target_include_directories(lammps PRIVATE ${mdi_INCLUDE_DIR})
|
||||
target_link_libraries(lammps PRIVATE ${mdi_LIBRARY})
|
||||
|
||||
# Link the lammps executable against MDI
|
||||
target_include_directories(lmp PRIVATE ${mdi_INCLUDE_DIR})
|
||||
target_link_libraries(lmp PRIVATE ${mdi_LIBRARY})
|
||||
endif()
|
||||
|
||||
target_compile_definitions(lammps PRIVATE -DLMP_USER_MDI)
|
||||
target_compile_definitions(lmp PRIVATE -DLMP_USER_MDI)
|
||||
@ -1,4 +1,4 @@
|
||||
if(LAMMPS_SIZES STREQUAL BIGBIG)
|
||||
if(LAMMPS_SIZES STREQUAL "BIGBIG")
|
||||
message(FATAL_ERROR "The MESSAGE Package is not compatible with -DLAMMPS_BIGBIG")
|
||||
endif()
|
||||
option(MESSAGE_ZMQ "Use ZeroMQ in MESSAGE package" OFF)
|
||||
|
||||
127
cmake/Modules/Packages/ML-HDNNP.cmake
Normal file
127
cmake/Modules/Packages/ML-HDNNP.cmake
Normal file
@ -0,0 +1,127 @@
|
||||
find_package(N2P2 QUIET)
|
||||
if(N2P2_FOUND)
|
||||
set(DOWNLOAD_N2P2_DEFAULT OFF)
|
||||
else()
|
||||
set(DOWNLOAD_N2P2_DEFAULT ON)
|
||||
endif()
|
||||
option(DOWNLOAD_N2P2 "Download n2p2 library instead of using an already installed one)" ${DOWNLOAD_N2P2_DEFAULT})
|
||||
if(DOWNLOAD_N2P2)
|
||||
set(N2P2_URL "https://github.com/CompPhysVienna/n2p2/archive/v2.1.4.tar.gz" CACHE STRING "URL for n2p2 tarball")
|
||||
set(N2P2_MD5 "9595b066636cd6b90b0fef93398297a5" CACHE STRING "MD5 checksum of N2P2 tarball")
|
||||
mark_as_advanced(N2P2_URL)
|
||||
mark_as_advanced(N2P2_MD5)
|
||||
|
||||
# adjust settings from detected compiler to compiler platform in n2p2 library
|
||||
# set compiler specific flag to turn on C++11 syntax (required on macOS and CentOS 7)
|
||||
if((CMAKE_CXX_COMPILER_ID STREQUAL "Clang") OR (CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang"))
|
||||
set(N2P2_COMP llvm)
|
||||
set(N2P2_CXX_STD "-std=c++11")
|
||||
elseif((CMAKE_CXX_COMPILER_ID STREQUAL "Intel") OR (CMAKE_CXX_COMPILER_ID STREQUAL "IntelLLVM"))
|
||||
set(N2P2_COMP intel)
|
||||
set(N2P2_CXX_STD "-std=c++11")
|
||||
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||
set(N2P2_COMP gnu)
|
||||
set(N2P2_CXX_STD "-std=gnu++11")
|
||||
elseif((CMAKE_CXX_COMPILER_ID STREQUAL "PGI") OR (CMAKE_CXX_COMPILER_ID STREQUAL "NVHPC"))
|
||||
set(N2P2_COMP gnu)
|
||||
set(N2P2_CXX_STD "--c++11")
|
||||
else() # default
|
||||
set(N2P2_COMP "")
|
||||
endif()
|
||||
|
||||
# pass on archive creator command. prefer compiler specific version, if set.
|
||||
# important when using cross compiler.
|
||||
if(CMAKE_CXX_COMPILER_AR)
|
||||
set(N2P2_AR ${CMAKE_CXX_COMPILER_AR})
|
||||
else()
|
||||
set(N2P2_AR ${CMAKE_AR})
|
||||
endif()
|
||||
|
||||
# adjust compilation of n2p2 library to whether MPI is requested in LAMMPS or not
|
||||
# need special care for compiling for MPICH2 with Linux-to-Windows cross compiler.
|
||||
if(NOT BUILD_MPI)
|
||||
set(N2P2_PROJECT_OPTIONS "-DN2P2_NO_MPI")
|
||||
else()
|
||||
# get path to MPI include directory when cross-compiling to windows
|
||||
if((CMAKE_SYSTEM_NAME STREQUAL Windows) AND CMAKE_CROSSCOMPILING)
|
||||
get_target_property(N2P2_MPI_INCLUDE MPI::MPI_CXX INTERFACE_INCLUDE_DIRECTORIES)
|
||||
set(N2P2_PROJECT_OPTIONS "-I ${N2P2_MPI_INCLUDE} -DMPICH_SKIP_MPICXX=1")
|
||||
set(MPI_CXX_COMPILER ${CMAKE_CXX_COMPILER})
|
||||
endif()
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
|
||||
get_target_property(N2P2_MPI_INCLUDE MPI::MPI_CXX INTERFACE_INCLUDE_DIRECTORIES)
|
||||
set(N2P2_PROJECT_OPTIONS "-I ${N2P2_MPI_INCLUDE} -DMPICH_SKIP_MPICXX=1")
|
||||
set(MPI_CXX_COMPILER ${CMAKE_CXX_COMPILER})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# prefer GNU make, if available. N2P2 lib seems to need it.
|
||||
find_program(N2P2_MAKE NAMES gmake make)
|
||||
|
||||
# override compiler (optimization) flags in n2p2 library to flags used for LAMMPS
|
||||
# specifically -march=native can result in problems when compiling on HPC clusters or with a cross compiler
|
||||
# this convoluted way gets correct quoting/escaping when configuring the external project
|
||||
string(TOUPPER "${CMAKE_BUILD_TYPE}" BTYPE)
|
||||
set(N2P2_BUILD_FLAGS "${CMAKE_SHARED_LIBRARY_CXX_FLAGS} ${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_${BTYPE}} ${N2P2_CXX_STD}")
|
||||
set(N2P2_BUILD_OPTIONS INTERFACES=LAMMPS COMP=${N2P2_COMP} "PROJECT_OPTIONS=${N2P2_PROJECT_OPTIONS}" "PROJECT_DEBUG="
|
||||
"PROJECT_CC=${CMAKE_CXX_COMPILER}" "PROJECT_MPICC=${MPI_CXX_COMPILER}" "PROJECT_CFLAGS=${N2P2_BUILD_FLAGS}"
|
||||
"PROJECT_AR=${N2P2_AR}")
|
||||
# echo final flag for debugging
|
||||
message(STATUS "N2P2 BUILD OPTIONS: ${N2P2_BUILD_OPTIONS}")
|
||||
|
||||
# download compile n2p2 library. much patch MPI calls in LAMMPS interface to accommodate MPI-2 (e.g. for cross-compiling)
|
||||
include(ExternalProject)
|
||||
ExternalProject_Add(n2p2_build
|
||||
URL ${N2P2_URL}
|
||||
URL_MD5 ${N2P2_MD5}
|
||||
UPDATE_COMMAND ""
|
||||
CONFIGURE_COMMAND ""
|
||||
PATCH_COMMAND sed -i -e "s/\\(MPI_\\(P\\|Unp\\)ack(\\)/\\1(void *) /" src/libnnpif/LAMMPS/InterfaceLammps.cpp
|
||||
BUILD_COMMAND ${N2P2_MAKE} -f makefile libnnpif ${N2P2_BUILD_OPTIONS}
|
||||
BUILD_ALWAYS YES
|
||||
INSTALL_COMMAND ""
|
||||
BUILD_IN_SOURCE 1
|
||||
LOG_BUILD ON
|
||||
SOURCE_SUBDIR src/
|
||||
BUILD_BYPRODUCTS <SOURCE_DIR>/lib/libnnp.a <SOURCE_DIR>/lib/libnnpif.a
|
||||
)
|
||||
|
||||
# create imported target LAMMPS::N2P2 from two libraries nnp and nnpif
|
||||
ExternalProject_get_property(n2p2_build SOURCE_DIR)
|
||||
# n2p2 core library "libnnp"
|
||||
add_library(LAMMPS::N2P2::LIBNNP UNKNOWN IMPORTED)
|
||||
set_target_properties(LAMMPS::N2P2::LIBNNP PROPERTIES
|
||||
IMPORTED_LOCATION "${SOURCE_DIR}/lib/libnnp.a"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${SOURCE_DIR}/include")
|
||||
# n2p2 interface library "libnnpif"
|
||||
add_library(LAMMPS::N2P2::LIBNNPIF UNKNOWN IMPORTED)
|
||||
set_target_properties(LAMMPS::N2P2::LIBNNPIF PROPERTIES
|
||||
IMPORTED_LOCATION "${SOURCE_DIR}/lib/libnnpif.a"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${SOURCE_DIR}/include")
|
||||
# nnpif library has MPI calls if MPI is enabled, so we must link with MPI libs
|
||||
if(BUILD_MPI)
|
||||
set_target_properties(LAMMPS::N2P2::LIBNNPIF PROPERTIES
|
||||
INTERFACE_LINK_LIBRARIES MPI::MPI_CXX)
|
||||
if((CMAKE_SYSTEM_NAME STREQUAL Windows) AND CMAKE_CROSSCOMPILING)
|
||||
add_dependencies(LAMMPS::N2P2::LIBNNPIF MPI::MPI_CXX)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# final step to define imported target
|
||||
add_library(LAMMPS::N2P2 INTERFACE IMPORTED)
|
||||
set_property(TARGET LAMMPS::N2P2 PROPERTY
|
||||
INTERFACE_LINK_LIBRARIES LAMMPS::N2P2::LIBNNPIF LAMMPS::N2P2::LIBNNP)
|
||||
target_link_libraries(lammps PRIVATE LAMMPS::N2P2)
|
||||
|
||||
add_dependencies(LAMMPS::N2P2 n2p2_build)
|
||||
# work around issues with older CMake versions
|
||||
file(MAKE_DIRECTORY "${SOURCE_DIR}/include")
|
||||
file(MAKE_DIRECTORY "${SOURCE_DIR}/lib")
|
||||
else()
|
||||
find_package(N2P2)
|
||||
if(NOT N2P2_FOUND)
|
||||
message(FATAL_ERROR "n2p2 not found, help CMake to find it by setting N2P2_DIR, or set DOWNLOAD_N2P2=ON to download it")
|
||||
endif()
|
||||
target_link_libraries(lammps PRIVATE N2P2::N2P2)
|
||||
include(${N2P2_CMAKE_EXTRAS})
|
||||
endif()
|
||||
@ -1,4 +1,4 @@
|
||||
# if PYTHON package is included we may also include Python support in MLIAP
|
||||
# if PYTHON package is included we may also include Python support in ML-IAP
|
||||
set(MLIAP_ENABLE_PYTHON_DEFAULT OFF)
|
||||
if(PKG_PYTHON)
|
||||
find_package(Cythonize QUIET)
|
||||
@ -7,25 +7,25 @@ if(PKG_PYTHON)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
option(MLIAP_ENABLE_PYTHON "Build MLIAP package with Python support" ${MLIAP_ENABLE_PYTHON_DEFAULT})
|
||||
option(MLIAP_ENABLE_PYTHON "Build ML-IAP package with Python support" ${MLIAP_ENABLE_PYTHON_DEFAULT})
|
||||
|
||||
if(MLIAP_ENABLE_PYTHON)
|
||||
find_package(Cythonize REQUIRED)
|
||||
if(NOT PKG_PYTHON)
|
||||
message(FATAL_ERROR "Must enable PYTHON package for including Python support in MLIAP")
|
||||
message(FATAL_ERROR "Must enable PYTHON package for including Python support in ML-IAP")
|
||||
endif()
|
||||
if(CMAKE_VERSION VERSION_LESS 3.12)
|
||||
if(PYTHONLIBS_VERSION_STRING VERSION_LESS 3.6)
|
||||
message(FATAL_ERROR "Python support in MLIAP 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 MLIAP requires Python 3.6 or later")
|
||||
message(FATAL_ERROR "Python support in ML-IAP requires Python 3.6 or later")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(MLIAP_BINARY_DIR ${CMAKE_BINARY_DIR}/cython)
|
||||
set(MLIAP_CYTHON_SRC ${LAMMPS_SOURCE_DIR}/MLIAP/mliap_model_python_couple.pyx)
|
||||
set(MLIAP_CYTHON_SRC ${LAMMPS_SOURCE_DIR}/ML-IAP/mliap_model_python_couple.pyx)
|
||||
get_filename_component(MLIAP_CYTHON_BASE ${MLIAP_CYTHON_SRC} NAME_WE)
|
||||
file(MAKE_DIRECTORY ${MLIAP_BINARY_DIR})
|
||||
add_custom_command(OUTPUT ${MLIAP_BINARY_DIR}/${MLIAP_CYTHON_BASE}.cpp ${MLIAP_BINARY_DIR}/${MLIAP_CYTHON_BASE}.h
|
||||
@ -14,13 +14,12 @@ execute_process(
|
||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
||||
)
|
||||
|
||||
|
||||
file(GLOB PACE_EVALUATOR_INCLUDE_DIR ${CMAKE_BINARY_DIR}/lammps-user-pace-*/USER-PACE)
|
||||
file(GLOB PACE_EVALUATOR_SOURCES ${CMAKE_BINARY_DIR}/lammps-user-pace-*/USER-PACE/*.cpp)
|
||||
list(FILTER PACE_EVALUATOR_SOURCES EXCLUDE REGEX pair_pace.cpp)
|
||||
|
||||
add_library(pace STATIC ${PACE_EVALUATOR_SOURCES})
|
||||
set_target_properties(pace PROPERTIES OUTPUT_NAME pace${LAMMPS_MACHINE})
|
||||
set_target_properties(pace PROPERTIES CXX_EXTENSIONS ON OUTPUT_NAME lammps_pace${LAMMPS_MACHINE})
|
||||
target_include_directories(pace PUBLIC ${PACE_EVALUATOR_INCLUDE_DIR})
|
||||
target_link_libraries(lammps PRIVATE pace)
|
||||
|
||||
@ -1,5 +1,7 @@
|
||||
set(MOLFILE_INCLUDE_DIR "${LAMMPS_LIB_SOURCE_DIR}/molfile" CACHE STRING "Path to VMD molfile plugin headers")
|
||||
set(MOLFILE_INCLUDE_DIRS "${MOLFILE_INCLUDE_DIR}")
|
||||
add_library(molfile INTERFACE)
|
||||
target_include_directories(molfile INTERFACE ${MOLFILE_INCLUDE_DIRS})
|
||||
target_include_directories(molfile INTERFACE ${MOLFILE_INCLUDE_DIR})
|
||||
if(NOT (CMAKE_SYSTEM_NAME STREQUAL "Windows"))
|
||||
target_link_libraries(molfile INTERFACE ${CMAKE_DL_LIBS})
|
||||
endif()
|
||||
target_link_libraries(lammps PRIVATE molfile)
|
||||
@ -1,4 +1,4 @@
|
||||
# USER-NETCDF can use NetCDF, Parallel NetCDF (PNetCDF), or both. At least one necessary.
|
||||
# NETCDF can use NetCDF, Parallel NetCDF (PNetCDF), or both. At least one necessary.
|
||||
# NetCDF library enables dump style "netcdf", while PNetCDF enables dump style "netcdf/mpiio"
|
||||
|
||||
# may use NetCDF or PNetCDF with MPI, but must have NetCDF without
|
||||
40
cmake/Modules/Packages/OPENMP.cmake
Normal file
40
cmake/Modules/Packages/OPENMP.cmake
Normal file
@ -0,0 +1,40 @@
|
||||
set(OPENMP_SOURCES_DIR ${LAMMPS_SOURCE_DIR}/OPENMP)
|
||||
set(OPENMP_SOURCES ${OPENMP_SOURCES_DIR}/thr_data.cpp
|
||||
${OPENMP_SOURCES_DIR}/thr_omp.cpp
|
||||
${OPENMP_SOURCES_DIR}/fix_omp.cpp
|
||||
${OPENMP_SOURCES_DIR}/fix_nh_omp.cpp
|
||||
${OPENMP_SOURCES_DIR}/fix_nh_sphere_omp.cpp
|
||||
${OPENMP_SOURCES_DIR}/domain_omp.cpp)
|
||||
target_compile_definitions(lammps PRIVATE -DLMP_USER_OMP)
|
||||
set_property(GLOBAL PROPERTY "OMP_SOURCES" "${OPENMP_SOURCES}")
|
||||
|
||||
# detects styles which have OPENMP version
|
||||
RegisterStylesExt(${OPENMP_SOURCES_DIR} omp OMP_SOURCES)
|
||||
RegisterFixStyle(${OPENMP_SOURCES_DIR}/fix_omp.h)
|
||||
|
||||
get_property(OPENMP_SOURCES GLOBAL PROPERTY OMP_SOURCES)
|
||||
|
||||
# manually add package dependent source files from OPENMP that do not provide styles
|
||||
|
||||
if(PKG_ASPHERE)
|
||||
list(APPEND OPENMP_SOURCES ${OPENMP_SOURCES_DIR}/fix_nh_asphere_omp.cpp)
|
||||
endif()
|
||||
|
||||
if(PKG_RIGID)
|
||||
list(APPEND OPENMP_SOURCES ${OPENMP_SOURCES_DIR}/fix_rigid_nh_omp.cpp)
|
||||
endif()
|
||||
|
||||
if(PKG_REAXFF)
|
||||
list(APPEND OPENMP_SOURCES ${OPENMP_SOURCES_DIR}/reaxc_bond_orders_omp.cpp
|
||||
${OPENMP_SOURCES_DIR}/reaxc_hydrogen_bonds_omp.cpp
|
||||
${OPENMP_SOURCES_DIR}/reaxc_nonbonded_omp.cpp
|
||||
${OPENMP_SOURCES_DIR}/reaxc_bonds_omp.cpp
|
||||
${OPENMP_SOURCES_DIR}/reaxc_init_md_omp.cpp
|
||||
${OPENMP_SOURCES_DIR}/reaxc_torsion_angles_omp.cpp
|
||||
${OPENMP_SOURCES_DIR}/reaxc_forces_omp.cpp
|
||||
${OPENMP_SOURCES_DIR}/reaxc_multi_body_omp.cpp
|
||||
${OPENMP_SOURCES_DIR}/reaxc_valence_angles_omp.cpp)
|
||||
endif()
|
||||
|
||||
target_sources(lammps PRIVATE ${OPENMP_SOURCES})
|
||||
target_include_directories(lammps PRIVATE ${OPENMP_SOURCES_DIR})
|
||||
@ -72,6 +72,7 @@ if(DOWNLOAD_PLUMED)
|
||||
${PLUMED_CONFIG_OMP}
|
||||
CXX=${PLUMED_CONFIG_CXX}
|
||||
CC=${PLUMED_CONFIG_CC}
|
||||
PATCH_COMMAND sed -i "/^#include <algorithm>/a #include <limits>" <SOURCE_DIR>/src/lepton/Operation.h
|
||||
BUILD_BYPRODUCTS ${PLUMED_BUILD_BYPRODUCTS}
|
||||
)
|
||||
ExternalProject_get_property(plumed_build INSTALL_DIR)
|
||||
@ -1,18 +1,13 @@
|
||||
# Fix qeq/fire requires MANYBODY (i.e. COMB and COMB3) to be installed
|
||||
set(QEQ_SOURCES_DIR ${LAMMPS_SOURCE_DIR}/QEQ)
|
||||
file(GLOB QEQ_HEADERS ${QEQ_SOURCES_DIR}/fix*.h)
|
||||
file(GLOB QEQ_SOURCES ${QEQ_SOURCES_DIR}/fix*.cpp)
|
||||
|
||||
get_property(hlist GLOBAL PROPERTY FIX)
|
||||
if(NOT PKG_MANYBODY)
|
||||
list(REMOVE_ITEM QEQ_HEADERS ${QEQ_SOURCES_DIR}/fix_qeq_fire.h)
|
||||
list(REMOVE_ITEM QEQ_SOURCES ${QEQ_SOURCES_DIR}/fix_qeq_fire.cpp)
|
||||
list(REMOVE_ITEM hlist ${QEQ_SOURCES_DIR}/fix_qeq_fire.h)
|
||||
get_target_property(LAMMPS_SOURCES lammps SOURCES)
|
||||
list(REMOVE_ITEM LAMMPS_SOURCES ${QEQ_SOURCES_DIR}/fix_qeq_fire.cpp)
|
||||
set_property(TARGET lammps PROPERTY SOURCES ${LAMMPS_SOURCES})
|
||||
endif()
|
||||
set_property(GLOBAL PROPERTY "QEQ_SOURCES" "${QEQ_SOURCES}")
|
||||
set_property(GLOBAL PROPERTY FIX "${hlist}")
|
||||
|
||||
foreach(MY_HEADER ${QEQ_HEADERS})
|
||||
AddStyleHeader(${MY_HEADER} FIX)
|
||||
endforeach()
|
||||
|
||||
get_property(QEQ_SOURCES GLOBAL PROPERTY QEQ_SOURCES)
|
||||
target_sources(lammps PRIVATE ${QEQ_SOURCES})
|
||||
target_include_directories(lammps PRIVATE ${QEQ_SOURCES_DIR})
|
||||
|
||||
@ -1,40 +0,0 @@
|
||||
set(USER-OMP_SOURCES_DIR ${LAMMPS_SOURCE_DIR}/USER-OMP)
|
||||
set(USER-OMP_SOURCES ${USER-OMP_SOURCES_DIR}/thr_data.cpp
|
||||
${USER-OMP_SOURCES_DIR}/thr_omp.cpp
|
||||
${USER-OMP_SOURCES_DIR}/fix_omp.cpp
|
||||
${USER-OMP_SOURCES_DIR}/fix_nh_omp.cpp
|
||||
${USER-OMP_SOURCES_DIR}/fix_nh_sphere_omp.cpp
|
||||
${USER-OMP_SOURCES_DIR}/domain_omp.cpp)
|
||||
target_compile_definitions(lammps PRIVATE -DLMP_USER_OMP)
|
||||
set_property(GLOBAL PROPERTY "OMP_SOURCES" "${USER-OMP_SOURCES}")
|
||||
|
||||
# detects styles which have USER-OMP version
|
||||
RegisterStylesExt(${USER-OMP_SOURCES_DIR} omp OMP_SOURCES)
|
||||
RegisterFixStyle(${USER-OMP_SOURCES_DIR}/fix_omp.h)
|
||||
|
||||
get_property(USER-OMP_SOURCES GLOBAL PROPERTY OMP_SOURCES)
|
||||
|
||||
# manually add package dependent source files from USER-OMP that do not provide styles
|
||||
|
||||
if(PKG_ASPHERE)
|
||||
list(APPEND USER-OMP_SOURCES ${USER-OMP_SOURCES_DIR}/fix_nh_asphere_omp.cpp)
|
||||
endif()
|
||||
|
||||
if(PKG_RIGID)
|
||||
list(APPEND USER-OMP_SOURCES ${USER-OMP_SOURCES_DIR}/fix_rigid_nh_omp.cpp)
|
||||
endif()
|
||||
|
||||
if(PKG_USER-REAXC)
|
||||
list(APPEND USER-OMP_SOURCES ${USER-OMP_SOURCES_DIR}/reaxc_bond_orders_omp.cpp
|
||||
${USER-OMP_SOURCES_DIR}/reaxc_hydrogen_bonds_omp.cpp
|
||||
${USER-OMP_SOURCES_DIR}/reaxc_nonbonded_omp.cpp
|
||||
${USER-OMP_SOURCES_DIR}/reaxc_bonds_omp.cpp
|
||||
${USER-OMP_SOURCES_DIR}/reaxc_init_md_omp.cpp
|
||||
${USER-OMP_SOURCES_DIR}/reaxc_torsion_angles_omp.cpp
|
||||
${USER-OMP_SOURCES_DIR}/reaxc_forces_omp.cpp
|
||||
${USER-OMP_SOURCES_DIR}/reaxc_multi_body_omp.cpp
|
||||
${USER-OMP_SOURCES_DIR}/reaxc_valence_angles_omp.cpp)
|
||||
endif()
|
||||
|
||||
target_sources(lammps PRIVATE ${USER-OMP_SOURCES})
|
||||
target_include_directories(lammps PRIVATE ${USER-OMP_SOURCES_DIR})
|
||||
@ -9,7 +9,7 @@ function(prevent_in_source_builds)
|
||||
get_filename_component(bindir "${CMAKE_BINARY_DIR}" REALPATH)
|
||||
|
||||
# disallow in-source builds
|
||||
if("${srcdir}" STREQUAL "${bindir}" OR "${srcdir2}" STREQUAL "${bindir}" OR "${srcdir3}" STREQUAL "${bindir}")
|
||||
if(("${srcdir}" STREQUAL "${bindir}") OR ("${srcdir2}" STREQUAL "${bindir}") OR ("${srcdir3}" STREQUAL "${bindir}"))
|
||||
message(FATAL_ERROR "\
|
||||
|
||||
CMake must not to be run in the source directory. \
|
||||
|
||||
@ -19,11 +19,11 @@ if(ENABLE_TESTING)
|
||||
# we need to build and link a LOT of tester executables, so it is worth checking if
|
||||
# a faster linker is available. requires GNU or Clang compiler, newer CMake.
|
||||
# also only verified with Fedora Linux > 30 and Ubuntu <= 18.04 (Ubuntu 20.04 fails)
|
||||
if((CMAKE_SYSTEM_NAME STREQUAL Linux) AND (CMAKE_VERSION VERSION_GREATER_EQUAL 3.13)
|
||||
AND ((${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU")
|
||||
OR (${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang")))
|
||||
if (((CMAKE_LINUX_DISTRO STREQUAL Ubuntu) AND (CMAKE_DISTRO_VERSION VERSION_LESS_EQUAL 18.04))
|
||||
OR ((CMAKE_LINUX_DISTRO STREQUAL Fedora) AND (CMAKE_DISTRO_VERSION VERSION_GREATER 30)))
|
||||
if((CMAKE_SYSTEM_NAME STREQUAL "Linux") AND (CMAKE_VERSION VERSION_GREATER_EQUAL 3.13)
|
||||
AND ((CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||
OR (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")))
|
||||
if(((CMAKE_LINUX_DISTRO STREQUAL "Ubuntu") AND (CMAKE_DISTRO_VERSION VERSION_LESS_EQUAL 18.04))
|
||||
OR ((CMAKE_LINUX_DISTRO STREQUAL "Fedora") AND (CMAKE_DISTRO_VERSION VERSION_GREATER 30)))
|
||||
include(CheckCXXCompilerFlag)
|
||||
set(CMAKE_CUSTOM_LINKER_DEFAULT default)
|
||||
check_cxx_compiler_flag(-fuse-ld=lld HAVE_LLD_LINKER_FLAG)
|
||||
@ -56,3 +56,76 @@ if(ENABLE_TESTING)
|
||||
get_filename_component(LAMMPS_UNITTEST_BIN ${CMAKE_BINARY_DIR}/unittest ABSOLUTE)
|
||||
add_subdirectory(${LAMMPS_UNITTEST_DIR} ${LAMMPS_UNITTEST_BIN})
|
||||
endif()
|
||||
|
||||
# Compiler specific features for testing
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||
option(ENABLE_COVERAGE "Enable collecting code coverage data" OFF)
|
||||
mark_as_advanced(ENABLE_COVERAGE)
|
||||
if(ENABLE_COVERAGE)
|
||||
if(CMAKE_VERSION VERSION_LESS 3.13)
|
||||
if(CMAKE_CXX_FLAGS)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --coverage")
|
||||
else()
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_${CMAKE_BUILD_TYPE}_FLAGS} --coverage")
|
||||
endif()
|
||||
else()
|
||||
target_compile_options(lammps PUBLIC --coverage)
|
||||
target_link_options(lammps PUBLIC --coverage)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
#######################################
|
||||
# add custom target for IWYU analysis
|
||||
#######################################
|
||||
set(ENABLE_IWYU OFF CACHE BOOL "Add 'iwyu' build target to call the include-what-you-use tool")
|
||||
mark_as_advanced(ENABLE_IWYU)
|
||||
if(ENABLE_IWYU)
|
||||
# enforce these settings
|
||||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON CACHE BOOL "Enable reporting compilation commands to compile_commands.json" FORCE)
|
||||
if(NOT ((CMAKE_CXX_COMPILER_ID STREQUAL "Clang") OR (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")))
|
||||
message(FATAL_ERROR "IWYU is only supported with Clang or GNU compilers")
|
||||
endif()
|
||||
# detect the "native" header folder so we can include them first
|
||||
execute_process(COMMAND ${CMAKE_CXX_COMPILER} --print-search-dirs OUTPUT_VARIABLE IWYU_SEARCH_PATHS)
|
||||
string(REGEX REPLACE ".*libraries: *=([^:]+):.*" "\\1/include" IWYU_EXTRA_INCLUDE_DIR ${IWYU_SEARCH_PATHS})
|
||||
find_program(IWYU_EXE NAMES include-what-you-use iwyu)
|
||||
find_program(IWYU_TOOL NAMES iwyu_tool iwyu-tool iwyu_tool.py)
|
||||
if(IWYU_EXE AND IWYU_TOOL)
|
||||
add_custom_target(
|
||||
iwyu
|
||||
${IWYU_TOOL} -o clang -p ${CMAKE_CURRENT_BINARY_DIR} -- -I${IWYU_EXTRA_INCLUDE_DIR} -Xiwyu --mapping_file=${CMAKE_CURRENT_SOURCE_DIR}/iwyu/iwyu-extra-map.imp
|
||||
COMMENT "Running IWYU")
|
||||
add_dependencies(iwyu lammps)
|
||||
else()
|
||||
message(FATAL_ERROR "To use IWYU you need the include-what-you-use/iwyu executable"
|
||||
"and the iwyu-tool/iwyu_tool script installed in your PATH")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
#######################################
|
||||
# select code sanitizer options
|
||||
#######################################
|
||||
set(ENABLE_SANITIZER "none" CACHE STRING "Select a code sanitizer option (none (default), address, leak, thread, undefined)")
|
||||
mark_as_advanced(ENABLE_SANITIZER)
|
||||
set(ENABLE_SANITIZER_VALUES none address leak thread undefined)
|
||||
set_property(CACHE ENABLE_SANITIZER PROPERTY STRINGS ${ENABLE_SANITIZER_VALUES})
|
||||
validate_option(ENABLE_SANITIZER ENABLE_SANITIZER_VALUES)
|
||||
string(TOLOWER ${ENABLE_SANITIZER} ENABLE_SANITIZER)
|
||||
if(NOT ENABLE_SANITIZER STREQUAL "none")
|
||||
if((${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU") OR (${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang"))
|
||||
if(CMAKE_VERSION VERSION_LESS 3.13)
|
||||
if(CMAKE_CXX_FLAGS)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=${ENABLE_SANITIZER}")
|
||||
else()
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_${CMAKE_BUILD_TYPE}_FLAGS} -fsanitize=${ENABLE_SANITIZER}")
|
||||
endif()
|
||||
else()
|
||||
target_compile_options(lammps PUBLIC -fsanitize=${ENABLE_SANITIZER})
|
||||
target_link_options(lammps PUBLIC -fsanitize=${ENABLE_SANITIZER})
|
||||
endif()
|
||||
else()
|
||||
message(WARNING "ENABLE_SANITIZER option not supported by ${CMAKE_CXX_COMPILER_ID} compilers. Ignoring.")
|
||||
set(ENABLE_SANITIZER "none")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@ -45,7 +45,7 @@ if(BUILD_LAMMPS_SHELL)
|
||||
target_include_directories(lammps-shell PRIVATE ${LAMMPS_TOOLS_DIR}/lammps-shell)
|
||||
|
||||
# workaround for broken readline pkg-config file on FreeBSD
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL FreeBSD)
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
|
||||
target_include_directories(lammps-shell PRIVATE /usr/local/include)
|
||||
endif()
|
||||
target_link_libraries(lammps-shell PRIVATE lammps PkgConfig::READLINE)
|
||||
|
||||
@ -6,15 +6,27 @@ set(YAML_MD5 "bb15429d8fb787e7d3f1c83ae129a999" CACHE STRING "MD5 checksum of li
|
||||
mark_as_advanced(YAML_URL)
|
||||
mark_as_advanced(YAML_MD5)
|
||||
|
||||
# support cross-compilation to windows
|
||||
if(CMAKE_CROSSCOMPILING AND (CMAKE_SYSTEM_NAME STREQUAL "Windows"))
|
||||
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86")
|
||||
set(YAML_CROSS_HOST --host=i686-mingw64)
|
||||
elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
|
||||
set(YAML_CROSS_HOST --host=x86_64-mingw64)
|
||||
else()
|
||||
message(FATAL_ERROR "Unsupported cross-compilation "
|
||||
" for ${CMAKE_SYSTEM_NAME}/${CMAKE_SYSTEM_PROCESSOR}"
|
||||
" on ${CMAKE_HOST_SYSTEM}/${CMAKE_HOST_SYSTEM_PROCESSOR}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
ExternalProject_Add(libyaml
|
||||
URL ${YAML_URL}
|
||||
URL_MD5 ${YAML_MD5}
|
||||
SOURCE_DIR "${CMAKE_BINARY_DIR}/yaml-src"
|
||||
BINARY_DIR "${CMAKE_BINARY_DIR}/yaml-build"
|
||||
CONFIGURE_COMMAND <SOURCE_DIR>/configure ${CONFIGURE_REQUEST_PIC}
|
||||
CXX=${CMAKE_CXX_COMPILER}
|
||||
CC=${CMAKE_C_COMPILER}
|
||||
--prefix=<INSTALL_DIR> --disable-shared
|
||||
CXX=${CMAKE_CXX_COMPILER} CC=${CMAKE_C_COMPILER}
|
||||
--prefix=<INSTALL_DIR> --disable-shared ${YAML_CROSS_HOST}
|
||||
BUILD_BYPRODUCTS <INSTALL_DIR>/lib/libyaml${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
TEST_COMMAND "")
|
||||
|
||||
|
||||
@ -17,7 +17,7 @@ if(GIT_FOUND AND EXISTS ${LAMMPS_DIR}/.git)
|
||||
ERROR_QUIET
|
||||
WORKING_DIRECTORY ${LAMMPS_DIR}
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
execute_process(COMMAND ${GIT_EXECUTABLE} describe --dirty=-modified
|
||||
execute_process(COMMAND ${GIT_EXECUTABLE} describe --dirty=-modified --always
|
||||
OUTPUT_VARIABLE temp_git_describe
|
||||
ERROR_QUIET
|
||||
WORKING_DIRECTORY ${LAMMPS_DIR}
|
||||
|
||||
@ -24,7 +24,7 @@ includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@
|
||||
|
||||
Name: liblammps@LAMMPS_MACHINE@
|
||||
Description: Large-scale Atomic/Molecular Massively Parallel Simulator Library
|
||||
URL: http://lammps.sandia.gov
|
||||
URL: https://www.lammps.org
|
||||
Version: @PROJECT_VERSION@
|
||||
Requires:
|
||||
Libs: -L${libdir} -llammps@LAMMPS_MACHINE@
|
||||
|
||||
@ -1,17 +1,90 @@
|
||||
# preset that turns on all existing packages off. can be used to reset
|
||||
# Preset that turns on all existing packages off. Can be used to reset
|
||||
# an existing package selection without losing any other settings
|
||||
|
||||
set(ALL_PACKAGES ASPHERE BODY CLASS2 COLLOID COMPRESS CORESHELL DIPOLE GPU
|
||||
GRANULAR KIM KOKKOS KSPACE LATTE MANYBODY MC MISC MESSAGE MLIAP
|
||||
MOLECULE MPIIO MSCG OPT PERI POEMS PYTHON QEQ REPLICA RIGID SHOCK
|
||||
SNAP SPIN SRD VORONOI
|
||||
USER-ADIOS USER-ATC USER-AWPMD USER-BOCS USER-CGDNA USER-CGSDK
|
||||
USER-COLVARS USER-DIFFRACTION USER-DPD USER-DRUDE USER-EFF USER-FEP
|
||||
USER-H5MD USER-INTEL USER-LB USER-MANIFOLD USER-MEAMC USER-MESODPD
|
||||
USER-MESONT USER-MGPT USER-MISC USER-MOFFF USER-MOLFILE USER-NETCDF USER-OMP
|
||||
USER-PHONON USER-PLUMED USER-PTM USER-QMMM USER-QTB USER-QUIP
|
||||
USER-REACTION USER-REAXC USER-SCAFACOS USER-SDPD USER-SMD USER-SMTBQ
|
||||
USER-SPH USER-TALLY USER-UEF USER-VTK USER-YAFF)
|
||||
set(ALL_PACKAGES
|
||||
ADIOS
|
||||
ASPHERE
|
||||
ATC
|
||||
AWPMD
|
||||
BOCS
|
||||
BODY
|
||||
BROWNIAN
|
||||
CG-DNA
|
||||
CG-SDK
|
||||
CLASS2
|
||||
COLLOID
|
||||
COLVARS
|
||||
COMPRESS
|
||||
CORESHELL
|
||||
DIELECTRIC
|
||||
DIFFRACTION
|
||||
DIPOLE
|
||||
DPD-BASIC
|
||||
DPD-MESO
|
||||
DPD-REACT
|
||||
DPD-SMOOTH
|
||||
DRUDE
|
||||
EFF
|
||||
FEP
|
||||
GPU
|
||||
GRANULAR
|
||||
H5MD
|
||||
INTEL
|
||||
KIM
|
||||
KOKKOS
|
||||
KSPACE
|
||||
LATBOLTZ
|
||||
LATTE
|
||||
MACHDYN
|
||||
MANIFOLD
|
||||
MANYBODY
|
||||
MC
|
||||
MDI
|
||||
MEAM
|
||||
MESONT
|
||||
MESSAGE
|
||||
MGPT
|
||||
MISC
|
||||
ML-HDNNP
|
||||
ML-IAP
|
||||
ML-PACE
|
||||
ML-QUIP
|
||||
ML-RANN
|
||||
ML-SNAP
|
||||
MOFFF
|
||||
MOLECULE
|
||||
MOLFILE
|
||||
MPIIO
|
||||
MSCG
|
||||
NETCDF
|
||||
OPENMP
|
||||
OPT
|
||||
PERI
|
||||
PHONON
|
||||
PLUGIN
|
||||
PLUMED
|
||||
POEMS
|
||||
PTM
|
||||
PYTHON
|
||||
QEQ
|
||||
QMMM
|
||||
QTB
|
||||
REACTION
|
||||
REAXFF
|
||||
REPLICA
|
||||
RIGID
|
||||
SCAFACOS
|
||||
SHOCK
|
||||
SMTBQ
|
||||
SPH
|
||||
SPIN
|
||||
SRD
|
||||
TALLY
|
||||
UEF
|
||||
USER-MISC
|
||||
VORONOI
|
||||
VTK
|
||||
YAFF)
|
||||
|
||||
foreach(PKG ${ALL_PACKAGES})
|
||||
set(PKG_${PKG} OFF CACHE BOOL "" FORCE)
|
||||
|
||||
@ -1,19 +1,92 @@
|
||||
# preset that turns on all existing packages. using the combination
|
||||
# this preset followed by the nolib.cmake preset should configure a
|
||||
# LAMMPS binary, with as many packages included, that can be compiled
|
||||
# Preset that turns on all existing packages. Using the combination
|
||||
# of this preset followed by the nolib.cmake preset should configure
|
||||
# a LAMMPS binary, with as many packages included, that can be compiled
|
||||
# with just a working C++ compiler and an MPI library.
|
||||
|
||||
set(ALL_PACKAGES ASPHERE BODY CLASS2 COLLOID COMPRESS CORESHELL DIPOLE GPU
|
||||
GRANULAR KIM KOKKOS KSPACE LATTE MANYBODY MC MISC MESSAGE MLIAP
|
||||
MOLECULE MPIIO MSCG OPT PERI POEMS PYTHON QEQ REPLICA RIGID SHOCK
|
||||
SNAP SPIN SRD VORONOI
|
||||
USER-ADIOS USER-ATC USER-AWPMD USER-BOCS USER-CGDNA USER-CGSDK
|
||||
USER-COLVARS USER-DIFFRACTION USER-DPD USER-DRUDE USER-EFF USER-FEP
|
||||
USER-H5MD USER-INTEL USER-LB USER-MANIFOLD USER-MEAMC USER-MESODPD
|
||||
USER-MESONT USER-MGPT USER-MISC USER-MOFFF USER-MOLFILE USER-NETCDF USER-OMP
|
||||
USER-PHONON USER-PLUMED USER-PTM USER-QMMM USER-QTB USER-QUIP
|
||||
USER-REACTION USER-REAXC USER-SCAFACOS USER-SDPD USER-SMD USER-SMTBQ
|
||||
USER-SPH USER-TALLY USER-UEF USER-VTK USER-YAFF)
|
||||
set(ALL_PACKAGES
|
||||
ADIOS
|
||||
ASPHERE
|
||||
ATC
|
||||
AWPMD
|
||||
BOCS
|
||||
BODY
|
||||
BROWNIAN
|
||||
CG-DNA
|
||||
CG-SDK
|
||||
CLASS2
|
||||
COLLOID
|
||||
COLVARS
|
||||
COMPRESS
|
||||
CORESHELL
|
||||
DIELECTRIC
|
||||
DIFFRACTION
|
||||
DIPOLE
|
||||
DPD-BASIC
|
||||
DPD-MESO
|
||||
DPD-REACT
|
||||
DPD-SMOOTH
|
||||
DRUDE
|
||||
EFF
|
||||
FEP
|
||||
GPU
|
||||
GRANULAR
|
||||
H5MD
|
||||
INTEL
|
||||
KIM
|
||||
KOKKOS
|
||||
KSPACE
|
||||
LATBOLTZ
|
||||
LATTE
|
||||
MACHDYN
|
||||
MANIFOLD
|
||||
MANYBODY
|
||||
MC
|
||||
MDI
|
||||
MEAM
|
||||
MESONT
|
||||
MESSAGE
|
||||
MGPT
|
||||
MISC
|
||||
ML-HDNNP
|
||||
ML-IAP
|
||||
ML-PACE
|
||||
ML-QUIP
|
||||
ML-RANN
|
||||
ML-SNAP
|
||||
MOFFF
|
||||
MOLECULE
|
||||
MOLFILE
|
||||
MPIIO
|
||||
MSCG
|
||||
NETCDF
|
||||
OPENMP
|
||||
OPT
|
||||
PERI
|
||||
PHONON
|
||||
PLUGIN
|
||||
PLUMED
|
||||
POEMS
|
||||
PTM
|
||||
PYTHON
|
||||
QEQ
|
||||
QMMM
|
||||
QTB
|
||||
REACTION
|
||||
REAXFF
|
||||
REPLICA
|
||||
RIGID
|
||||
SCAFACOS
|
||||
SHOCK
|
||||
SMTBQ
|
||||
SPH
|
||||
SPIN
|
||||
SRD
|
||||
TALLY
|
||||
UEF
|
||||
USER-MISC
|
||||
VORONOI
|
||||
VTK
|
||||
YAFF)
|
||||
|
||||
foreach(PKG ${ALL_PACKAGES})
|
||||
set(PKG_${PKG} ON CACHE BOOL "" FORCE)
|
||||
|
||||
@ -1,13 +1,26 @@
|
||||
# preset that will enable clang/clang++ with support for MPI and OpenMP (on Linux boxes)
|
||||
|
||||
# prefer flang over gfortran, if available
|
||||
find_program(CLANG_FORTRAN NAMES flang gfortran f95)
|
||||
set(ENV{OMPI_FC} ${CLANG_FORTRAN})
|
||||
|
||||
set(CMAKE_CXX_COMPILER "clang++" CACHE STRING "" FORCE)
|
||||
set(CMAKE_C_COMPILER "clang" CACHE STRING "" FORCE)
|
||||
set(CMAKE_Fortran_COMPILER ${CLANG_FORTRAN} 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 -std=f95" CACHE STRING "" FORCE)
|
||||
set(CMAKE_Fortran_FLAGS_RELWITHDEBINFO "-Wall -Wextra -g -O2 -DNDEBUG -std=f95" CACHE STRING "" FORCE)
|
||||
set(CMAKE_Fortran_FLAGS_RELEASE "-O3 -DNDEBUG -std=f95" 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 "clang++" CACHE STRING "" FORCE)
|
||||
set(MPI_CXX_COMPILER "mpicxx" CACHE STRING "" FORCE)
|
||||
unset(HAVE_OMP_H_INCLUDE CACHE)
|
||||
|
||||
unset(HAVE_OMP_H_INCLUDE CACHE)
|
||||
set(OpenMP_C "clang" CACHE STRING "" FORCE)
|
||||
set(OpenMP_C_FLAGS "-fopenmp" CACHE STRING "" FORCE)
|
||||
set(OpenMP_C_LIB_NAMES "omp" CACHE STRING "" FORCE)
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
# preset that turns on packages with automatic downloads of sources of potentials
|
||||
# compilation of libraries like Plumed or ScaFaCoS can take a considerable amount of time.
|
||||
# Preset that turns on packages with automatic downloads of sources or potentials.
|
||||
# Compilation of libraries like Plumed or ScaFaCoS can take a considerable amount of time.
|
||||
|
||||
set(ALL_PACKAGES KIM LATTE MSCG VORONOI USER-PLUMED USER-SCAFACOS USER-SMD USER-MESONT)
|
||||
set(ALL_PACKAGES KIM LATTE MSCG VORONOI PLUMED SCAFACOS MACHDYN MESONT MDI ML-PACE)
|
||||
|
||||
foreach(PKG ${ALL_PACKAGES})
|
||||
set(PKG_${PKG} ON CACHE BOOL "" FORCE)
|
||||
@ -9,9 +9,11 @@ endforeach()
|
||||
|
||||
set(DOWNLOAD_KIM ON CACHE BOOL "" FORCE)
|
||||
set(DOWNLOAD_LATTE ON CACHE BOOL "" FORCE)
|
||||
set(DOWNLOAD_MDI ON CACHE BOOL "" FORCE)
|
||||
set(DOWNLOAD_MSCG ON CACHE BOOL "" FORCE)
|
||||
set(DOWNLOAD_VORO ON CACHE BOOL "" FORCE)
|
||||
set(DOWNLOAD_EIGEN3 ON CACHE BOOL "" FORCE)
|
||||
set(DOWNLOAD_PACE ON CACHE BOOL "" FORCE)
|
||||
set(DOWNLOAD_PLUMED ON CACHE BOOL "" FORCE)
|
||||
set(DOWNLOAD_SCAFACOS ON CACHE BOOL "" FORCE)
|
||||
|
||||
|
||||
@ -2,10 +2,22 @@
|
||||
|
||||
set(CMAKE_CXX_COMPILER "g++" CACHE STRING "" FORCE)
|
||||
set(CMAKE_C_COMPILER "gcc" 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_Fortran_COMPILER "gfortran" CACHE STRING "" FORCE)
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "-Wall -g" CACHE STRING "" FORCE)
|
||||
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-g -O2 -DNDEBUG" CACHE STRING "" FORCE)
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG" CACHE STRING "" FORCE)
|
||||
set(MPI_CXX "g++" CACHE STRING "" FORCE)
|
||||
set(MPI_CXX_COMPILER "mpicxx" CACHE STRING "" FORCE)
|
||||
set(MPI_C "gcc" CACHE STRING "" FORCE)
|
||||
set(MPI_C_COMPILER "mpicc" CACHE STRING "" FORCE)
|
||||
set(CMAKE_C_FLAGS_DEBUG "-Wall -g" CACHE STRING "" FORCE)
|
||||
set(CMAKE_C_FLAGS_RELWITHDEBINFO "-g -O2 -DNDEBUG" CACHE STRING "" FORCE)
|
||||
set(CMAKE_C_FLAGS_RELEASE "-O3 -DNDEBUG" CACHE STRING "" FORCE)
|
||||
set(MPI_Fortran "gfortran" CACHE STRING "" FORCE)
|
||||
set(MPI_Fortran_COMPILER "mpifort" CACHE STRING "" FORCE)
|
||||
set(CMAKE_Fortran_FLAGS_DEBUG "-Wall -g" CACHE STRING "" FORCE)
|
||||
set(CMAKE_Fortran_FLAGS_RELWITHDEBINFO "-g -O2 -DNDEBUG" CACHE STRING "" FORCE)
|
||||
set(CMAKE_Fortran_FLAGS_RELEASE "-O3 -DNDEBUG" CACHE STRING "" FORCE)
|
||||
unset(HAVE_OMP_H_INCLUDE CACHE)
|
||||
|
||||
set(OpenMP_C "gcc" CACHE STRING "" FORCE)
|
||||
|
||||
@ -3,10 +3,20 @@
|
||||
set(CMAKE_CXX_COMPILER "icpc" CACHE STRING "" FORCE)
|
||||
set(CMAKE_C_COMPILER "icc" CACHE STRING "" FORCE)
|
||||
set(CMAKE_Fortran_COMPILER "ifort" 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 "icpc" CACHE STRING "" FORCE)
|
||||
set(MPI_CXX_COMPILER "mpicxx" CACHE STRING "" FORCE)
|
||||
unset(HAVE_OMP_H_INCLUDE CACHE)
|
||||
|
||||
unset(HAVE_OMP_H_INCLUDE CACHE)
|
||||
set(OpenMP_C "icc" CACHE STRING "" FORCE)
|
||||
set(OpenMP_C_FLAGS "-qopenmp" CACHE STRING "" FORCE)
|
||||
set(OpenMP_C_LIB_NAMES "omp" CACHE STRING "" FORCE)
|
||||
|
||||
@ -1,13 +1,69 @@
|
||||
set(WIN_PACKAGES ASPHERE BODY CLASS2 COLLOID COMPRESS CORESHELL DIPOLE GPU
|
||||
GRANULAR KSPACE LATTE MANYBODY MC MISC MLIAP MOLECULE OPT
|
||||
PERI POEMS QEQ REPLICA RIGID SHOCK SNAP SPIN SRD VORONOI
|
||||
USER-ATC USER-AWPMD USER-BOCS USER-CGDNA USER-CGSDK
|
||||
USER-COLVARS USER-DIFFRACTION USER-DPD USER-DRUDE USER-EFF
|
||||
USER-FEP USER-INTEL USER-MANIFOLD USER-MEAMC USER-MESODPD
|
||||
USER-MESONT USER-MISC USER-MGPT USER-MOFFF USER-MOLFILE USER-OMP
|
||||
USER-PHONON USER-PTM USER-QTB USER-REACTION USER-REAXC
|
||||
USER-SDPD USER-SMD USER-SMTBQ USER-SPH USER-TALLY USER-UEF
|
||||
USER-YAFF)
|
||||
set(WIN_PACKAGES
|
||||
ASPHERE
|
||||
ATC
|
||||
AWPMD
|
||||
BOCS
|
||||
BODY
|
||||
BROWNIAN
|
||||
CG-DNA
|
||||
CG-SDK
|
||||
CLASS2
|
||||
COLLOID
|
||||
COLVARS
|
||||
COMPRESS
|
||||
CORESHELL
|
||||
DIELECTRIC
|
||||
DIFFRACTION
|
||||
DIPOLE
|
||||
DPD-BASIC
|
||||
DPD-MESO
|
||||
DPD-REACT
|
||||
DPD-SMOOTH
|
||||
DRUDE
|
||||
EFF
|
||||
FEP
|
||||
GPU
|
||||
GRANULAR
|
||||
INTEL
|
||||
KSPACE
|
||||
LATTE
|
||||
MACHDYN
|
||||
MANIFOLD
|
||||
MANYBODY
|
||||
MC
|
||||
MDI
|
||||
MEAM
|
||||
MESONT
|
||||
MGPT
|
||||
MISC
|
||||
ML-HDNNP
|
||||
ML-IAP
|
||||
ML-SNAP
|
||||
MOFFF
|
||||
MOLECULE
|
||||
MOLFILE
|
||||
OPENMP
|
||||
OPT
|
||||
PERI
|
||||
PHONON
|
||||
POEMS
|
||||
PTM
|
||||
QEQ
|
||||
QTB
|
||||
REACTION
|
||||
REAXFF
|
||||
REPLICA
|
||||
RIGID
|
||||
SHOCK
|
||||
SMTBQ
|
||||
SPH
|
||||
SPIN
|
||||
SRD
|
||||
TALLY
|
||||
UEF
|
||||
USER-MISC
|
||||
VORONOI
|
||||
YAFF)
|
||||
|
||||
foreach(PKG ${WIN_PACKAGES})
|
||||
set(PKG_${PKG} ON CACHE BOOL "" FORCE)
|
||||
@ -16,7 +72,7 @@ endforeach()
|
||||
# these two packages require a full MPI implementation
|
||||
if(BUILD_MPI)
|
||||
set(PKG_MPIIO ON CACHE BOOL "" FORCE)
|
||||
set(PKG_USER-LB ON CACHE BOOL "" FORCE)
|
||||
set(PKG_LATBOLTZ ON CACHE BOOL "" FORCE)
|
||||
endif()
|
||||
|
||||
set(DOWNLOAD_VORO ON CACHE BOOL "" FORCE)
|
||||
|
||||
@ -2,13 +2,59 @@
|
||||
# external libraries. Compared to all_on.cmake some more unusual packages
|
||||
# are removed. The resulting binary should be able to run most inputs.
|
||||
|
||||
set(ALL_PACKAGES ASPHERE BODY CLASS2 COLLOID COMPRESS CORESHELL DIPOLE
|
||||
GRANULAR KSPACE MANYBODY MC MISC MLIAP MOLECULE OPT PERI
|
||||
PLUGIN POEMS PYTHON QEQ REPLICA RIGID SHOCK SNAP SPIN SRD VORONOI
|
||||
USER-BOCS USER-CGDNA USER-CGSDK USER-COLVARS USER-DIFFRACTION
|
||||
USER-DPD USER-DRUDE USER-EFF USER-FEP USER-MEAMC USER-MESODPD
|
||||
USER-MISC USER-MOFFF USER-OMP USER-PHONON USER-REACTION
|
||||
USER-REAXC USER-SDPD USER-SPH USER-SMD USER-UEF USER-YAFF)
|
||||
set(ALL_PACKAGES
|
||||
ASPHERE
|
||||
BOCS
|
||||
BODY
|
||||
BROWNIAN
|
||||
CG-DNA
|
||||
CG-SDK
|
||||
CLASS2
|
||||
COLLOID
|
||||
COLVARS
|
||||
COMPRESS
|
||||
CORESHELL
|
||||
DIELECTRIC
|
||||
DIFFRACTION
|
||||
DIPOLE
|
||||
DPD-BASIC
|
||||
DPD-MESO
|
||||
DPD-REACT
|
||||
DPD-SMOOTH
|
||||
DRUDE
|
||||
EFF
|
||||
FEP
|
||||
GRANULAR
|
||||
KSPACE
|
||||
MACHDYN
|
||||
MANYBODY
|
||||
MC
|
||||
MEAM
|
||||
MISC
|
||||
ML-IAP
|
||||
ML-SNAP
|
||||
MOFFF
|
||||
MOLECULE
|
||||
OPENMP
|
||||
OPT
|
||||
PERI
|
||||
PHONON
|
||||
PLUGIN
|
||||
POEMS
|
||||
PYTHON
|
||||
QEQ
|
||||
REACTION
|
||||
REAXFF
|
||||
REPLICA
|
||||
RIGID
|
||||
SHOCK
|
||||
SPH
|
||||
SPIN
|
||||
SRD
|
||||
UEF
|
||||
USER-MISC
|
||||
VORONOI
|
||||
YAFF)
|
||||
|
||||
foreach(PKG ${ALL_PACKAGES})
|
||||
set(PKG_${PKG} ON CACHE BOOL "" FORCE)
|
||||
|
||||
@ -1,10 +1,34 @@
|
||||
# preset that turns off all packages that require some form of external
|
||||
# library or special compiler (fortran or cuda) or equivalent.
|
||||
|
||||
set(PACKAGES_WITH_LIB COMPRESS GPU KIM KOKKOS LATTE MPIIO MSCG PYTHON
|
||||
VORONOI USER-ADIOS USER-ATC USER-AWPMD USER-H5MD USER-LB
|
||||
USER-MOLFILE USER-MESONT USER-NETCDF USER-PLUMED USER-QMMM USER-QUIP
|
||||
USER-SCAFACOS USER-SMD USER-VTK)
|
||||
set(PACKAGES_WITH_LIB
|
||||
ADIOS
|
||||
ATC
|
||||
AWPMD
|
||||
COMPRESS
|
||||
GPU
|
||||
H5MD
|
||||
KIM
|
||||
KOKKOS
|
||||
LATBOLTZ
|
||||
LATTE
|
||||
MACHDYN
|
||||
MDI
|
||||
MESONT
|
||||
MESSAGE
|
||||
ML-HDNNP
|
||||
ML-PACE
|
||||
ML-QUIP
|
||||
MOLFILE
|
||||
MPIIO
|
||||
MSCG
|
||||
NETCDF
|
||||
PLUMED
|
||||
PYTHON
|
||||
QMMM
|
||||
SCAFACOS
|
||||
VORONOI
|
||||
VTK)
|
||||
|
||||
foreach(PKG ${PACKAGES_WITH_LIB})
|
||||
set(PKG_${PKG} OFF CACHE BOOL "" FORCE)
|
||||
|
||||
@ -1,12 +1,22 @@
|
||||
# preset that will enable the LLVM based Intel compilers with support for MPI and OpenMP (on Linux boxes)
|
||||
# preset that will enable the LLVM based Intel compilers with support for MPI and OpenMP and Fortran (on Linux boxes)
|
||||
|
||||
set(CMAKE_CXX_COMPILER "icpx" CACHE STRING "" FORCE)
|
||||
set(CMAKE_C_COMPILER "icx" 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_COMPILER "mpicxx" CACHE STRING "" FORCE)
|
||||
unset(HAVE_OMP_H_INCLUDE CACHE)
|
||||
|
||||
unset(HAVE_OMP_H_INCLUDE CACHE)
|
||||
set(OpenMP_C "icx" CACHE STRING "" FORCE)
|
||||
set(OpenMP_C_FLAGS "-qopenmp" CACHE STRING "" FORCE)
|
||||
set(OpenMP_C_LIB_NAMES "omp" CACHE STRING "" FORCE)
|
||||
|
||||
26
cmake/presets/pedantic.cmake
Normal file
26
cmake/presets/pedantic.cmake
Normal file
@ -0,0 +1,26 @@
|
||||
# preset that will restore gcc/g++ with support for MPI and OpenMP (on Linux boxes)
|
||||
|
||||
set(CMAKE_CXX_COMPILER "g++" CACHE STRING "" FORCE)
|
||||
set(CMAKE_C_COMPILER "gcc" CACHE STRING "" FORCE)
|
||||
set(CMAKE_Fortran_COMPILER "gfortran" CACHE STRING "" FORCE)
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "-Wall -Wextra -Werror=vla -Wno-maybe-uninitialized -g" CACHE STRING "" FORCE)
|
||||
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-Wall -Wextra -Werror=vla -Wno-maybe-uninitialized -g -O2 -DNDEBUG" CACHE STRING "" FORCE)
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "-Wall -O3 -DNDEBUG" CACHE STRING "" FORCE)
|
||||
set(MPI_CXX "g++" CACHE STRING "" FORCE)
|
||||
set(MPI_CXX_COMPILER "mpicxx" CACHE STRING "" FORCE)
|
||||
set(MPI_C "gcc" CACHE STRING "" FORCE)
|
||||
set(MPI_C_COMPILER "mpicc" CACHE STRING "" FORCE)
|
||||
set(CMAKE_C_FLAGS_DEBUG "-Wall -Wextra -Wno-maybe-uninitialized -g" CACHE STRING "" FORCE)
|
||||
set(CMAKE_C_FLAGS_RELWITHDEBINFO "-Wall -Wextra -Wno-maybe-uninitialized -g -O2 -DNDEBUG" CACHE STRING "" FORCE)
|
||||
set(CMAKE_C_FLAGS_RELEASE "-Wall -O3 -DNDEBUG" CACHE STRING "" FORCE)
|
||||
set(MPI_Fortran "gfortran" CACHE STRING "" FORCE)
|
||||
set(MPI_Fortran_COMPILER "mpifort" CACHE STRING "" FORCE)
|
||||
unset(HAVE_OMP_H_INCLUDE CACHE)
|
||||
|
||||
set(OpenMP_C "gcc" CACHE STRING "" FORCE)
|
||||
set(OpenMP_C_FLAGS "-fopenmp" CACHE STRING "" FORCE)
|
||||
set(OpenMP_C_LIB_NAMES "gomp" CACHE STRING "" FORCE)
|
||||
set(OpenMP_CXX "g++" CACHE STRING "" FORCE)
|
||||
set(OpenMP_CXX_FLAGS "-fopenmp" CACHE STRING "" FORCE)
|
||||
set(OpenMP_CXX_LIB_NAMES "gomp" CACHE STRING "" FORCE)
|
||||
set(OpenMP_omp_LIBRARY "libgomp.so" CACHE PATH "" FORCE)
|
||||
18
doc/Makefile
18
doc/Makefile
@ -10,7 +10,6 @@ endif
|
||||
BUILDDIR = ${CURDIR}
|
||||
RSTDIR = $(BUILDDIR)/src
|
||||
VENV = $(BUILDDIR)/docenv
|
||||
TXT2RST = $(VENV)/bin/txt2rst
|
||||
ANCHORCHECK = $(VENV)/bin/rst_anchor_check
|
||||
SPHINXCONFIG = $(BUILDDIR)/utils/sphinx-config
|
||||
MATHJAX = $(SPHINXCONFIG)/_static/mathjax
|
||||
@ -59,7 +58,7 @@ SPHINXEXTRA = -E -j $(shell $(PYTHON) -c 'import multiprocessing;print(multiproc
|
||||
# we only want to use explicitly listed files.
|
||||
DOXYFILES = $(shell sed -n -e 's/\#.*$$//' -e '/^ *INPUT \+=/,/^[A-Z_]\+ \+=/p' doxygen/Doxyfile.in | sed -e 's/@LAMMPS_SOURCE_DIR@/..\/src/g' -e 's/\\//g' -e 's/ \+/ /' -e 's/[A-Z_]\+ \+= *\(YES\|NO\|\)//')
|
||||
|
||||
.PHONY: help clean-all clean clean-spelling epub mobi rst html pdf spelling anchor_check style_check xmlgen
|
||||
.PHONY: help clean-all clean clean-spelling epub mobi rst html pdf spelling anchor_check style_check char_check xmlgen
|
||||
|
||||
# ------------------------------------------
|
||||
|
||||
@ -68,7 +67,6 @@ help:
|
||||
@echo "Please use \`make <target>' where <target> is one of"
|
||||
@echo " html create HTML pages in html dir"
|
||||
@echo " pdf create Manual.pdf in this dir"
|
||||
@echo " fetch fetch HTML and PDF files from LAMMPS web site"
|
||||
@echo " epub create ePUB format manual for e-book readers"
|
||||
@echo " mobi convert ePUB to MOBI format manual for e-book readers (e.g. Kindle)"
|
||||
@echo " (requires ebook-convert tool from calibre)"
|
||||
@ -185,13 +183,6 @@ pdf: xmlgen $(VENV) $(SPHINXCONFIG)/conf.py $(ANCHORCHECK)
|
||||
@rm -rf latex/PDF/.[sg]*
|
||||
@echo "Build finished. Manual.pdf is in this directory."
|
||||
|
||||
fetch:
|
||||
@rm -rf html_www Manual_www.pdf
|
||||
@curl -s -o Manual_www.pdf http://lammps.sandia.gov/doc/Manual.pdf
|
||||
@curl -s -o lammps-doc.tar.gz http://lammps.sandia.gov/tars/lammps-doc.tar.gz
|
||||
@tar xzf lammps-doc.tar.gz
|
||||
@rm -f lammps-doc.tar.gz
|
||||
|
||||
anchor_check : $(ANCHORCHECK)
|
||||
@(\
|
||||
. $(VENV)/bin/activate ;\
|
||||
@ -213,6 +204,9 @@ package_check : $(VENV)
|
||||
deactivate ;\
|
||||
)
|
||||
|
||||
char_check :
|
||||
@( env LC_ALL=C grep -n '[^ -~]' $(RSTDIR)/*.rst && exit 1 || : )
|
||||
|
||||
xmlgen : doxygen/xml/index.xml
|
||||
|
||||
doxygen/Doxyfile: doxygen/Doxyfile.in
|
||||
@ -236,9 +230,9 @@ $(VENV):
|
||||
)
|
||||
|
||||
$(MATHJAX):
|
||||
@git clone --depth 1 git://github.com/mathjax/MathJax.git $@
|
||||
@git clone -b 3.2.0 -c advice.detachedHead=0 --depth 1 git://github.com/mathjax/MathJax.git $@
|
||||
|
||||
$(TXT2RST) $(ANCHORCHECK): $(VENV)
|
||||
$(ANCHORCHECK): $(VENV)
|
||||
@( \
|
||||
. $(VENV)/bin/activate; \
|
||||
(cd utils/converters;\
|
||||
|
||||
13
doc/README
13
doc/README
@ -25,16 +25,11 @@ github-development-workflow.md notes on the LAMMPS development workflow
|
||||
include-file-conventions.md notes on LAMMPS' include file conventions
|
||||
documentation_conventions.md notes on writing documentation for LAMMPS
|
||||
|
||||
If you downloaded a LAMMPS tarball from lammps.sandia.gov, then the html
|
||||
If you downloaded a LAMMPS tarball from www.lammps.org, then the html
|
||||
folder and the PDF manual should be included. If you downloaded LAMMPS
|
||||
from GitHub then you either need to download them or build them.
|
||||
from GitHub then you either need to build them.
|
||||
|
||||
(a) You can "fetch" the current HTML and PDF files from the LAMMPS web
|
||||
site. Just type "make fetch". This should create a html_www directory
|
||||
and Manual_www.pdf file. These will always represent the latest published
|
||||
patch/development version of LAMMPS.
|
||||
|
||||
(b) You can build the HTML and PDF files yourself, by typing "make html"
|
||||
You can build the HTML and PDF files yourself, by typing "make html"
|
||||
or by "make pdf", respectively. This requires various tools and files.
|
||||
Some of them have to be installed (more on that below). For the rest the
|
||||
build process will attempt to download and install into a python virtual
|
||||
@ -78,4 +73,4 @@ the tool 'ebook-convert' from the 'calibre' e-book management software
|
||||
----------------
|
||||
|
||||
More details this can be found in the manual itself. The online
|
||||
version is at: https://lammps.sandia.gov/doc/Manual_build.html
|
||||
version is at: https://docs.lammps.org/Build_manual.html
|
||||
|
||||
@ -122,7 +122,7 @@ recorded compilation commands information when typing `make iwyu`.
|
||||
A lot of code predates the application of the rules in this document
|
||||
and the rules themselves are a moving target. So there are going to be
|
||||
significant chunks of code that do not fully comply. This applies
|
||||
for example to the USER-REAXC, or the USER-ATC package. The LAMMPS
|
||||
for example to the REAXFF, or the ATC package. The LAMMPS
|
||||
developers are dedicated to make an effort to improve the compliance
|
||||
and welcome volunteers wanting to help with the process.
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
.TH LAMMPS "8 April 2021" "2021-04-08"
|
||||
.TH LAMMPS "2 July 2021" "2021-07-2"
|
||||
.SH NAME
|
||||
.B LAMMPS
|
||||
\- Molecular Dynamics Simulator.
|
||||
@ -34,7 +34,7 @@ semiconductors) and coarse-grained or mesoscopic systems. It can be used to
|
||||
model atoms or, more generically, as a parallel particle simulator at the
|
||||
atomic, meso, or continuum scale.
|
||||
|
||||
See https://lammps.sandia.gov/ for more information and documentation.
|
||||
See https://www.lammps.org/ for more information and documentation.
|
||||
|
||||
.SH EXECUTABLE NAME
|
||||
The
|
||||
@ -135,7 +135,7 @@ For example "-pk gpu 2" is the same as "package gpu 2" in the input
|
||||
script. The possible styles and options are discussed in the
|
||||
.B LAMMPS
|
||||
manual for the "package" command. This switch can be used multiple
|
||||
times, e.g. to set options for the USER-INTEL and USER-OMP packages
|
||||
times, e.g. to set options for the INTEL and OPENMP packages
|
||||
when used together. Along with the "-sf" or "-suffix" switch, this
|
||||
is a convenient mechanism for invoking accelerator packages and their
|
||||
options without having to edit an input script.
|
||||
|
||||
@ -1129,6 +1129,9 @@ Bibliography
|
||||
**(Sutmann)**
|
||||
Sutmann, Arnold, Fahrenberger, et. al., Physical review / E 88(6), 063308 (2013)
|
||||
|
||||
**(Sutmann)** G. Sutmann. ScaFaCoS - a Scalable library of Fast Coulomb Solvers for particle Systems.
|
||||
In Bajaj, Zavattieri, Koslowski, Siegmund, Proceedings of the Society of Engineering Science 51st Annual Technical Meeting. 2014.
|
||||
|
||||
**(Swinburne)**
|
||||
Swinburne and Marinica, Physical Review Letters, 120, 1 (2018)
|
||||
|
||||
@ -1285,9 +1288,6 @@ Bibliography
|
||||
**(Wennberg)**
|
||||
Wennberg, Murtola, Hess, Lindahl, J Chem Theory Comput, 9, 3527 (2013).
|
||||
|
||||
**(Who)**
|
||||
Who, Author2, Author3, J of Long Range Solvers, 35, 164-177 (2012).
|
||||
|
||||
**(Wicaksono1)**
|
||||
Wicaksono, Sinclair, Militzer, Computational Materials Science, 117, 397-405 (2016).
|
||||
|
||||
|
||||
@ -90,7 +90,7 @@ standard. A more detailed discussion of that is below.
|
||||
directory, or ``make`` from the ``src/STUBS`` dir. If the build
|
||||
fails, you may need to edit the ``STUBS/Makefile`` for your
|
||||
platform. The stubs library does not provide MPI/IO functions
|
||||
required by some LAMMPS packages, e.g. ``MPIIO`` or ``USER-LB``,
|
||||
required by some LAMMPS packages, e.g. ``MPIIO`` or ``LATBOLTZ``,
|
||||
and thus is not compatible with those packages.
|
||||
|
||||
.. note::
|
||||
@ -120,19 +120,19 @@ self-installed MPICH or OpenMPI, so you should study the provided
|
||||
documentation to find out how to build and link with it.
|
||||
|
||||
The majority of OpenMP (threading) support in LAMMPS is provided by the
|
||||
``USER-OMP`` package; see the :doc:`Speed_omp`
|
||||
page for details. The ``USER-INTEL`` package also includes OpenMP
|
||||
threading (it is compatible with ``USER-OMP`` and will usually fall
|
||||
back on styles from that package, if a ``USER-INTEL`` does not exist)
|
||||
``OPENMP`` package; see the :doc:`Speed_omp`
|
||||
page for details. The ``INTEL`` package also includes OpenMP
|
||||
threading (it is compatible with ``OPENMP`` and will usually fall
|
||||
back on styles from that package, if a ``INTEL`` does not exist)
|
||||
and adds vectorization support when compiled with compatible compilers,
|
||||
in particular the Intel compilers on top of OpenMP. Also, the ``KOKKOS``
|
||||
package can be compiled to include OpenMP threading.
|
||||
|
||||
In addition, there are a few commands in LAMMPS that have native OpenMP
|
||||
support included as well. These are commands in the ``MPIIO``,
|
||||
``SNAP``, ``USER-DIFFRACTION``, and ``USER-DPD`` packages. In addition
|
||||
``ML-SNAP``, ``DIFFRACTION``, and ``DPD-REACT`` packages. In addition
|
||||
some packages support OpenMP threading indirectly through the libraries
|
||||
they interface to: e.g. ``LATTE``, ``KSPACE``, and ``USER-COLVARS``.
|
||||
they interface to: e.g. ``LATTE``, ``KSPACE``, and ``COLVARS``.
|
||||
See the :doc:`Packages details <Packages_details>` page for more
|
||||
info on these packages and the pages for their respective commands
|
||||
for OpenMP threading info.
|
||||
@ -176,7 +176,7 @@ performance. Vendor provided compilers for a specific hardware can
|
||||
produce faster code than open-source compilers like the GNU compilers.
|
||||
On the most common x86 hardware most popular C++ compilers are quite
|
||||
similar in performance of C/C++ code at high optimization levels. When
|
||||
using the ``USER-INTEL`` package, there is a distinct advantage in using
|
||||
using the ``INTEL`` package, there is a distinct advantage in using
|
||||
the `Intel C++ compiler <intel_>`_ due to much improved vectorization
|
||||
through SSE and AVX instructions on compatible hardware as the source
|
||||
code includes changes and Intel compiler specific directives to enable
|
||||
@ -325,9 +325,9 @@ LAMMPS.
|
||||
.. code-block:: bash
|
||||
|
||||
Makefile.opt # OPT package
|
||||
Makefile.omp # USER-OMP package
|
||||
Makefile.intel_cpu # USER-INTEL package for CPUs
|
||||
Makefile.intel_coprocessor # USER-INTEL package for KNLs
|
||||
Makefile.omp # OPENMP package
|
||||
Makefile.intel_cpu # INTEL package for CPUs
|
||||
Makefile.intel_coprocessor # INTEL package for KNLs
|
||||
Makefile.gpu # GPU package
|
||||
Makefile.kokkos_cuda_mpi # KOKKOS package for GPUs
|
||||
Makefile.kokkos_omp # KOKKOS package for CPUs (OpenMP)
|
||||
|
||||
@ -140,7 +140,7 @@ can be used several times in one command.
|
||||
For your convenience we provide :ref:`CMake presets <cmake_presets>`
|
||||
that combine multiple settings to enable optional LAMMPS packages or use
|
||||
a different compiler tool chain. Those are loaded with the *-C* flag
|
||||
(``-C ../cmake/presets/minimal.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
|
||||
``CMakeCache.txt`` file. It is also possible to customize the build
|
||||
by adding one or more *-D* flags to the CMake command line.
|
||||
|
||||
@ -28,6 +28,28 @@ variable VERBOSE set to 1:
|
||||
|
||||
----------
|
||||
|
||||
.. _clang-tidy:
|
||||
|
||||
Enable static code analysis with clang-tidy
|
||||
-------------------------------------------
|
||||
|
||||
The `clang-tidy tool <https://clang.llvm.org/extra/clang-tidy/>`_ is a
|
||||
static code analysis tool to diagnose (and potentially fix) typical
|
||||
programming errors or coding style violations. It has a modular framework
|
||||
of tests that can be adjusted to help identifying problems before they
|
||||
become bugs and also assist in modernizing large code bases (like LAMMPS).
|
||||
It can be enabled for all C++ code with the following CMake flag
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
-D ENABLE_CLANG_TIDY=value # value = no (default) or yes
|
||||
|
||||
With this flag enabled all source files will be processed twice, first to
|
||||
be compiled and then to be analyzed. Please note that the analysis can be
|
||||
significantly more time consuming than the compilation itself.
|
||||
|
||||
----------
|
||||
|
||||
.. _iwyu_processing:
|
||||
|
||||
Report missing and unneeded '#include' statements
|
||||
@ -288,7 +310,7 @@ and working.
|
||||
parameter needs to be adjusted. Typically a value around 1.0e-13
|
||||
can be used, but it may need to be as large as 1.0e-8 in some
|
||||
cases.
|
||||
- The tests for pair styles from OPT, USER-OMP and USER-INTEL are
|
||||
- The tests for pair styles from OPT, OPENMP and INTEL are
|
||||
performed with automatically rescaled epsilon to account for
|
||||
additional loss of precision from code optimizations and different
|
||||
summation orders.
|
||||
@ -323,7 +345,7 @@ and compared. If the fix is a thermostat and thus the internal property
|
||||
``t_target`` can be extracted, then this is compared to the reference
|
||||
data. The tests are repeated with the respa run style.
|
||||
|
||||
If the fix has a multi-threaded version in the USER-OMP package, then
|
||||
If the fix has a multi-threaded version in the OPENMP package, then
|
||||
the entire set of tests is repeated for that version as well.
|
||||
|
||||
For this to work, some additional conditions have to be met by the
|
||||
@ -447,12 +469,24 @@ The following options are available.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
make check-whitespace # generate coverage report in HTML format
|
||||
make fix-whitespace # generate coverage report in XML format
|
||||
make check-permissions # delete folder with HTML format coverage report
|
||||
make fix-permissions # delete all collected coverage data and HTML output
|
||||
make check-whitespace # search for files with whitespace issues
|
||||
make fix-whitespace # correct whitespace issues in files
|
||||
make check-homepage # search for files with old LAMMPS homepage URLs
|
||||
make fix-homepage # correct LAMMPS homepage URLs in files
|
||||
make check-permissions # search for files with permissions issues
|
||||
make fix-permissions # correct permissions issues in files
|
||||
|
||||
For the code in the ``unittest`` tree we are using the `clang-format`
|
||||
tool (Clang version 8.0 or later is required). If available, the source
|
||||
code files in the ``unittest`` tree can be updated to conform to the
|
||||
formatting settings using ``make format-tests``.
|
||||
For the code in the ``unittest`` and ``src`` trees we are transitioning
|
||||
to use the `clang-format` tool to assist with having a consistent source
|
||||
code style. The `clang-format` command bundled with Clang version 8.0
|
||||
or later is required. The configuration is in files ``.clang-format``
|
||||
in the respective folders. Since the modifications from `clang-format`
|
||||
can be significant and - especially for "legacy style code" - also is
|
||||
not always improving readability, a large number of files currently have
|
||||
a ``// clang-format off`` at the top, which will disable the processing.
|
||||
Over time, files will be refactored and updated to that `clang-format`
|
||||
may be applied to them (at least in part).
|
||||
|
||||
If `clang-format` is available, the source code files in the ``unittest``
|
||||
tree can be updated to conform to the formatting settings using
|
||||
``make format-tests`` and the files in ``src`` with ``make format-src``.
|
||||
|
||||
@ -37,29 +37,31 @@ This is the list of packages that may require additional steps.
|
||||
* :ref:`KOKKOS <kokkos>`
|
||||
* :ref:`LATTE <latte>`
|
||||
* :ref:`MESSAGE <message>`
|
||||
* :ref:`MLIAP <mliap>`
|
||||
* :ref:`ML-IAP <mliap>`
|
||||
* :ref:`MSCG <mscg>`
|
||||
* :ref:`OPT <opt>`
|
||||
* :ref:`POEMS <poems>`
|
||||
* :ref:`PYTHON <python>`
|
||||
* :ref:`VORONOI <voronoi>`
|
||||
* :ref:`USER-ADIOS <user-adios>`
|
||||
* :ref:`USER-ATC <user-atc>`
|
||||
* :ref:`USER-AWPMD <user-awpmd>`
|
||||
* :ref:`USER-COLVARS <user-colvars>`
|
||||
* :ref:`USER-H5MD <user-h5md>`
|
||||
* :ref:`USER-INTEL <user-intel>`
|
||||
* :ref:`USER-MESONT <user-mesont>`
|
||||
* :ref:`USER-MOLFILE <user-molfile>`
|
||||
* :ref:`USER-NETCDF <user-netcdf>`
|
||||
* :ref:`USER-PACE <user-pace>`
|
||||
* :ref:`USER-PLUMED <user-plumed>`
|
||||
* :ref:`USER-OMP <user-omp>`
|
||||
* :ref:`USER-QMMM <user-qmmm>`
|
||||
* :ref:`USER-QUIP <user-quip>`
|
||||
* :ref:`USER-SCAFACOS <user-scafacos>`
|
||||
* :ref:`USER-SMD <user-smd>`
|
||||
* :ref:`USER-VTK <user-vtk>`
|
||||
* :ref:`ADIOS <adios>`
|
||||
* :ref:`ATC <atc>`
|
||||
* :ref:`AWPMD <awpmd>`
|
||||
* :ref:`COLVARS <colvars>`
|
||||
* :ref:`H5MD <h5md>`
|
||||
* :ref:`ML-HDNNP <ml-hdnnp>`
|
||||
* :ref:`INTEL <intel>`
|
||||
* :ref:`MDI <mdi>`
|
||||
* :ref:`MESONT <mesont>`
|
||||
* :ref:`MOLFILE <molfile>`
|
||||
* :ref:`NETCDF <netcdf>`
|
||||
* :ref:`ML-PACE <ml-pace>`
|
||||
* :ref:`PLUMED <plumed>`
|
||||
* :ref:`OPENMP <openmp>`
|
||||
* :ref:`QMMM <qmmm>`
|
||||
* :ref:`ML-QUIP <ml-quip>`
|
||||
* :ref:`SCAFACOS <scafacos>`
|
||||
* :ref:`MACHDYN <machdyn>`
|
||||
* :ref:`VTK <vtk>`
|
||||
|
||||
----------
|
||||
|
||||
@ -72,7 +74,8 @@ To build with this package you must have the `zlib compression library
|
||||
<https://zlib.net>`_ available on your system to build dump styles with
|
||||
a '/gz' suffix. There are also styles using the
|
||||
`Zstandard <https://facebook.github.io/zstd/>`_ library which have a
|
||||
'/zstd' suffix.
|
||||
'/zstd' suffix. The zstd library version must be at least 1.4. Older
|
||||
versions use an incompatible API and thus LAMMPS will fail to compile.
|
||||
|
||||
.. tabs::
|
||||
|
||||
@ -455,6 +458,9 @@ They must be specified in uppercase.
|
||||
* - ZEN2
|
||||
- HOST
|
||||
- AMD Zen2 class CPU (AVX 2)
|
||||
* - ZEN3
|
||||
- HOST
|
||||
- AMD Zen3 class CPU (AVX 2)
|
||||
* - ARMV80
|
||||
- HOST
|
||||
- ARMv8.0 Compatible CPU
|
||||
@ -467,6 +473,9 @@ They must be specified in uppercase.
|
||||
* - ARMV8_THUNDERX2
|
||||
- HOST
|
||||
- ARMv8 Cavium ThunderX2 CPU
|
||||
* - A64FX
|
||||
- HOST
|
||||
- ARMv8.2 with SVE Support
|
||||
* - WSM
|
||||
- HOST
|
||||
- Intel Westmere CPU (SSE 4.2)
|
||||
@ -539,6 +548,9 @@ They must be specified in uppercase.
|
||||
* - AMPERE80
|
||||
- GPU
|
||||
- NVIDIA Ampere generation CC 8.0 GPU
|
||||
* - AMPERE86
|
||||
- GPU
|
||||
- NVIDIA Ampere generation CC 8.6 GPU
|
||||
* - VEGA900
|
||||
- GPU
|
||||
- AMD GPU MI25 GFX900
|
||||
@ -547,12 +559,12 @@ They must be specified in uppercase.
|
||||
- AMD GPU MI50/MI60 GFX906
|
||||
* - VEGA908
|
||||
- GPU
|
||||
- AMD GPU GFX908
|
||||
- AMD GPU MI100 GFX908
|
||||
* - INTEL_GEN
|
||||
- GPU
|
||||
- Intel GPUs Gen9+
|
||||
|
||||
This list was last updated for version 3.3 of the Kokkos library.
|
||||
This list was last updated for version 3.4.1 of the Kokkos library.
|
||||
|
||||
.. tabs::
|
||||
|
||||
@ -611,7 +623,7 @@ This list was last updated for version 3.3 of the Kokkos library.
|
||||
|
||||
mkdir build-kokkos-cuda
|
||||
cd build-kokkos-cuda
|
||||
cmake -C ../cmake/presets/minimal.cmake -C ../cmake/presets/kokkos-cuda.cmake ../cmake
|
||||
cmake -C ../cmake/presets/basic.cmake -C ../cmake/presets/kokkos-cuda.cmake ../cmake
|
||||
cmake --build .
|
||||
|
||||
.. tab:: Basic traditional make settings:
|
||||
@ -800,16 +812,17 @@ be installed on your system.
|
||||
|
||||
.. _mliap:
|
||||
|
||||
MLIAP package
|
||||
ML-IAP package
|
||||
---------------------------
|
||||
|
||||
Building the MLIAP package requires including the :ref:`SNAP <PKG-SNAP>`
|
||||
package. There will be an error message if this requirement is not satisfied.
|
||||
Using the *mliappy* model also requires enabling Python support, which
|
||||
in turn requires the :ref:`PYTHON <PKG-PYTHON>`
|
||||
package **and** requires you have the `cython <https://cython.org>`_ software
|
||||
installed and with it a working ``cythonize`` command. This feature requires
|
||||
compiling LAMMPS with Python version 3.6 or later.
|
||||
Building the ML-IAP package requires including the :ref:`ML-SNAP
|
||||
<PKG-ML-SNAP>` package. There will be an error message if this requirement
|
||||
is not satisfied. Using the *mliappy* model also requires enabling
|
||||
Python support, which in turn requires to include the :ref:`PYTHON
|
||||
<PKG-PYTHON>` package **and** requires to have the `cython
|
||||
<https://cython.org>`_ software installed and with it a working
|
||||
``cythonize`` command. This feature requires compiling LAMMPS with
|
||||
Python version 3.6 or later.
|
||||
|
||||
.. tabs::
|
||||
|
||||
@ -823,9 +836,9 @@ compiling LAMMPS with Python version 3.6 or later.
|
||||
suitable Python version and the ``cythonize`` command and choose
|
||||
the default accordingly. During the build procedure the provided
|
||||
.pyx file(s) will be automatically translated to C++ code and compiled.
|
||||
Please do **not** run ``cythonize`` manually in the ``src/MLIAP`` folder,
|
||||
Please do **not** run ``cythonize`` manually in the ``src/ML-IAP`` folder,
|
||||
as that can lead to compilation errors if Python support is not enabled.
|
||||
If you did by accident, please remove the generated .cpp and .h files.
|
||||
If you did it by accident, please remove the generated .cpp and .h files.
|
||||
|
||||
.. tab:: Traditional make
|
||||
|
||||
@ -834,15 +847,16 @@ compiling LAMMPS with Python version 3.6 or later.
|
||||
the ``cythonize`` command in case the corresponding .pyx file(s) were
|
||||
modified. You may need to modify ``lib/python/Makefile.lammps``
|
||||
if the LAMMPS build fails.
|
||||
To manually enforce building MLIAP with Python support enabled,
|
||||
you can add
|
||||
``-DMLIAP_PYTHON`` to the ``LMP_INC`` variable in your machine makefile.
|
||||
You may have to manually run the ``cythonize`` command on .pyx file(s)
|
||||
in the ``src`` folder, if this is not automatically done during
|
||||
installing the MLIAP package. Please do **not** run ``cythonize``
|
||||
in the ``src/MLIAP`` folder, as that can lead to compilation errors
|
||||
if Python support is not enabled.
|
||||
If you did by accident, please remove the generated .cpp and .h files.
|
||||
|
||||
To enable building the ML-IAP package with Python support enabled,
|
||||
you need to add ``-DMLIAP_PYTHON`` to the ``LMP_INC`` variable in
|
||||
your machine makefile. You may have to manually run the
|
||||
``cythonize`` command on .pyx file(s) in the ``src`` folder, if
|
||||
this is not automatically done during installing the ML-IAP
|
||||
package. Please do **not** run ``cythonize`` in the ``src/ML-IAP``
|
||||
folder, as that can lead to compilation errors if Python support
|
||||
is not enabled. If you did this by accident, please remove the
|
||||
generated .cpp and .h files.
|
||||
|
||||
----------
|
||||
|
||||
@ -1043,12 +1057,12 @@ binary package provided by your operating system.
|
||||
|
||||
----------
|
||||
|
||||
.. _user-adios:
|
||||
.. _adios:
|
||||
|
||||
USER-ADIOS package
|
||||
ADIOS package
|
||||
-----------------------------------
|
||||
|
||||
The USER-ADIOS package requires the `ADIOS I/O library
|
||||
The ADIOS package requires the `ADIOS I/O library
|
||||
<https://github.com/ornladios/ADIOS2>`_, version 2.3.1 or newer. Make
|
||||
sure that you have ADIOS built either with or without MPI to match if
|
||||
you build LAMMPS with or without MPI. ADIOS compilation settings for
|
||||
@ -1064,38 +1078,38 @@ systems.
|
||||
.. code-block:: bash
|
||||
|
||||
-D ADIOS2_DIR=path # path is where ADIOS 2.x is installed
|
||||
-D PKG_USER-ADIOS=yes
|
||||
-D PKG_ADIOS=yes
|
||||
|
||||
.. tab:: Traditional make
|
||||
|
||||
Turn on the USER-ADIOS package before building LAMMPS. If the
|
||||
Turn on the ADIOS package before building LAMMPS. If the
|
||||
ADIOS 2.x software is installed in PATH, there is nothing else to
|
||||
do:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ make yes-user-adios
|
||||
$ make yes-adios
|
||||
|
||||
otherwise, set ADIOS2_DIR environment variable when turning on the package:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ ADIOS2_DIR=path make yes-user-adios # path is where ADIOS 2.x is installed
|
||||
$ ADIOS2_DIR=path make yes-adios # path is where ADIOS 2.x is installed
|
||||
|
||||
----------
|
||||
|
||||
.. _user-atc:
|
||||
.. _atc:
|
||||
|
||||
USER-ATC package
|
||||
ATC package
|
||||
-------------------------------
|
||||
|
||||
The USER-ATC package requires the MANYBODY package also be installed.
|
||||
The ATC package requires the MANYBODY package also be installed.
|
||||
|
||||
.. tabs::
|
||||
|
||||
.. tab:: CMake build
|
||||
|
||||
No additional settings are needed besides ``-D PKG_USER-ATC=yes``
|
||||
No additional settings are needed besides ``-D PKG_ATC=yes``
|
||||
and ``-D PKG_MANYBODY=yes``.
|
||||
|
||||
.. tab:: Traditional make
|
||||
@ -1138,16 +1152,16 @@ The USER-ATC package requires the MANYBODY package also be installed.
|
||||
|
||||
----------
|
||||
|
||||
.. _user-awpmd:
|
||||
.. _awpmd:
|
||||
|
||||
USER-AWPMD package
|
||||
AWPMD package
|
||||
------------------
|
||||
|
||||
.. tabs::
|
||||
|
||||
.. tab:: CMake build
|
||||
|
||||
No additional settings are needed besides ``-D PKG_USER-AQPMD=yes``.
|
||||
No additional settings are needed besides ``-D PKG_AQPMD=yes``.
|
||||
|
||||
.. tab:: Traditional make
|
||||
|
||||
@ -1189,9 +1203,9 @@ USER-AWPMD package
|
||||
|
||||
----------
|
||||
|
||||
.. _user-colvars:
|
||||
.. _colvars:
|
||||
|
||||
USER-COLVARS package
|
||||
COLVARS package
|
||||
---------------------------------------
|
||||
|
||||
This package includes the `Colvars library
|
||||
@ -1205,7 +1219,7 @@ be built for the most part with all major versions of the C++ language.
|
||||
|
||||
This is the recommended build procedure for using Colvars in
|
||||
LAMMPS. No additional settings are normally needed besides
|
||||
``-D PKG_USER-COLVARS=yes``.
|
||||
``-D PKG_COLVARS=yes``.
|
||||
|
||||
.. tab:: Traditional make
|
||||
|
||||
@ -1248,9 +1262,9 @@ be built for the most part with all major versions of the C++ language.
|
||||
|
||||
----------
|
||||
|
||||
.. _user-pace:
|
||||
.. _ml-pace:
|
||||
|
||||
USER-PACE package
|
||||
ML-PACE package
|
||||
-----------------------------
|
||||
|
||||
This package requires a library that can be downloaded and built
|
||||
@ -1263,8 +1277,8 @@ at: `https://github.com/ICAMS/lammps-user-pace/ <https://github.com/ICAMS/lammps
|
||||
.. tab:: CMake build
|
||||
|
||||
By default the library will be downloaded from the git repository
|
||||
and built automatically when the USER-PACE package is enabled with
|
||||
``-D PKG_USER-PACE=yes``. The location for the sources may be
|
||||
and built automatically when the ML-PACE package is enabled with
|
||||
``-D PKG_ML-PACE=yes``. The location for the sources may be
|
||||
customized by setting the variable ``PACELIB_URL`` when
|
||||
configuring with CMake (e.g. to use a local archive on machines
|
||||
without internet access). Since CMake checks the validity of the
|
||||
@ -1275,7 +1289,7 @@ at: `https://github.com/ICAMS/lammps-user-pace/ <https://github.com/ICAMS/lammps
|
||||
|
||||
.. tab:: Traditional make
|
||||
|
||||
You can download and build the USER-PACE library
|
||||
You can download and build the ML-PACE library
|
||||
in one step from the ``lammps/src`` dir, using these commands,
|
||||
which invoke the ``lib/pace/Install.py`` script.
|
||||
|
||||
@ -1288,9 +1302,9 @@ at: `https://github.com/ICAMS/lammps-user-pace/ <https://github.com/ICAMS/lammps
|
||||
|
||||
----------
|
||||
|
||||
.. _user-plumed:
|
||||
.. _plumed:
|
||||
|
||||
USER-PLUMED package
|
||||
PLUMED package
|
||||
-------------------------------------
|
||||
|
||||
.. _plumedinstall: https://plumed.github.io/doc-master/user-doc/html/_installation.html
|
||||
@ -1298,7 +1312,7 @@ USER-PLUMED package
|
||||
Before building LAMMPS with this package, you must first build PLUMED.
|
||||
PLUMED can be built as part of the LAMMPS build or installed separately
|
||||
from LAMMPS using the generic `PLUMED installation instructions <plumedinstall_>`_.
|
||||
The USER-PLUMED package has been tested to work with Plumed versions
|
||||
The PLUMED package has been tested to work with Plumed versions
|
||||
2.4.x, 2.5.x, and 2.6.x and will error out, when trying to run calculations
|
||||
with a different version of the Plumed kernel.
|
||||
|
||||
@ -1334,7 +1348,7 @@ LAMMPS build.
|
||||
|
||||
.. tab:: CMake build
|
||||
|
||||
When the ``-D PKG_USER-PLUMED=yes`` flag is included in the cmake
|
||||
When the ``-D PKG_PLUMED=yes`` flag is included in the cmake
|
||||
command you must ensure that GSL is installed in locations that
|
||||
are specified in your environment. There are then two additional
|
||||
variables that control the manner in which PLUMED is obtained and
|
||||
@ -1367,7 +1381,7 @@ LAMMPS build.
|
||||
|
||||
.. tab:: Traditional make
|
||||
|
||||
PLUMED needs to be installed before the USER-PLUMED package is
|
||||
PLUMED needs to be installed before the PLUMED package is
|
||||
installed so that LAMMPS can find the right settings when
|
||||
compiling and linking the LAMMPS executable. You can either
|
||||
download and build PLUMED inside the LAMMPS plumed library folder
|
||||
@ -1392,12 +1406,12 @@ LAMMPS build.
|
||||
build to use. A new file ``lib/plumed/Makefile.lammps`` is also
|
||||
created with settings suitable for LAMMPS to compile and link
|
||||
PLUMED using the desired linkage mode. After this step is
|
||||
completed, you can install the USER-PLUMED package and compile
|
||||
completed, you can install the PLUMED package and compile
|
||||
LAMMPS in the usual manner:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ make yes-user-plumed
|
||||
$ make yes-plumed
|
||||
$ make machine
|
||||
|
||||
Once this compilation completes you should be able to run LAMMPS
|
||||
@ -1412,15 +1426,15 @@ LAMMPS build.
|
||||
|
||||
If you want to change the linkage mode, you have to re-run "make
|
||||
lib-plumed" with the desired settings **and** do a re-install if
|
||||
the USER-PLUMED package with "make yes-user-plumed" to update the
|
||||
the PLUMED package with "make yes-plumed" to update the
|
||||
required makefile settings with the changes in the lib/plumed
|
||||
folder.
|
||||
|
||||
----------
|
||||
|
||||
.. _user-h5md:
|
||||
.. _h5md:
|
||||
|
||||
USER-H5MD package
|
||||
H5MD package
|
||||
---------------------------------
|
||||
|
||||
To build with this package you must have the HDF5 software package
|
||||
@ -1431,7 +1445,7 @@ the HDF5 library.
|
||||
|
||||
.. tab:: CMake build
|
||||
|
||||
No additional settings are needed besides ``-D PKG_USER-H5MD=yes``.
|
||||
No additional settings are needed besides ``-D PKG_H5MD=yes``.
|
||||
|
||||
This should auto-detect the H5MD library on your system. Several
|
||||
advanced CMake H5MD options exist if you need to specify where it
|
||||
@ -1463,24 +1477,78 @@ the HDF5 library.
|
||||
|
||||
----------
|
||||
|
||||
.. _user-intel:
|
||||
.. _ml-hdnnp:
|
||||
|
||||
USER-INTEL package
|
||||
ML-HDNNP package
|
||||
----------------
|
||||
|
||||
To build with the ML-HDNNP package it is required to download and build the
|
||||
external `n2p2 <https://github.com/CompPhysVienna/n2p2>`_ library ``v2.1.4``
|
||||
(or higher). The LAMMPS build process offers an automatic download and
|
||||
compilation of *n2p2* or allows you to choose the installation directory of
|
||||
*n2p2* manually. Please see the boxes below for the CMake and traditional build
|
||||
system for detailed information.
|
||||
|
||||
In case of a manual installation of *n2p2* you only need to build the *n2p2* core
|
||||
library ``libnnp`` and interface library ``libnnpif``. When using GCC it should
|
||||
suffice to execute ``make libnnpif`` in the *n2p2* ``src`` directory. For more
|
||||
details please see ``lib/hdnnp/README`` and the `n2p2 build documentation
|
||||
<https://compphysvienna.github.io/n2p2/topics/build.html>`_.
|
||||
|
||||
.. tabs::
|
||||
|
||||
.. tab:: CMake build
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
-D DOWNLOAD_N2P2=value # download n2p2 for build, value = no (default) or yes
|
||||
-D N2P2_DIR=path # n2p2 base directory (only needed if a custom location)
|
||||
|
||||
If ``DOWNLOAD_N2P2`` is set, the *n2p2* library will be downloaded and
|
||||
built inside the CMake build directory. If the *n2p2* library is already
|
||||
on your system (in a location CMake cannot find it), set the ``N2P2_DIR``
|
||||
to path where *n2p2* is located. If *n2p2* is located directly in
|
||||
``lib/hdnnp/n2p2`` it will be automatically found by CMake.
|
||||
|
||||
.. tab:: Traditional make
|
||||
|
||||
You can download and build the *n2p2* library manually if you prefer;
|
||||
follow the instructions in ``lib/hdnnp/README``\ . You can also do it in
|
||||
one step from the ``lammps/src`` dir, using a command like these, which
|
||||
simply invoke the ``lib/hdnnp/Install.py`` script with the specified args:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ make lib-hdnnp # print help message
|
||||
$ make lib-hdnnp args="-b" # download and build in lib/hdnnp/n2p2-...
|
||||
$ make lib-hdnnp args="-b -v 2.1.4" # download and build specific version
|
||||
$ make lib-hdnnp args="-p /usr/local/n2p2" # use the existing n2p2 installation in /usr/local/n2p2
|
||||
|
||||
Note that 3 symbolic (soft) links, ``includelink``, ``liblink`` and
|
||||
``Makefile.lammps``, will be created in ``lib/hdnnp`` to point to
|
||||
``n2p2/include``, ``n2p2/lib`` and ``n2p2/lib/Makefile.lammps-extra``,
|
||||
respectively. When LAMMPS is built in ``src`` it will use these links.
|
||||
|
||||
----------
|
||||
|
||||
.. _intel:
|
||||
|
||||
INTEL package
|
||||
-----------------------------------
|
||||
|
||||
To build with this package, you must choose which hardware you want to
|
||||
build for, either x86 CPUs or Intel KNLs in offload mode. You should
|
||||
also typically :ref:`install the USER-OMP package <user-omp>`, as it can be
|
||||
used in tandem with the USER-INTEL package to good effect, as explained
|
||||
also typically :ref:`install the OPENMP package <openmp>`, as it can be
|
||||
used in tandem with the INTEL package to good effect, as explained
|
||||
on the :doc:`Speed_intel` page.
|
||||
|
||||
When using Intel compilers version 16.0 or later is required. You can
|
||||
also use the GNU or Clang compilers and they will provide performance
|
||||
improvements over regular styles and USER-OMP styles, but less so than
|
||||
improvements over regular styles and OPENMP styles, but less so than
|
||||
with the Intel compilers. Please also note, that some compilers have
|
||||
been found to apply memory alignment constraints incompletely or
|
||||
incorrectly and thus can cause segmentation faults in otherwise correct
|
||||
code when using features from the USER-INTEL package.
|
||||
code when using features from the INTEL package.
|
||||
|
||||
|
||||
.. tabs::
|
||||
@ -1497,7 +1565,7 @@ code when using features from the USER-INTEL package.
|
||||
Choose which hardware to compile for in Makefile.machine via the
|
||||
following settings. See ``src/MAKE/OPTIONS/Makefile.intel_cpu*``
|
||||
and ``Makefile.knl`` files for examples. and
|
||||
``src/USER-INTEL/README`` for additional information.
|
||||
``src/INTEL/README`` for additional information.
|
||||
|
||||
For CPUs:
|
||||
|
||||
@ -1533,9 +1601,38 @@ TBB and MKL.
|
||||
|
||||
----------
|
||||
|
||||
.. _user-mesont:
|
||||
.. _mdi:
|
||||
|
||||
USER-MESONT package
|
||||
MDI package
|
||||
-----------------------------
|
||||
|
||||
.. tabs::
|
||||
|
||||
.. tab:: CMake build
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
-D DOWNLOAD_MDI=value # download MDI Library for build, value = no (default) or yes
|
||||
|
||||
.. tab:: Traditional make
|
||||
|
||||
Before building LAMMPS, you must build the MDI Library in
|
||||
``lib/mdi``\ . You can do this by executing a command like one
|
||||
of the following from the ``lib/mdi`` directory:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ python Install.py -m gcc # build using gcc compiler
|
||||
$ python Install.py -m icc # build using icc compiler
|
||||
|
||||
The build should produce two files: ``lib/mdi/includelink/mdi.h``
|
||||
and ``lib/mdi/liblink/libmdi.so``\ .
|
||||
|
||||
----------
|
||||
|
||||
.. _mesont:
|
||||
|
||||
MESONT package
|
||||
-------------------------
|
||||
|
||||
This package includes a library written in Fortran 90 in the
|
||||
@ -1548,7 +1645,7 @@ they will be downloaded the first time this package is installed.
|
||||
|
||||
.. tab:: CMake build
|
||||
|
||||
No additional settings are needed besides ``-D PKG_USER-MESONT=yes``
|
||||
No additional settings are needed besides ``-D PKG_MESONT=yes``
|
||||
|
||||
.. tab:: Traditional make
|
||||
|
||||
@ -1575,9 +1672,9 @@ they will be downloaded the first time this package is installed.
|
||||
|
||||
----------
|
||||
|
||||
.. _user-molfile:
|
||||
.. _molfile:
|
||||
|
||||
USER-MOLFILE package
|
||||
MOLFILE package
|
||||
---------------------------------------
|
||||
|
||||
.. tabs::
|
||||
@ -1587,9 +1684,9 @@ USER-MOLFILE package
|
||||
.. code-block:: bash
|
||||
|
||||
-D MOLFILE_INCLUDE_DIR=path # (optional) path where VMD molfile plugin headers are installed
|
||||
-D PKG_USER-MOLFILE=yes
|
||||
-D PKG_MOLFILE=yes
|
||||
|
||||
Using ``-D PKG_USER-MOLFILE=yes`` enables the package, and setting
|
||||
Using ``-D PKG_MOLFILE=yes`` enables the package, and setting
|
||||
``-D MOLFILE_INCLUDE_DIR`` allows to provide a custom location for
|
||||
the molfile plugin header files. These should match the ABI of the
|
||||
plugin files used, and thus one typically sets them to include
|
||||
@ -1613,9 +1710,9 @@ USER-MOLFILE package
|
||||
|
||||
----------
|
||||
|
||||
.. _user-netcdf:
|
||||
.. _netcdf:
|
||||
|
||||
USER-NETCDF package
|
||||
NETCDF package
|
||||
-------------------------------------
|
||||
|
||||
To build with this package you must have the NetCDF library installed
|
||||
@ -1625,7 +1722,7 @@ on your system.
|
||||
|
||||
.. tab:: CMake build
|
||||
|
||||
No additional settings are needed besides ``-D PKG_USER-NETCDF=yes``.
|
||||
No additional settings are needed besides ``-D PKG_NETCDF=yes``.
|
||||
|
||||
This should auto-detect the NETCDF library if it is installed on
|
||||
your system at standard locations. Several advanced CMake NETCDF
|
||||
@ -1644,9 +1741,9 @@ on your system.
|
||||
|
||||
----------
|
||||
|
||||
.. _user-omp:
|
||||
.. _openmp:
|
||||
|
||||
USER-OMP package
|
||||
OPENMP package
|
||||
-------------------------------
|
||||
|
||||
.. tabs::
|
||||
@ -1654,13 +1751,13 @@ USER-OMP package
|
||||
.. tab:: CMake build
|
||||
|
||||
No additional settings are required besides ``-D
|
||||
PKG_USER-OMP=yes``. If CMake detects OpenMP compiler support, the
|
||||
USER-OMP code will be compiled with multi-threading support
|
||||
PKG_OPENMP=yes``. If CMake detects OpenMP compiler support, the
|
||||
OPENMP code will be compiled with multi-threading support
|
||||
enabled, otherwise as optimized serial code.
|
||||
|
||||
.. tab:: Traditional make
|
||||
|
||||
To enable multi-threading support in the USER-OMP package (and
|
||||
To enable multi-threading support in the OPENMP package (and
|
||||
other styles supporting OpenMP) the following compile and link
|
||||
flags must be added to your Makefile.machine file. See
|
||||
``src/MAKE/OPTIONS/Makefile.omp`` for an example.
|
||||
@ -1677,12 +1774,12 @@ USER-OMP package
|
||||
|
||||
----------
|
||||
|
||||
.. _user-qmmm:
|
||||
.. _qmmm:
|
||||
|
||||
USER-QMMM package
|
||||
QMMM package
|
||||
---------------------------------
|
||||
|
||||
For using LAMMPS to do QM/MM simulations via the USER-QMMM package you
|
||||
For using LAMMPS to do QM/MM simulations via the QMMM package you
|
||||
need to build LAMMPS as a library. A LAMMPS executable with :doc:`fix
|
||||
qmmm <fix_qmmm>` included can be built, but will not be able to do a
|
||||
QM/MM simulation on as such. You must also build a QM code - currently
|
||||
@ -1705,11 +1802,11 @@ verified to work in February 2020 with Quantum Espresso versions 6.3 to
|
||||
libqmmm.a) are not included in the static LAMMPS library and
|
||||
(currently) not installed, while their code is included in the
|
||||
shared LAMMPS library. Thus a typical command line to configure
|
||||
building LAMMPS for USER-QMMM would be:
|
||||
building LAMMPS for QMMM would be:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
cmake -C ../cmake/presets/minimal.cmake -D PKG_USER-QMMM=yes \
|
||||
cmake -C ../cmake/presets/basic.cmake -D PKG_QMMM=yes \
|
||||
-D BUILD_LIB=yes -DBUILD_SHARED_LIBS=yes ../cmake
|
||||
|
||||
After completing the LAMMPS build and also configuring and
|
||||
@ -1752,9 +1849,9 @@ verified to work in February 2020 with Quantum Espresso versions 6.3 to
|
||||
|
||||
----------
|
||||
|
||||
.. _user-quip:
|
||||
.. _ml-quip:
|
||||
|
||||
USER-QUIP package
|
||||
ML-QUIP package
|
||||
---------------------------------
|
||||
|
||||
To build with this package, you must download and build the QUIP
|
||||
@ -1772,7 +1869,7 @@ to be downloaded and configured. See step 1 and step 1.1 in the
|
||||
-D QUIP_LIBRARY=path # path to libquip.a (only needed if a custom location)
|
||||
|
||||
CMake will **not** download and build the QUIP library. But once you have
|
||||
done that, a CMake build of LAMMPS with ``-D PKG_USER-QUIP=yes`` should
|
||||
done that, a CMake build of LAMMPS with ``-D PKG_ML-QUIP=yes`` should
|
||||
work. Set the ``QUIP_LIBRARY`` variable if CMake cannot find the QUIP library.
|
||||
|
||||
.. tab:: Traditional make
|
||||
@ -1787,9 +1884,9 @@ to be downloaded and configured. See step 1 and step 1.1 in the
|
||||
|
||||
----------
|
||||
|
||||
.. _user-scafacos:
|
||||
.. _scafacos:
|
||||
|
||||
USER-SCAFACOS package
|
||||
SCAFACOS package
|
||||
-----------------------------------------
|
||||
|
||||
To build with this package, you must download and build the
|
||||
@ -1834,9 +1931,9 @@ To build with this package, you must download and build the
|
||||
|
||||
----------
|
||||
|
||||
.. _user-smd:
|
||||
.. _machdyn:
|
||||
|
||||
USER-SMD package
|
||||
MACHDYN package
|
||||
-------------------------------
|
||||
|
||||
To build with this package, you must download the Eigen3 library.
|
||||
@ -1878,9 +1975,9 @@ Eigen3 is a template library, so you do not need to build it.
|
||||
|
||||
----------
|
||||
|
||||
.. _user-vtk:
|
||||
.. _vtk:
|
||||
|
||||
USER-VTK package
|
||||
VTK package
|
||||
-------------------------------
|
||||
|
||||
To build with this package you must have the VTK library installed on
|
||||
@ -1890,7 +1987,7 @@ your system.
|
||||
|
||||
.. tab:: CMake build
|
||||
|
||||
No additional settings are needed besides ``-D PKG_USER-VTK=yes``.
|
||||
No additional settings are needed besides ``-D PKG_VTK=yes``.
|
||||
|
||||
This should auto-detect the VTK library if it is installed on your
|
||||
system at standard locations. Several advanced VTK options exist
|
||||
|
||||
@ -117,10 +117,10 @@ settings may become outdated:
|
||||
|
||||
make mac # build serial LAMMPS on a Mac
|
||||
make mac_mpi # build parallel LAMMPS on a Mac
|
||||
make intel_cpu # build with the USER-INTEL package optimized for CPUs
|
||||
make knl # build with the USER-INTEL package optimized for KNLs
|
||||
make intel_cpu # build with the INTEL package optimized for CPUs
|
||||
make knl # build with the INTEL package optimized for KNLs
|
||||
make opt # build with the OPT package optimized for CPUs
|
||||
make omp # build with the USER-OMP package optimized for OpenMP
|
||||
make omp # build with the OPENMP package optimized for OpenMP
|
||||
make kokkos_omp # build with the KOKKOS package for OpenMP
|
||||
make kokkos_cuda_mpi # build with the KOKKOS package for GPUs
|
||||
make kokkos_phi # build with the KOKKOS package for KNLs
|
||||
|
||||
@ -28,29 +28,18 @@ If you downloaded LAMMPS as a tarball from `the LAMMPS website <lws_>`_,
|
||||
the html folder and the PDF files should be included.
|
||||
|
||||
If you downloaded LAMMPS from the public git repository, then the HTML
|
||||
and PDF files are not included. Instead you need to create them, in one
|
||||
of two ways:
|
||||
|
||||
a. You can "fetch" the current HTML and PDF files from the LAMMPS web
|
||||
site. Just type ``make fetch``. This should download a ``html_www``
|
||||
directory and a ``Manual_www.pdf`` file. Note that if new LAMMPS features
|
||||
have been added more recently than the date of your LAMMPS version, the
|
||||
fetched documentation will include those changes (but your source code
|
||||
will not, unless you update your local repository).
|
||||
|
||||
b. You can build the HTML or PDF files yourself, by typing ``make html``
|
||||
or ``make pdf`` in the ``doc`` folder. This requires various tools
|
||||
and files. Some of them have to be installed (see below). For the
|
||||
rest the build process will attempt to download and install them into
|
||||
a python virtual environment and local folders.
|
||||
and PDF files are not included. You can build the HTML or PDF files yourself,
|
||||
by typing ``make html`` or ``make pdf`` in the ``doc`` folder. This requires
|
||||
various tools and files. Some of them have to be installed (see below). For
|
||||
the rest the build process will attempt to download and install them into
|
||||
a python virtual environment and local folders.
|
||||
|
||||
A current version of the manual (latest patch release, aka unstable
|
||||
branch) is is available online at:
|
||||
`https://lammps.sandia.gov/doc/Manual.html
|
||||
<https://lammps.sandia.gov/doc/Manual.html>`_ A version of the manual
|
||||
corresponding to the ongoing development (aka master branch) is
|
||||
available online at: `https://docs.lammps.org/
|
||||
<https://docs.lammps.org/>`_
|
||||
`https://docs.lammps.org/Manual.html <https://docs.lammps.org/Manual.html>`_.
|
||||
A version of the manual corresponding to the ongoing development (aka master branch)
|
||||
is available online at: `https://docs.lammps.org/latest/
|
||||
<https://docs.lammps.org/latest/>`_
|
||||
|
||||
Build using GNU make
|
||||
--------------------
|
||||
@ -215,7 +204,7 @@ be multiple tests run automatically:
|
||||
|
||||
.. parsed-literal::
|
||||
|
||||
Found 33 standard and 41 user packages
|
||||
Found 74 packages
|
||||
Standard package NEWPACKAGE missing in Packages_standard.rst
|
||||
Standard package NEWPACKAGE missing in Packages_details.rst
|
||||
|
||||
@ -257,4 +246,4 @@ the file ``lammps/doc/utils/sphinx-config/false_positives.txt``.
|
||||
|
||||
.. _rst: https://docutils.readthedocs.io/en/sphinx-docs/user/rst/quickstart.html
|
||||
|
||||
.. _lws: https://lammps.sandia.gov
|
||||
.. _lws: https://www.lammps.org
|
||||
|
||||
@ -30,17 +30,37 @@ steps, as explained on the :doc:`Build extras <Build_extras>` page.
|
||||
These links take you to the extra instructions for those select
|
||||
packages:
|
||||
|
||||
+--------------------------------------+--------------------------------+------------------------------------+------------------------------+--------------------------------+--------------------------------------+
|
||||
| :ref:`COMPRESS <compress>` | :ref:`GPU <gpu>` | :ref:`KIM <kim>` | :ref:`KOKKOS <kokkos>` | :ref:`LATTE <latte>` | :ref:`MESSAGE <message>` |
|
||||
+--------------------------------------+--------------------------------+------------------------------------+------------------------------+--------------------------------+--------------------------------------+
|
||||
| :ref:`MSCG <mscg>` | :ref:`OPT <opt>` | :ref:`POEMS <poems>` | :ref:`PYTHON <python>` | :ref:`VORONOI <voronoi>` | :ref:`USER-ADIOS <user-adios>` |
|
||||
+--------------------------------------+--------------------------------+------------------------------------+------------------------------+--------------------------------+--------------------------------------+
|
||||
| :ref:`USER-ATC <user-atc>` | :ref:`USER-AWPMD <user-awpmd>` | :ref:`USER-COLVARS <user-colvars>` | :ref:`USER-H5MD <user-h5md>` | :ref:`USER-INTEL <user-intel>` | :ref:`USER-MOLFILE <user-molfile>` |
|
||||
+--------------------------------------+--------------------------------+------------------------------------+------------------------------+--------------------------------+--------------------------------------+
|
||||
| :ref:`USER-NETCDF <user-netcdf>` | :ref:`USER-PACE <user-pace>` | :ref:`USER-PLUMED <user-plumed>` | :ref:`USER-OMP <user-omp>` | :ref:`USER-QMMM <user-qmmm>` | :ref:`USER-QUIP <user-quip>` |
|
||||
+--------------------------------------+--------------------------------+------------------------------------+------------------------------+--------------------------------+--------------------------------------+
|
||||
| :ref:`USER-SCAFACOS <user-scafacos>` | :ref:`USER-SMD <user-smd>` | :ref:`USER-VTK <user-vtk>` | | | |
|
||||
+--------------------------------------+--------------------------------+------------------------------------+------------------------------+--------------------------------+--------------------------------------+
|
||||
.. table_from_list::
|
||||
:columns: 6
|
||||
|
||||
* :ref:`ADIOS <adios>`
|
||||
* :ref:`ATC <atc>`
|
||||
* :ref:`AWPMD <awpmd>`
|
||||
* :ref:`COLVARS <colvars>`
|
||||
* :ref:`COMPRESS <compress>`
|
||||
* :ref:`GPU <gpu>`
|
||||
* :ref:`H5MD <h5md>`
|
||||
* :ref:`INTEL <intel>`
|
||||
* :ref:`KIM <kim>`
|
||||
* :ref:`KOKKOS <kokkos>`
|
||||
* :ref:`LATTE <latte>`
|
||||
* :ref:`MACHDYN <machdyn>`
|
||||
* :ref:`MESSAGE <message>`
|
||||
* :ref:`ML-HDNNP <ml-hdnnp>`
|
||||
* :ref:`ML-PACE <ml-pace>`
|
||||
* :ref:`ML-QUIP <ml-quip>`
|
||||
* :ref:`MOLFILE <molfile>`
|
||||
* :ref:`MSCG <mscg>`
|
||||
* :ref:`NETCDF <netcdf>`
|
||||
* :ref:`OPENMP <openmp>`
|
||||
* :ref:`OPT <opt>`
|
||||
* :ref:`PLUMED <plumed>`
|
||||
* :ref:`POEMS <poems>`
|
||||
* :ref:`PYTHON <python>`
|
||||
* :ref:`QMMM <qmmm>`
|
||||
* :ref:`SCAFACOS <scafacos>`
|
||||
* :ref:`VORONOI <voronoi>`
|
||||
* :ref:`VTK <vtk>`
|
||||
|
||||
The mechanism for including packages is simple but different for CMake
|
||||
versus make.
|
||||
@ -58,14 +78,10 @@ versus make.
|
||||
.. code-block:: csh
|
||||
|
||||
-D PKG_MANYBODY=yes
|
||||
-D PKG_USER-INTEL=yes
|
||||
-D PKG_INTEL=yes
|
||||
|
||||
All standard and user packages are included the same way. Note
|
||||
that USER packages have a hyphen between USER and the rest of the
|
||||
package name, not an underscore.
|
||||
|
||||
See the shortcut section below for how to install many packages at
|
||||
once with CMake.
|
||||
All packages are included the same way. See the shortcut section
|
||||
below for how to install many packages at once with CMake.
|
||||
|
||||
.. note::
|
||||
|
||||
@ -89,12 +105,10 @@ versus make.
|
||||
.. code-block:: bash
|
||||
|
||||
make no-rigid
|
||||
make yes-user-intel
|
||||
make yes-intel
|
||||
|
||||
All standard and user packages are included the same way.
|
||||
|
||||
See the shortcut section below for how to install many packages at
|
||||
once with make.
|
||||
All packages are included the same way. See the shortcut section
|
||||
below for how to install many packages at once with make.
|
||||
|
||||
.. note::
|
||||
|
||||
@ -126,7 +140,7 @@ other files dependent on that package are also excluded.
|
||||
|
||||
.. note::
|
||||
|
||||
By default no package is installed. Prior to August 2018, however,
|
||||
By default no packages are installed. Prior to August 2018, however,
|
||||
if you downloaded a tarball, 3 packages (KSPACE, MANYBODY, MOLECULE)
|
||||
were pre-installed via the traditional make procedure in the ``src``
|
||||
directory. That is no longer the case, so that CMake will build
|
||||
@ -153,7 +167,7 @@ one of them as a starting point and customize it to your needs.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
cmake -C ../cmake/presets/minimal.cmake [OPTIONS] ../cmake # enable just a few core packages
|
||||
cmake -C ../cmake/presets/basic.cmake [OPTIONS] ../cmake # enable just a few core packages
|
||||
cmake -C ../cmake/presets/most.cmake [OPTIONS] ../cmake # enable most packages
|
||||
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
|
||||
@ -208,10 +222,10 @@ These commands install/un-install sets of packages:
|
||||
|
||||
make yes-all # install all packages
|
||||
make no-all # uninstall all packages
|
||||
make yes-standard or make yes-std # install standard packages
|
||||
make no-standard or make no-std # uninstall standard packages
|
||||
make yes-user # install user packages
|
||||
make no-user # uninstall user packages
|
||||
make yes-basic # install a few commonly used packages'
|
||||
make no-basic # remove a few commonly used packages'
|
||||
make yes-most # install most packages w/o libs'
|
||||
make no-most # remove most packages w/o libs'
|
||||
make yes-lib # install packages that require extra libraries
|
||||
make no-lib # uninstall packages that require extra libraries
|
||||
make yes-ext # install packages that require external libraries
|
||||
@ -225,15 +239,14 @@ package`` will list all the these commands.
|
||||
Installing or un-installing a package for the make based build process
|
||||
works by simply copying files back and forth between the main source
|
||||
directory src and the sub-directories with the package name (e.g.
|
||||
src/KSPACE, src/USER-ATC), so that the files are included or excluded
|
||||
src/KSPACE, src/ATC), so that the files are included or excluded
|
||||
when LAMMPS is built. Only source files in the src folder will be
|
||||
compiled.
|
||||
|
||||
The following make commands help manage files that exist in both the
|
||||
src directory and in package sub-directories. You do not normally
|
||||
need to use these commands unless you are editing LAMMPS files or are
|
||||
:doc:`installing a patch <Install_patch>` downloaded from the LAMMPS web
|
||||
site.
|
||||
updating LAMMPS via git.
|
||||
|
||||
Type ``make package-status`` or ``make ps`` to show which packages are
|
||||
currently installed. For those that are installed, it will list any
|
||||
@ -245,10 +258,10 @@ currently installed, without listing the status of packages that are
|
||||
not installed.
|
||||
|
||||
Type ``make package-update`` or ``make pu`` to overwrite src files with
|
||||
files from the package sub-directories if the package is installed.
|
||||
It should be used after a :doc:`patch has been applied <Install_patch>`,
|
||||
since patches only update the files in the package sub-directory, but
|
||||
not the src files.
|
||||
files from the package sub-directories if the package is installed. It
|
||||
should be used after the checkout has been :doc:`updated or changed
|
||||
withy git <Install_git>`, this will only update the files in the package
|
||||
sub-directories, but not the copies in the src folder.
|
||||
|
||||
Type ``make package-overwrite`` to overwrite files in the package
|
||||
sub-directories with src files.
|
||||
|
||||
@ -64,7 +64,7 @@ LAMMPS can use them if they are available on your system.
|
||||
selected, then CMake will try to detect, if threaded FFTW
|
||||
libraries are available and enable them by default. This setting
|
||||
is independent of whether OpenMP threads are enabled and a
|
||||
packages like KOKKOS or USER-OMP is used. If CMake cannot detect
|
||||
packages like KOKKOS or OPENMP is used. If CMake cannot detect
|
||||
the FFT library, you can set these variables to assist:
|
||||
|
||||
.. code-block:: bash
|
||||
@ -242,8 +242,8 @@ does not support 64-bit integers or incurs performance penalties when
|
||||
using them.
|
||||
|
||||
These are limits for the core of the LAMMPS code, specific features or
|
||||
some styles may impose additional limits. The :ref:`USER-ATC
|
||||
<PKG-USER-ATC>` package cannot be compiled with the "bigbig" setting.
|
||||
some styles may impose additional limits. The :ref:`ATC
|
||||
<PKG-ATC>` package cannot be compiled with the "bigbig" setting.
|
||||
Also, there are limitations when using the library interface where some
|
||||
functions with known issues have been replaced by dummy calls printing a
|
||||
corresponding error message rather than crashing randomly or corrupting
|
||||
|
||||
@ -67,6 +67,7 @@ An alphabetic list of all general LAMMPS commands.
|
||||
* :doc:`lattice <lattice>`
|
||||
* :doc:`log <log>`
|
||||
* :doc:`mass <mass>`
|
||||
* :doc:`mdi/engine <mdi_engine>`
|
||||
* :doc:`message <message>`
|
||||
* :doc:`minimize <minimize>`
|
||||
* :doc:`min_modify <min_modify>`
|
||||
|
||||
@ -18,7 +18,7 @@ Bond_style potentials
|
||||
|
||||
All LAMMPS :doc:`bond_style <bond_style>` commands. Some styles have
|
||||
accelerated versions. This is indicated by additional letters in
|
||||
parenthesis: g = GPU, i = USER-INTEL, k = KOKKOS, o = USER-OMP, t =
|
||||
parenthesis: g = GPU, i = INTEL, k = KOKKOS, o = OPENMP, t =
|
||||
OPT.
|
||||
|
||||
.. table_from_list::
|
||||
@ -57,7 +57,7 @@ Angle_style potentials
|
||||
|
||||
All LAMMPS :doc:`angle_style <angle_style>` commands. Some styles have
|
||||
accelerated versions. This is indicated by additional letters in
|
||||
parenthesis: g = GPU, i = USER-INTEL, k = KOKKOS, o = USER-OMP, t =
|
||||
parenthesis: g = GPU, i = INTEL, k = KOKKOS, o = OPENMP, t =
|
||||
OPT.
|
||||
|
||||
.. table_from_list::
|
||||
@ -99,7 +99,7 @@ Dihedral_style potentials
|
||||
|
||||
All LAMMPS :doc:`dihedral_style <dihedral_style>` commands. Some styles
|
||||
have accelerated versions. This is indicated by additional letters in
|
||||
parenthesis: g = GPU, i = USER-INTEL, k = KOKKOS, o = USER-OMP, t =
|
||||
parenthesis: g = GPU, i = INTEL, k = KOKKOS, o = OPENMP, t =
|
||||
OPT.
|
||||
|
||||
.. table_from_list::
|
||||
@ -135,7 +135,7 @@ Improper_style potentials
|
||||
|
||||
All LAMMPS :doc:`improper_style <improper_style>` commands. Some styles
|
||||
have accelerated versions. This is indicated by additional letters in
|
||||
parenthesis: g = GPU, i = USER-INTEL, k = KOKKOS, o = USER-OMP, t =
|
||||
parenthesis: g = GPU, i = INTEL, k = KOKKOS, o = OPENMP, t =
|
||||
OPT.
|
||||
|
||||
.. table_from_list::
|
||||
|
||||
@ -16,8 +16,8 @@ Compute commands
|
||||
|
||||
An alphabetic list of all LAMMPS :doc:`compute <compute>` commands.
|
||||
Some styles have accelerated versions. This is indicated by
|
||||
additional letters in parenthesis: g = GPU, i = USER-INTEL, k =
|
||||
KOKKOS, o = USER-OMP, t = OPT.
|
||||
additional letters in parenthesis: g = GPU, i = INTEL, k =
|
||||
KOKKOS, o = OPENMP, t = OPT.
|
||||
|
||||
.. table_from_list::
|
||||
:columns: 5
|
||||
@ -47,17 +47,20 @@ KOKKOS, o = USER-OMP, t = OPT.
|
||||
* :doc:`dihedral <compute_dihedral>`
|
||||
* :doc:`dihedral/local <compute_dihedral_local>`
|
||||
* :doc:`dilatation/atom <compute_dilatation_atom>`
|
||||
* :doc:`dipole <compute_dipole>`
|
||||
* :doc:`dipole/chunk <compute_dipole_chunk>`
|
||||
* :doc:`displace/atom <compute_displace_atom>`
|
||||
* :doc:`dpd <compute_dpd>`
|
||||
* :doc:`dpd/atom <compute_dpd_atom>`
|
||||
* :doc:`edpd/temp/atom <compute_edpd_temp_atom>`
|
||||
* :doc:`efield/atom <compute_efield_atom>`
|
||||
* :doc:`entropy/atom <compute_entropy_atom>`
|
||||
* :doc:`erotate/asphere <compute_erotate_asphere>`
|
||||
* :doc:`erotate/rigid <compute_erotate_rigid>`
|
||||
* :doc:`erotate/sphere <compute_erotate_sphere>`
|
||||
* :doc:`erotate/sphere/atom <compute_erotate_sphere_atom>`
|
||||
* :doc:`event/displace <compute_event_displace>`
|
||||
* :doc:`fabric <compute_fabric>`
|
||||
* :doc:`fep <compute_fep>`
|
||||
* :doc:`force/tally <compute_tally>`
|
||||
* :doc:`fragment/atom <compute_cluster_atom>`
|
||||
|
||||
@ -16,7 +16,7 @@ Fix commands
|
||||
|
||||
An alphabetic list of all LAMMPS :doc:`fix <fix>` commands. Some styles
|
||||
have accelerated versions. This is indicated by additional letters in
|
||||
parenthesis: g = GPU, i = USER-INTEL, k = KOKKOS, o = USER-OMP, t =
|
||||
parenthesis: g = GPU, i = INTEL, k = KOKKOS, o = OPENMP, t =
|
||||
OPT.
|
||||
|
||||
.. table_from_list::
|
||||
@ -39,6 +39,9 @@ OPT.
|
||||
* :doc:`ave/time <fix_ave_time>`
|
||||
* :doc:`aveforce <fix_aveforce>`
|
||||
* :doc:`balance <fix_balance>`
|
||||
* :doc:`brownian <fix_brownian>`
|
||||
* :doc:`brownian/asphere <fix_brownian>`
|
||||
* :doc:`brownian/sphere <fix_brownian>`
|
||||
* :doc:`bocs <fix_bocs>`
|
||||
* :doc:`bond/break <fix_bond_break>`
|
||||
* :doc:`bond/create <fix_bond_create>`
|
||||
@ -98,6 +101,7 @@ OPT.
|
||||
* :doc:`lb/viscous <fix_lb_viscous>`
|
||||
* :doc:`lineforce <fix_lineforce>`
|
||||
* :doc:`manifoldforce <fix_manifoldforce>`
|
||||
* :doc:`mdi/engine <fix_mdi_engine>`
|
||||
* :doc:`meso/move <fix_meso_move>`
|
||||
* :doc:`momentum (k) <fix_momentum>`
|
||||
* :doc:`momentum/chunk <fix_momentum>`
|
||||
@ -158,6 +162,9 @@ OPT.
|
||||
* :doc:`planeforce <fix_planeforce>`
|
||||
* :doc:`plumed <fix_plumed>`
|
||||
* :doc:`poems <fix_poems>`
|
||||
* :doc:`polarize/bem/gmres <fix_polarize>`
|
||||
* :doc:`polarize/bem/icc <fix_polarize>`
|
||||
* :doc:`polarize/functional <fix_polarize>`
|
||||
* :doc:`pour <fix_pour>`
|
||||
* :doc:`precession/spin <fix_precession_spin>`
|
||||
* :doc:`press/berendsen <fix_press_berendsen>`
|
||||
|
||||
@ -16,7 +16,7 @@ KSpace solvers
|
||||
|
||||
All LAMMPS :doc:`kspace_style <kspace_style>` solvers. Some styles have
|
||||
accelerated versions. This is indicated by additional letters in
|
||||
parenthesis: g = GPU, i = USER-INTEL, k = KOKKOS, o = USER-OMP, t =
|
||||
parenthesis: g = GPU, i = INTEL, k = KOKKOS, o = OPENMP, t =
|
||||
OPT.
|
||||
|
||||
.. table_from_list::
|
||||
@ -28,12 +28,16 @@ OPT.
|
||||
* :doc:`ewald/dipole/spin <kspace_style>`
|
||||
* :doc:`msm (o) <kspace_style>`
|
||||
* :doc:`msm/cg (o) <kspace_style>`
|
||||
* :doc:`msm/dielectric <kspace_style>`
|
||||
* :doc:`pppm (giko) <kspace_style>`
|
||||
* :doc:`pppm/cg (o) <kspace_style>`
|
||||
* :doc:`pppm/dipole <kspace_style>`
|
||||
* :doc:`pppm/dipole/spin <kspace_style>`
|
||||
* :doc:`pppm/dielectric <kspace_style>`
|
||||
* :doc:`pppm/disp (io) <kspace_style>`
|
||||
* :doc:`pppm/disp/tip4p (o) <kspace_style>`
|
||||
* :doc:`pppm/disp/dielectric <kspace_style>`
|
||||
* :doc:`pppm/stagger <kspace_style>`
|
||||
* :doc:`pppm/tip4p (o) <kspace_style>`
|
||||
* :doc:`pppm/dielectric <kspace_style>`
|
||||
* :doc:`scafacos <kspace_style>`
|
||||
|
||||
@ -16,7 +16,7 @@ Pair_style potentials
|
||||
|
||||
All LAMMPS :doc:`pair_style <pair_style>` commands. Some styles have
|
||||
accelerated versions. This is indicated by additional letters in
|
||||
parenthesis: g = GPU, i = USER-INTEL, k = KOKKOS, o = USER-OMP, t =
|
||||
parenthesis: g = GPU, i = INTEL, k = KOKKOS, o = OPENMP, t =
|
||||
OPT.
|
||||
|
||||
.. table_from_list::
|
||||
@ -69,6 +69,7 @@ OPT.
|
||||
* :doc:`comb3 <pair_comb>`
|
||||
* :doc:`cosine/squared <pair_cosine_squared>`
|
||||
* :doc:`coul/cut (gko) <pair_coul>`
|
||||
* :doc:`coul/cut/dielectric <pair_dielectric>`
|
||||
* :doc:`coul/cut/global (o) <pair_coul>`
|
||||
* :doc:`coul/cut/soft (o) <pair_fep_soft>`
|
||||
* :doc:`coul/debye (gko) <pair_coul>`
|
||||
@ -76,6 +77,7 @@ OPT.
|
||||
* :doc:`coul/dsf (gko) <pair_coul>`
|
||||
* :doc:`coul/long (gko) <pair_coul>`
|
||||
* :doc:`coul/long/cs (g) <pair_cs>`
|
||||
* :doc:`coul/long/dielectric <pair_dielectric>`
|
||||
* :doc:`coul/long/soft (o) <pair_fep_soft>`
|
||||
* :doc:`coul/msm (o) <pair_coul>`
|
||||
* :doc:`coul/slater/cut <pair_coul_slater>`
|
||||
@ -87,6 +89,8 @@ OPT.
|
||||
* :doc:`coul/wolf/cs <pair_cs>`
|
||||
* :doc:`dpd (gio) <pair_dpd>`
|
||||
* :doc:`dpd/fdt <pair_dpd_fdt>`
|
||||
* :doc:`dpd/ext <pair_dpd_ext>`
|
||||
* :doc:`dpd/ext/tstat <pair_dpd_ext>`
|
||||
* :doc:`dpd/fdt/energy (k) <pair_dpd_fdt>`
|
||||
* :doc:`dpd/tstat (go) <pair_dpd>`
|
||||
* :doc:`dsmc <pair_dsmc>`
|
||||
@ -116,6 +120,7 @@ OPT.
|
||||
* :doc:`gw/zbl <pair_gw>`
|
||||
* :doc:`hbond/dreiding/lj (o) <pair_hbond_dreiding>`
|
||||
* :doc:`hbond/dreiding/morse (o) <pair_hbond_dreiding>`
|
||||
* :doc:`hdnnp <pair_hdnnp>`
|
||||
* :doc:`ilp/graphene/hbn <pair_ilp_graphene_hbn>`
|
||||
* :doc:`kolmogorov/crespi/full <pair_kolmogorov_crespi_full>`
|
||||
* :doc:`kolmogorov/crespi/z <pair_kolmogorov_crespi_z>`
|
||||
@ -140,13 +145,17 @@ OPT.
|
||||
* :doc:`lj/cubic (go) <pair_lj_cubic>`
|
||||
* :doc:`lj/cut (gikot) <pair_lj>`
|
||||
* :doc:`lj/cut/coul/cut (gko) <pair_lj_cut_coul>`
|
||||
* :doc:`lj/cut/coul/cut/dielectric (o) <pair_dielectric>`
|
||||
* :doc:`lj/cut/coul/cut/soft (o) <pair_fep_soft>`
|
||||
* :doc:`lj/cut/coul/debye (gko) <pair_lj_cut_coul>`
|
||||
* :doc:`lj/cut/coul/debye/dielectric <pair_dielectric>`
|
||||
* :doc:`lj/cut/coul/dsf (gko) <pair_lj_cut_coul>`
|
||||
* :doc:`lj/cut/coul/long (gikot) <pair_lj_cut_coul>`
|
||||
* :doc:`lj/cut/coul/long/cs <pair_cs>`
|
||||
* :doc:`lj/cut/coul/long/dielectric (o) <pair_dielectric>`
|
||||
* :doc:`lj/cut/coul/long/soft (o) <pair_fep_soft>`
|
||||
* :doc:`lj/cut/coul/msm (go) <pair_lj_cut_coul>`
|
||||
* :doc:`lj/cut/coul/msm/dielectric <pair_dielectric>`
|
||||
* :doc:`lj/cut/coul/wolf (o) <pair_lj_cut_coul>`
|
||||
* :doc:`lj/cut/dipole/cut (go) <pair_dipole>`
|
||||
* :doc:`lj/cut/dipole/long (g) <pair_dipole>`
|
||||
@ -161,6 +170,7 @@ OPT.
|
||||
* :doc:`lj/gromacs (gko) <pair_gromacs>`
|
||||
* :doc:`lj/gromacs/coul/gromacs (ko) <pair_gromacs>`
|
||||
* :doc:`lj/long/coul/long (iot) <pair_lj_long>`
|
||||
* :doc:`lj/long/coul/long/dielectric <pair_dielectric>`
|
||||
* :doc:`lj/long/dipole/long <pair_dipole>`
|
||||
* :doc:`lj/long/tip4p/long (o) <pair_lj_long>`
|
||||
* :doc:`lj/mdf <pair_mdf>`
|
||||
@ -169,7 +179,7 @@ OPT.
|
||||
* :doc:`lj/sdk/coul/long (go) <pair_sdk>`
|
||||
* :doc:`lj/sdk/coul/msm (o) <pair_sdk>`
|
||||
* :doc:`lj/sf/dipole/sf (go) <pair_dipole>`
|
||||
* :doc:`lj/smooth (o) <pair_lj_smooth>`
|
||||
* :doc:`lj/smooth (go) <pair_lj_smooth>`
|
||||
* :doc:`lj/smooth/linear (o) <pair_lj_smooth_linear>`
|
||||
* :doc:`lj/switch3/coulgauss/long <pair_lj_switch3_coulgauss_long>`
|
||||
* :doc:`lj96/cut (go) <pair_lj96>`
|
||||
@ -180,7 +190,7 @@ OPT.
|
||||
* :doc:`lubricateU/poly <pair_lubricateU>`
|
||||
* :doc:`mdpd <pair_mesodpd>`
|
||||
* :doc:`mdpd/rhosum <pair_mesodpd>`
|
||||
* :doc:`meam/c <pair_meamc>`
|
||||
* :doc:`meam <pair_meam>`
|
||||
* :doc:`meam/spline (o) <pair_meam_spline>`
|
||||
* :doc:`meam/sw/spline <pair_meam_sw_spline>`
|
||||
* :doc:`mesocnt <pair_mesocnt>`
|
||||
@ -224,6 +234,7 @@ OPT.
|
||||
* :doc:`polymorphic <pair_polymorphic>`
|
||||
* :doc:`python <pair_python>`
|
||||
* :doc:`quip <pair_quip>`
|
||||
* :doc:`rann <pair_rann>`
|
||||
* :doc:`reax/c (ko) <pair_reaxc>`
|
||||
* :doc:`rebo (io) <pair_airebo>`
|
||||
* :doc:`resquared (go) <pair_resquared>`
|
||||
|
||||
@ -164,7 +164,7 @@ LAMMPS:
|
||||
allowed, but that should be sufficient for most use cases.
|
||||
|
||||
.. admonition:: ASCII versus UTF-8
|
||||
:class: note
|
||||
:class: note
|
||||
|
||||
LAMMPS expects and processes 7-bit ASCII format text internally.
|
||||
Many modern environments use UTF-8 encoding, which is a superset
|
||||
|
||||
@ -25,23 +25,20 @@ The reset_ids command has been renamed to :doc:`reset_atom_ids <reset_atom_ids>`
|
||||
MEAM package
|
||||
------------
|
||||
|
||||
The MEAM package has been removed since it was superseded by the
|
||||
:ref:`USER-MEAMC package <PKG-USER-MEAMC>`. The code in
|
||||
the USER-MEAMC package is a translation of the Fortran code of MEAM into C++,
|
||||
which removes several restrictions (e.g. there can be multiple instances
|
||||
in hybrid pair styles) and allows for some optimizations leading
|
||||
to better performance. The new pair style :doc:`meam/c <pair_meamc>` has
|
||||
the exact same syntax as the old "meam" pair style and thus pair style
|
||||
meam is an alias to the new style and backward
|
||||
compatibility of old inputs is preserved.
|
||||
The MEAM package in Fortran has been replaced by a C++ implementation.
|
||||
The code in the :ref:`MEAM package <PKG-MEAM>` is a translation of the
|
||||
Fortran code of MEAM into C++, which removes several restrictions
|
||||
(e.g. there can be multiple instances in hybrid pair styles) and allows
|
||||
for some optimizations leading to better performance. The pair style
|
||||
:doc:`meam <pair_meam>` has the exact same syntax.
|
||||
|
||||
REAX package
|
||||
------------
|
||||
|
||||
The REAX package has been removed since it was superseded by the
|
||||
:ref:`USER-REAXC package <PKG-USER-REAXC>`. The USER-REAXC
|
||||
:ref:`REAXFF package <PKG-REAXFF>`. The REAXFF
|
||||
package has been tested to yield equivalent results to the REAX package,
|
||||
offers better performance, supports OpenMP multi-threading via USER-OMP,
|
||||
offers better performance, supports OpenMP multi-threading via OPENMP,
|
||||
and GPU and threading parallelization through KOKKOS. The new pair styles
|
||||
are not syntax compatible with the removed reax pair style, so input
|
||||
files will have to be adapted.
|
||||
|
||||
@ -404,8 +404,8 @@ noise). Then it will restart from the previously generated restart and
|
||||
compare with the reference and also start from the data file. A final
|
||||
check will use multi-cutoff r-RESPA (if supported by the pair style) at
|
||||
a 1:1 split and compare to the Verlet results. These sets of tests are
|
||||
run with multiple test fixtures for accelerated styles (OPT, USER-OMP,
|
||||
USER-INTEL) and for the latter two with 4 OpenMP threads enabled. For
|
||||
run with multiple test fixtures for accelerated styles (OPT, OPENMP,
|
||||
INTEL) and for the latter two with 4 OpenMP threads enabled. For
|
||||
these tests the relative error (epsilon) is lowered by a common factor
|
||||
due to the additional numerical noise, but the tests are still comparing
|
||||
to the same reference data.
|
||||
|
||||
@ -9,14 +9,29 @@ reading or writing to files with error checking or translation of
|
||||
strings into specific types of numbers with checking for validity. This
|
||||
reduces redundant implementations and encourages consistent behavior.
|
||||
|
||||
I/O with status check
|
||||
^^^^^^^^^^^^^^^^^^^^^
|
||||
I/O with status check and similar functions
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
These are wrappers around the corresponding C library calls like
|
||||
``fgets()`` or ``fread()``. They will check if there were errors
|
||||
on reading or an unexpected end-of-file state was reached. In that
|
||||
case, the functions will stop the calculation with an error message,
|
||||
indicating the name of the problematic file, if possible.
|
||||
The the first two functions are wrappers around the corresponding C
|
||||
library calls ``fgets()`` or ``fread()``. They will check if there
|
||||
were errors on reading or an unexpected end-of-file state was reached.
|
||||
In that case, the functions will stop with an error message, indicating
|
||||
the name of the problematic file, if possible unless the *error* argument
|
||||
is a NULL pointer.
|
||||
|
||||
The :cpp:func:`fgets_trunc` function will work similar for ``fgets()``
|
||||
but it will read in a whole line (i.e. until the end of line or end
|
||||
of file), but store only as many characters as will fit into the buffer
|
||||
including a final newline character and the terminating NULL byte.
|
||||
If the line in the file is longer it will thus be truncated in the buffer.
|
||||
This function is used by :cpp:func:`read_lines_from_file` to read individual
|
||||
lines but make certain they follow the size constraints.
|
||||
|
||||
The :cpp:func:`read_lines_from_file` function will read the requested
|
||||
number of lines of a maximum length into a buffer and will return 0
|
||||
if successful or 1 if not. It also guarantees that all lines are
|
||||
terminated with a newline character and the entire buffer with a
|
||||
NULL character.
|
||||
|
||||
----------
|
||||
|
||||
@ -26,6 +41,12 @@ indicating the name of the problematic file, if possible.
|
||||
.. doxygenfunction:: sfread
|
||||
:project: progguide
|
||||
|
||||
.. doxygenfunction:: fgets_trunc
|
||||
:project: progguide
|
||||
|
||||
.. doxygenfunction:: read_lines_from_file
|
||||
:project: progguide
|
||||
|
||||
----------
|
||||
|
||||
String to number conversions with validity check
|
||||
@ -164,7 +185,10 @@ Argument processing
|
||||
Convenience functions
|
||||
^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. doxygenfunction:: logmesg
|
||||
.. doxygenfunction:: logmesg(LAMMPS *lmp, const S &format, Args&&... args)
|
||||
:project: progguide
|
||||
|
||||
.. doxygenfunction:: logmesg(LAMMPS *lmp, const std::string &mesg)
|
||||
:project: progguide
|
||||
|
||||
.. doxygenfunction:: getsyserror
|
||||
|
||||
@ -59,7 +59,7 @@ of each timestep. First of all, implement a constructor:
|
||||
}
|
||||
|
||||
In the constructor you should parse your fix arguments which are
|
||||
specified in the script. All fixes have pretty the same syntax:
|
||||
specified in the script. All fixes have pretty much the same syntax:
|
||||
``fix <fix-ID> <fix group> <fix name> <fix arguments ...>``. The
|
||||
first 3 parameters are parsed by Fix base class constructor, while
|
||||
``<fix arguments>`` should be parsed by you. In our case, we need to
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
Errors
|
||||
******
|
||||
|
||||
These doc pages describe the errors you can encounter when using
|
||||
LAMMPS. The common problems include conceptual issues. The messages
|
||||
and warnings doc pages give complete lists of all the messages the
|
||||
code may generate (except those generated by USER packages), with
|
||||
additional details for many of them.
|
||||
These doc pages describe many of the error and warning message you can
|
||||
encounter when using LAMMPS. The common problems include conceptual
|
||||
issues. The messages and warnings doc pages give complete lists of all
|
||||
the messages the code may generate, with additional details for many of
|
||||
them.
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
@ -5,8 +5,8 @@ If you are confident that you have found a bug in LAMMPS, please follow
|
||||
the steps outlined below:
|
||||
|
||||
* Check the `New features and bug fixes
|
||||
<https://lammps.sandia.gov/bug.html>`_ section of the `LAMMPS WWW site
|
||||
<https://lammps.sandia.gov>`_ or the
|
||||
<https://www.lammps.org/bug.html>`_ section of the `LAMMPS WWW site
|
||||
<https://www.lammps.org>`_ or the
|
||||
`GitHub Releases page <https://github.com/lammps/lammps/releases>`_ to
|
||||
see if the bug has already been addressed in a patch release.
|
||||
* Check that your issue can be reproduced with the latest development
|
||||
@ -17,7 +17,7 @@ the steps outlined below:
|
||||
if your issue has already been reported and if it is still open.
|
||||
* Check the `GitHub Pull Requests page <https://github.com/lammps/lammps/pulls>`_
|
||||
to see if there is already a fix for your bug pending.
|
||||
* Check the `mailing list archives <https://lammps.sandia.gov/mail.html>`_
|
||||
* Check the `mailing list archives <https://www.lammps.org/mail.html>`_
|
||||
to see if the issue has been discussed before.
|
||||
|
||||
If none of these steps yields any useful information, please file a new
|
||||
|
||||
@ -39,7 +39,7 @@ figure out your physics or numerical mistakes, like choosing too big a
|
||||
timestep, specifying erroneous force field coefficients, or putting 2
|
||||
atoms on top of each other! If you run into errors that LAMMPS
|
||||
does not catch that you think it should flag, please send an email to
|
||||
the `developers <https://lammps.sandia.gov/authors.html>`_.
|
||||
the `developers <https://www.lammps.org/authors.html>`_.
|
||||
|
||||
If you get an error message about an invalid command in your input
|
||||
script, you can determine what command is causing the problem by
|
||||
|
||||
@ -14,10 +14,6 @@ For example, a message like this:
|
||||
means that line #78 in the file src/velocity.cpp generated the error.
|
||||
Looking in the source code may help you figure out what went wrong.
|
||||
|
||||
Note that error messages from :doc:`user-contributed packages <Packages_user>` are not listed here. If such an error
|
||||
occurs and is not self-explanatory, you will need to look in the source
|
||||
code or contact the author of the package.
|
||||
|
||||
Doc page with :doc:`WARNING messages <Errors_warnings>`
|
||||
|
||||
----------
|
||||
@ -3871,7 +3867,7 @@ Doc page with :doc:`WARNING messages <Errors_warnings>`
|
||||
*Fix orient/fcc found self twice*
|
||||
The neighbor lists used by fix orient/fcc are messed up. If this
|
||||
error occurs, it is likely a bug, so send an email to the
|
||||
`developers <https://lammps.sandia.gov/authors.html>`_.
|
||||
`developers <https://www.lammps.org/authors.html>`_.
|
||||
|
||||
*Fix peri neigh does not exist*
|
||||
Somehow a fix that the pair style defines has been deleted.
|
||||
@ -5899,7 +5895,7 @@ Doc page with :doc:`WARNING messages <Errors_warnings>`
|
||||
other.
|
||||
|
||||
*Must set number of threads via package omp command*
|
||||
Because you are using the USER-OMP package, set the number of threads
|
||||
Because you are using the OPENMP package, set the number of threads
|
||||
via its settings, not by the pair_style snap nthreads setting.
|
||||
|
||||
*Must shrink-wrap piston boundary*
|
||||
@ -6344,16 +6340,16 @@ keyword to allow for additional bonds to be formed
|
||||
The GPU package must be installed via "make yes-gpu" before LAMMPS is
|
||||
built.
|
||||
|
||||
*Package intel command without USER-INTEL package installed*
|
||||
The USER-INTEL package must be installed via "make yes-user-intel"
|
||||
*Package intel command without INTEL package installed*
|
||||
The INTEL package must be installed via "make yes-intel"
|
||||
before LAMMPS is built.
|
||||
|
||||
*Package kokkos command without KOKKOS package enabled*
|
||||
The KOKKOS package must be installed via "make yes-kokkos" before
|
||||
LAMMPS is built, and the "-k on" must be used to enable the package.
|
||||
|
||||
*Package omp command without USER-OMP package installed*
|
||||
The USER-OMP package must be installed via "make yes-user-omp" before
|
||||
*Package omp command without OPENMP package installed*
|
||||
The OPENMP package must be installed via "make yes-openmp" before
|
||||
LAMMPS is built.
|
||||
|
||||
*Pair body requires atom style body*
|
||||
@ -8064,13 +8060,13 @@ keyword to allow for additional bonds to be formed
|
||||
*Using suffix gpu without GPU package installed*
|
||||
Self-explanatory.
|
||||
|
||||
*Using suffix intel without USER-INTEL package installed*
|
||||
*Using suffix intel without INTEL package installed*
|
||||
Self-explanatory.
|
||||
|
||||
*Using suffix kk without KOKKOS package enabled*
|
||||
Self-explanatory.
|
||||
|
||||
*Using suffix omp without USER-OMP package installed*
|
||||
*Using suffix omp without OPENMP package installed*
|
||||
Self-explanatory.
|
||||
|
||||
*Using update dipole flag requires atom attribute mu*
|
||||
|
||||
@ -14,10 +14,6 @@ generated. For example, a message like this:
|
||||
means that line #187 in the file src/domain.cpp generated the error.
|
||||
Looking in the source code may help you figure out what went wrong.
|
||||
|
||||
Note that warning messages from :doc:`user-contributed packages <Packages_user>` are not listed here. If such a warning
|
||||
occurs and is not self-explanatory, you will need to look in the source
|
||||
code or contact the author of the package.
|
||||
|
||||
Doc page with :doc:`ERROR messages <Errors_messages>`
|
||||
|
||||
----------
|
||||
@ -529,7 +525,7 @@ This will most likely cause errors in kinetic fluctuations.
|
||||
|
||||
*OMP_NUM_THREADS environment is not set.*
|
||||
This environment variable must be set appropriately to use the
|
||||
USER-OMP package.
|
||||
OPENMP package.
|
||||
|
||||
*One or more atoms are time integrated more than once*
|
||||
This is probably an error since you typically do not want to
|
||||
|
||||
@ -18,7 +18,7 @@ files and image files.
|
||||
|
||||
If you uncomment the :doc:`dump <dump>` command in the input script, a
|
||||
text dump file will be produced, which can be animated by various
|
||||
`visualization programs <https://lammps.sandia.gov/viz.html>`_.
|
||||
`visualization programs <https://www.lammps.org/viz.html>`_.
|
||||
|
||||
If you uncomment the :doc:`dump image <dump>` command in the input
|
||||
script, and assuming you have built LAMMPS with a JPG library, JPG
|
||||
@ -27,7 +27,7 @@ be quickly post-processed into a movie using commands described on the
|
||||
:doc:`dump image <dump_image>` doc page.
|
||||
|
||||
Animations of many of the examples can be viewed on the Movies section
|
||||
of the `LAMMPS web site <https://lammps.sandia.gov/movies.html>`_.
|
||||
of the `LAMMPS web site <https://www.lammps.org/movies.html>`_.
|
||||
|
||||
There are two kinds of sub-directories in the examples folder. Lower
|
||||
case named directories contain one or a few simple, quick-to-run
|
||||
@ -108,6 +108,8 @@ Lowercase directories
|
||||
+-------------+------------------------------------------------------------------+
|
||||
| msst | MSST shock dynamics |
|
||||
+-------------+------------------------------------------------------------------+
|
||||
| multi | multi neighboring for systems with large interaction disparities |
|
||||
+-------------+------------------------------------------------------------------+
|
||||
| nb3b | use of non-bonded 3-body harmonic pair style |
|
||||
+-------------+------------------------------------------------------------------+
|
||||
| neb | nudged elastic band (NEB) calculation for barrier finding |
|
||||
@ -164,7 +166,7 @@ Here is how you can run and visualize one of the sample problems:
|
||||
Running the simulation produces the files *dump.indent* and
|
||||
*log.lammps*\ . You can visualize the dump file of snapshots with a
|
||||
variety of third-party tools highlighted on the
|
||||
`Visualization <https://lammps.sandia.gov/viz.html>`_ page of the LAMMPS
|
||||
`Visualization <https://www.lammps.org/viz.html>`_ page of the LAMMPS
|
||||
web site.
|
||||
|
||||
If you uncomment the :doc:`dump image <dump_image>` line(s) in the input
|
||||
@ -203,11 +205,13 @@ Uppercase directories
|
||||
+------------+--------------------------------------------------------------------------------------------------+
|
||||
| MC | using LAMMPS in a Monte Carlo mode to relax the energy of a system |
|
||||
+------------+--------------------------------------------------------------------------------------------------+
|
||||
| PACKAGES | examples for specific packages and contributed commands in USER-MISC |
|
||||
+------------+--------------------------------------------------------------------------------------------------+
|
||||
| SPIN | examples for features of the SPIN package |
|
||||
+------------+--------------------------------------------------------------------------------------------------+
|
||||
| UNITS | examples that run the same simulation in lj, real, metal units |
|
||||
+------------+--------------------------------------------------------------------------------------------------+
|
||||
| USER | examples for USER packages and USER-contributed commands |
|
||||
| USER-MISC | examples for commands in the USER-MISC packages |
|
||||
+------------+--------------------------------------------------------------------------------------------------+
|
||||
| VISCOSITY | compute viscosity via several methods |
|
||||
+------------+--------------------------------------------------------------------------------------------------+
|
||||
@ -215,11 +219,14 @@ Uppercase directories
|
||||
Nearly all of these directories have README files which give more
|
||||
details on how to understand and use their contents.
|
||||
|
||||
The USER directory has a large number of sub-directories which
|
||||
correspond by name to a USER package. They contain scripts that
|
||||
illustrate how to use the command(s) provided in that package. Many
|
||||
The PACKAGES directory has a large number of sub-directories which
|
||||
correspond by name to specific packages. They contain scripts that
|
||||
illustrate how to use the command(s) provided in those packages. Many
|
||||
of the sub-directories have their own README files which give further
|
||||
instructions. See the :doc:`Packages_details <Packages_details>` doc
|
||||
page for more info on specific USER packages.
|
||||
page for more info on specific packages.
|
||||
|
||||
Similarly the USER-MISC directory has sub-directories for examples
|
||||
corresponding to individual commands or styles in the USER-MISC package.
|
||||
|
||||
.. _openkim: https://openkim.org
|
||||
|
||||
@ -3,7 +3,7 @@ Howto discussions
|
||||
|
||||
These doc pages describe how to perform various tasks with LAMMPS,
|
||||
both for users and developers. The
|
||||
`glossary <https://lammps.sandia.gov/glossary.html>`_ website page also lists MD
|
||||
`glossary <https://www.lammps.org/glossary.html>`_ website page also lists MD
|
||||
terminology with links to corresponding LAMMPS manual pages. The
|
||||
example input scripts included in the examples directory of the LAMMPS
|
||||
distribution and highlighted on the :doc:`Examples <Examples>` doc page
|
||||
@ -23,6 +23,7 @@ General howto
|
||||
Howto_library
|
||||
Howto_couple
|
||||
Howto_client_server
|
||||
Howto_mdi
|
||||
|
||||
Settings howto
|
||||
==============
|
||||
|
||||
@ -382,9 +382,9 @@ change some variables later with additional *-D* flags. A few examples:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
cmake -C ../cmake/presets/minimal.cmake -D PKG_MISC=on ../cmake
|
||||
cmake -C ../cmake/presets/basic.cmake -D PKG_MISC=on ../cmake
|
||||
cmake -C ../cmake/presets/clang.cmake -C ../cmake/presets/most.cmake ../cmake
|
||||
cmake -C ../cmake/presets/minimal.cmake -D BUILD_MPI=off ../cmake
|
||||
cmake -C ../cmake/presets/basic.cmake -D BUILD_MPI=off ../cmake
|
||||
|
||||
The first command will install the packages ``KSPACE``, ``MANYBODY``,
|
||||
``MOLECULE``, ``RIGID`` and ``MISC``; the first four from the preset
|
||||
@ -400,7 +400,7 @@ It is also possible to do this incrementally.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
cmake -C ../cmake/presets/minimal.cmake ../cmake
|
||||
cmake -C ../cmake/presets/basic.cmake ../cmake
|
||||
cmake -D PKG_MISC=on .
|
||||
|
||||
will achieve the same final configuration as in the first example above.
|
||||
|
||||
@ -2,13 +2,15 @@ Tutorial for Thermalized Drude oscillators in LAMMPS
|
||||
====================================================
|
||||
|
||||
This tutorial explains how to use Drude oscillators in LAMMPS to
|
||||
simulate polarizable systems using the USER-DRUDE package. As an
|
||||
simulate polarizable systems using the DRUDE package. As an
|
||||
illustration, the input files for a simulation of 250 phenol molecules
|
||||
are documented. First of all, LAMMPS has to be compiled with the
|
||||
USER-DRUDE package activated. Then, the data file and input scripts
|
||||
DRUDE package activated. Then, the data file and input scripts
|
||||
have to be modified to include the Drude dipoles and how to handle
|
||||
them.
|
||||
|
||||
Example input scripts available: examples/PACKAGES/drude
|
||||
|
||||
----------
|
||||
|
||||
**Overview of Drude induced dipoles**
|
||||
@ -80,7 +82,7 @@ The data file is similar to a standard LAMMPS data file for
|
||||
to their DC should appear in the data file as normal atoms and bonds.
|
||||
|
||||
You can use the *polarizer* tool (Python script distributed with the
|
||||
USER-DRUDE package) to convert a non-polarizable data file (here
|
||||
DRUDE package) to convert a non-polarizable data file (here
|
||||
*data.102494.lmp*\ ) to a polarizable data file (\ *data-p.lmp*\ )
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user