Merge branch 'master' into github-rebo-bugfix
|
@ -0,0 +1,67 @@
|
|||
# Code of Conduct for the LAMMPS Project on GitHub
|
||||
|
||||
## Our Pledge
|
||||
|
||||
In the interest of fostering an open and welcoming environment, we as LAMMPS
|
||||
developers, contributors, and maintainers pledge to making participation in
|
||||
our project a harassment-free experience for everyone.
|
||||
|
||||
## Our Standards
|
||||
|
||||
Examples of behavior that contributes to creating a positive environment
|
||||
include:
|
||||
|
||||
* Using welcoming and inclusive language
|
||||
* Being respectful of differing viewpoints and experiences
|
||||
* Gracefully accepting constructive criticism
|
||||
* Focusing on what is best for the community
|
||||
* Showing empathy towards other community members
|
||||
|
||||
Examples of unacceptable behavior by participants include:
|
||||
|
||||
* The use of explicit language or imagery
|
||||
* Trolling, insulting/derogatory comments, and personal or political attacks
|
||||
* Public or private harassment
|
||||
* Publishing others' private information, such as a physical or electronic
|
||||
address, without explicit permission
|
||||
|
||||
## Our Responsibilities
|
||||
|
||||
Project maintainers are responsible for clarifying the standards of acceptable
|
||||
behavior and are expected to take appropriate and fair corrective action in
|
||||
response to any instances of unacceptable behavior.
|
||||
|
||||
Project maintainers have the right and responsibility to remove, edit, or
|
||||
reject comments, commits, code, issues, and other contributions that are not
|
||||
aligned to this Code of Conduct, or to ban temporarily or permanently any
|
||||
developer, maintainer, or contributor for this or other behaviors that they
|
||||
deem inappropriate, threatening, offensive, or harmful.
|
||||
|
||||
## Scope
|
||||
|
||||
This Code of Conduct applies to all public exchanges in the LAMMPS project
|
||||
on GitHub and in submitted code.
|
||||
|
||||
## Enforcement
|
||||
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
||||
reported by contacting the project team at developer@lammps.org. All
|
||||
complaints will be reviewed and investigated and will result in a response
|
||||
that is deemed necessary and appropriate to the circumstances. The project
|
||||
team is obligated to maintain confidentiality with regard to the reporter
|
||||
of an incident.
|
||||
|
||||
Project maintainers who do not follow or enforce the Code of Conduct in good
|
||||
faith may face temporary or permanent repercussions as determined by other
|
||||
members of the project's leadership.
|
||||
|
||||
## Attribution
|
||||
|
||||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
||||
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
|
||||
|
||||
[homepage]: https://www.contributor-covenant.org
|
||||
|
||||
For answers to common questions about this code of conduct, see
|
||||
https://www.contributor-covenant.org/faq
|
||||
|
|
@ -2,10 +2,10 @@
|
|||
|
||||
Thank your for considering to contribute to the LAMMPS software project.
|
||||
|
||||
The following is a set of guidelines as well as explanations of policies and workflows for contributing to the LAMMPS molecular dynamics software project. These guidelines focus on submitting issues or pull requests on the LAMMPS GitHub project.
|
||||
The following is a set of guidelines as well as explanations of policies and work flows for contributing to the LAMMPS molecular dynamics software project. These guidelines focus on submitting issues or pull requests on the LAMMPS GitHub project.
|
||||
|
||||
Thus please also have a look at:
|
||||
* [The Section on submitting new features for inclusion in LAMMPS of the Manual](http://lammps.sandia.gov/doc/Section_modify.html#mod-15)
|
||||
* [The Section on submitting new features for inclusion in LAMMPS of the Manual](https://lammps.sandia.gov/doc/Modify_contribute.html)
|
||||
* [The LAMMPS GitHub Tutorial in the Manual](http://lammps.sandia.gov/doc/Howto_github.html)
|
||||
|
||||
## Table of Contents
|
||||
|
@ -18,7 +18,7 @@ Thus please also have a look at:
|
|||
* [Suggesting Enhancements](#suggesting-enhancements)
|
||||
* [Contributing Code](#contributing-code)
|
||||
|
||||
[GitHub Workflows](#github-workflows)
|
||||
[GitHub Work flows](#github-workflows)
|
||||
* [Issues](#issues)
|
||||
* [Pull Requests](#pull-requests)
|
||||
|
||||
|
@ -26,17 +26,17 @@ __
|
|||
|
||||
## I don't want to read this whole thing I just have a question!
|
||||
|
||||
> **Note:** Please do not file an issue to ask a general question about LAMMPS, its features, how to use specific commands, or how perform simulations or analysis in LAMMPS. Instead post your question to the ['lammps-users' mailing list](http://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](http://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 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.
|
||||
|
||||
## 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
|
||||
to one of the [LAMMPS core developers](http://lammps.sandia.gov/authors.html). As you may see from the aforementioned developer page, the LAMMPS software package includes the efforts of a very large number of contributors beyond the principal authors and maintainers.
|
||||
to one of the [LAMMPS core developers](https://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
|
||||
|
||||
The LAMMPS mailing list is hosted at SourceForge. The mailing list began in 2005, and now includes tens of thousands of messages in thousands of threads. LAMMPS developers try to respond to posted questions in a timely manner, but there are no guarantees. Please consider that people live in different timezone and may not have time to answer e-mails outside of their work hours.
|
||||
You can post to list by sending your email to lammps-users at lists.sourceforge.net (no subscription required), but before posting, please read the [mailing list guidelines](http://lammps.sandia.gov/guidelines.html) to maximize your chances to receive a helpful response.
|
||||
You can post to list by sending your email to lammps-users at lists.sourceforge.net (no subscription required), but before posting, please read the [mailing list guidelines](https://lammps.sandia.gov/guidelines.html) to maximize your chances to receive a helpful response.
|
||||
|
||||
Anyone can browse/search previous questions/answers in the archives. You do not have to subscribe to the list to post questions, receive answers (to your questions), or browse/search the archives. You **do** need to subscribe to the list if you want emails for **all** the posts (as individual messages or in digest form), or to answer questions yourself. Feel free to sign up and help us out! Answering questions from fellow LAMMPS users is a great way to pay back the community for providing you a useful tool for free, and to pass on the advice you have received yourself to others. It improves your karma and helps you understand your own research better.
|
||||
|
||||
|
@ -44,7 +44,7 @@ If you post a message and you are a subscriber, your message will appear immedia
|
|||
|
||||
### 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](http://lammps.sandia.gov/bug.html) web page lists all significant changes to LAMMPS over the years. It also tells you what the current latest development version of LAMMPS is, and you should test whether your issue still applies to that version.
|
||||
While developers writing code for LAMMPS are careful to test their code, LAMMPS is such a large and complex software, that it is impossible to test for all combinations of features under all normal and not so normal circumstances. Thus bugs do happen, and if you suspect, that you have encountered one, please try to document it and report it as an [Issue](https://github.com/lammps/lammps/issues) on the LAMMPS GitHub project web page. However, before reporting a bug, you need to check whether this is something that may have already been corrected. The [Latest Features and Bug Fixes in LAMMPS](https://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.
|
||||
|
||||
When you click on the green "New Issue" button, you will be provided with a text field, where you can enter your message. That text field with contain a template with several headlines and some descriptions. Keep the headlines that are relevant to your reported potential bug and replace the descriptions with the information as suggested by the descriptions.
|
||||
You can also attach small text files (please add the file name extension `.txt` or it will be rejected), images, or small compressed text files (using gzip, do not use RAR or 7-ZIP or similar tools that are uncommon outside of Windows machines). In many cases, bugs are best illustrated by providing a small input deck (do **not** attach your entire production input, but remove everything that is not required to reproduce the issue, and scale down your system size, that the resulting calculation runs fast and can be run on small desktop quickly).
|
||||
|
@ -62,13 +62,13 @@ To be able to submit an issue on GitHub, you have to register for an account (fo
|
|||
|
||||
We encourage users to submit new features or modifications for LAMMPS to the core developers so they can be added to the LAMMPS distribution. The preferred way to manage and coordinate this is by submitting a pull request at the LAMMPS project on GitHub. For any larger modifications or programming project, you are encouraged to contact the LAMMPS developers ahead of time, in order to discuss implementation strategies and coding guidelines, that will make it easier to integrate your contribution and result in less work for everybody involved. You are also encouraged to search through the list of open issues on GitHub and submit a new issue for a planned feature, so you would not duplicate the work of others (and possibly get scooped by them) or have your work duplicated by others.
|
||||
|
||||
How quickly your contribution will be integrated depends largely on how much effort it will cause to integrate and test it, how much it requires changes to the core code base, and of how much interest it is to the larger LAMMPS community. Please see below for a checklist of typical requirements. Once you have prepared everything, see [this tutorial](http://lammps.sandia.gov/doc/Howto_github.html)
|
||||
How quickly your contribution will be integrated depends largely on how much effort it will cause to integrate and test it, how much it requires changes to the core code base, and of how much interest it is to the larger LAMMPS community. Please see below for a checklist of typical requirements. Once you have prepared everything, see [this tutorial](https://lammps.sandia.gov/doc/Howto_github.html)
|
||||
for instructions on how to submit your changes or new files through a GitHub pull request
|
||||
|
||||
Here is a checklist of steps you need to follow to submit a single file or user package for our consideration. Following these steps will save both you and us time. See existing files in packages in the source directory for examples. If you are uncertain, please ask on the lammps-users mailing list.
|
||||
|
||||
* All source files you provide must compile with the most current version of LAMMPS with multiple configurations. In particular you need to test compiling LAMMPS from scratch with `-DLAMMPS_BIGBIG` set in addition to the default `-DLAMMPS_SMALLBIG` setting. Your code will need to work correctly in serial and in parallel using MPI.
|
||||
* 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 lines over 80 characters. I/O is done via the C-style stdio library, class header files should not import any system headers outside <stdio.h>, 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. Header files must not import namespaces with using. 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.
|
||||
* 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 lines over 80 characters. I/O is done via the C-style stdio library, style class header files should not import any system headers outside of <cstdio>, 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.
|
||||
* 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.
|
||||
* 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.
|
||||
|
@ -102,10 +102,10 @@ For bug reports, the next step is that one of the core LAMMPS developers will se
|
|||
|
||||
### Pull Requests
|
||||
|
||||
For submitting pull requests, there is a [detailed tutorial](http://lammps.sandia.gov/doc/Howto_github.html) in the LAMMPS manual. Thus only a brief breakdown of the steps is presented here. Please note, that the LAMMPS developers are still reviewing and trying to improve the process. If you are unsure about something, do not hesitate to post a question on the lammps-users mailing list or contact one fo the core LAMMPS developers.
|
||||
For submitting pull requests, there is a [detailed tutorial](https://lammps.sandia.gov/doc/Howto_github.html) in the LAMMPS manual. Thus only a brief breakdown of the steps is presented here. Please note, that the LAMMPS developers are still reviewing and trying to improve the process. If you are unsure about something, do not hesitate to post a question on the lammps-users mailing list or contact one fo the core LAMMPS developers.
|
||||
Immediately after the submission, the LAMMPS continuing integration server at ci.lammps.org will download your submitted branch and perform a simple compilation test, i.e. will test whether your submitted code can be compiled under various conditions. It will also do a check on whether your included documentation translates cleanly. Whether these tests are successful or fail will be recorded. If a test fails, please inspect the corresponding output on the CI server and take the necessary steps, if needed, so that the code can compile cleanly again. The test will be re-run each the pull request is updated with a push to the remote branch on GitHub.
|
||||
Next a LAMMPS core developer will self-assign and do an overall technical assessment of the submission. If you are not yet registered as a LAMMPS collaborator, you will receive an invitation for that.
|
||||
You may also receive comments and suggestions on the overall submission or specific details. If permitted, additional changes may be pushed into your pull request branch or a pull request may be filed in your LAMMPS fork on GitHub to include those changes.
|
||||
Next a LAMMPS core developer will self-assign and do an overall technical assessment of the submission. If you are not yet registered as a LAMMPS collaborator, you will receive an invitation for that. As part of the assesment, the pull request will be categorized with labels. There are two special labels: `needs_work` (indicates that work from the submitter of the pull request is needed) and `work_in_progress` (indicates, that the assigned LAMMPS developer will make changes, if not done by the contributor who made the submit).
|
||||
You may also receive comments and suggestions on the overall submission or specific details and on occasion specific requests for changes as part of the review. If permitted, also additional changes may be pushed into your pull request branch or a pull request may be filed in your LAMMPS fork on GitHub to include those changes.
|
||||
The LAMMPS developer may then decide to assign the pull request to another developer (e.g. when that developer is more knowledgeable about the submitted feature or enhancement or has written the modified code). It may also happen, that additional developers are requested to provide a review and approve the changes. For submissions, that may change the general behavior of LAMMPS, or where a possibility of unwanted side effects exists, additional tests may be requested by the assigned developer.
|
||||
If the assigned developer is satisfied and considers the submission ready for inclusion into LAMMPS, the pull request will receive approvals and be merged into the master branch by one of the core LAMMPS developers. After the pull request is merged, you may delete the feature branch used for the pull request in your personal LAMMPS fork.
|
||||
Since the learning curve for git is quite steep for efficiently managing remote repositories, local and remote branches, pull requests and more, do not hesitate to ask questions, if you are not sure about how to do certain steps that are asked of you. Even if the changes asked of you do not make sense to you, they may be important for the LAMMPS developers. Please also note, that these all are guidelines and nothing set in stone. So depending on the nature of the contribution, the workflow may be adjusted.
|
||||
|
|
|
@ -1,31 +0,0 @@
|
|||
## Summary
|
||||
|
||||
_Please provide a brief description of the issue_
|
||||
|
||||
## Type of Issue
|
||||
|
||||
_Is this a 'Bug Report' or a 'Suggestion for an Enhancement'?_
|
||||
|
||||
## Detailed Description (Enhancement Suggestion)
|
||||
|
||||
_Explain how you would like to see LAMMPS enhanced, what feature(s) you are looking for, provide references to relevant background information, and whether you are willing to implement the enhancement yourself or would like to participate in the implementation_
|
||||
|
||||
## LAMMPS Version (Bug Report)
|
||||
|
||||
_Please specify which LAMMPS version this issue was detected with. If this is not the latest development version, please stop and test that version, too, and report it here if the bug persists_
|
||||
|
||||
## Expected Behavior (Bug Report)
|
||||
|
||||
_Describe the expected behavior. Quote from the LAMMPS manual where needed or explain why the expected behavior is meaningful, especially when it differs from the manual_
|
||||
|
||||
## Actual Behavior (Bug Report)
|
||||
|
||||
_Describe the actual behavior, how it differs from the expected behavior, and how this can be observed. Try to be specific and do **not* use vague terms like "doesn't work" or "wrong result". Do not assume that the person reading this has any experience with or knowledge of your specific research._
|
||||
|
||||
## Steps to Reproduce (Bug Report)
|
||||
|
||||
_Describe the steps required to quickly reproduce the issue. You can attach (small) files to the section below or add URLs where to download an archive with all necessary files. Please try to create input that are as small as possible and run as fast as possible. NOTE: the less effort and time it takes to reproduce your issue, the more likely, that somebody will look into it._
|
||||
|
||||
## Further Information, Files, and Links
|
||||
|
||||
_Put any additional information here, attach relevant text or image files and URLs to external sites, e.g. relevant publications_
|
|
@ -0,0 +1,32 @@
|
|||
---
|
||||
name: Bug report
|
||||
about: Create a bug report to help us eliminate issues and improve LAMMPS
|
||||
title: "[BUG] _Replace With Suitable Title_"
|
||||
labels: bug
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Summary**
|
||||
|
||||
_Please provide a clear and concise description of what the bug is._
|
||||
|
||||
**LAMMPS Version and Platform**
|
||||
|
||||
_Please specify precisely which LAMMPS version this issue was detected with (the first line of the output) and what platform (operating system and its version, hardware) you are running on. If possible, test with the most recent LAMMPS patch version_
|
||||
|
||||
**Expected Behavior**
|
||||
|
||||
_Describe the expected behavior. Quote from the LAMMPS manual where needed, or explain why the expected behavior is meaningful, especially when it differs from the manual_
|
||||
|
||||
**Actual Behavior**
|
||||
|
||||
_Describe the actual behavior, how it differs from the expected behavior, and how this can be observed. Try to be specific and do **not** use vague terms like "doesn't work" or "wrong result". Do not assume that the person reading this has any experience with or knowledge of your specific area of research._
|
||||
|
||||
**Steps to Reproduce**
|
||||
|
||||
_Describe the steps required to (quickly) reproduce the issue. You can attach (small) files to the section below or add URLs where to download an archive with all necessary files. Please try to create an input set that is as minimal and small as possible and reproduces the bug as quickly as possible. **NOTE:** the less effort and time it takes to reproduce your reported bug, the more likely it becomes, that somebody will look into it and fix the problem._
|
||||
|
||||
**Further Information, Files, and Links**
|
||||
|
||||
_Put any additional information here, attach relevant text or image files and URLs to external sites, e.g. relevant publications_
|
|
@ -0,0 +1,20 @@
|
|||
---
|
||||
name: Feature request
|
||||
about: Make a suggestion for a new feature or a change to LAMMPS
|
||||
title: "[Feature Request] _Replace with Title_"
|
||||
labels: enhancement
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Summary**
|
||||
|
||||
_Please provide a brief and concise description of the suggested feature or change_
|
||||
|
||||
**Detailed Description**
|
||||
|
||||
_Please explain how you would like to see LAMMPS enhanced, what feature(s) you are looking for, what specific problems this will solve. If possible, provide references to relevant background information like publications or web pages, and whether you are planning to implement the enhancement yourself or would like to participate in the implementation. If applicable add a reference to an existing bug report or issue that this will address._
|
||||
|
||||
**Further Information, Files, and Links**
|
||||
|
||||
_Put any additional information here, attach relevant text or image files and URLs to external sites, e.g. relevant publications_
|
|
@ -0,0 +1,21 @@
|
|||
---
|
||||
name: Generic Issue
|
||||
about: For issues that do not fit any of the other categories
|
||||
title: "_Replace With a Descriptive Title_"
|
||||
labels:
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Summary**
|
||||
|
||||
_Please provide a clear and concise description of what this issue report is about._
|
||||
|
||||
**LAMMPS Version and Platform**
|
||||
|
||||
_Please specify precisely which LAMMPS version this issue was detected with (the first line of the output) and what platform (operating system and its version, hardware) you are running on. If possible, test with the most recent LAMMPS patch version_
|
||||
|
||||
**Details**
|
||||
|
||||
_Please explain the issue in detail here_
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
---
|
||||
name: Request for Help
|
||||
about: "Don't post help requests here, email the lammps-users mailing list"
|
||||
title: ""
|
||||
labels: invalid
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
Please **do not** post requests for help (e.g. with installing or using LAMMPS) here.
|
||||
Instead send an e-mail to the lammps-users mailing list.
|
||||
|
||||
This issue tracker is for tracking LAMMPS development related issues only.
|
||||
|
||||
Thanks for your cooperation.
|
|
@ -1,28 +1,43 @@
|
|||
## Purpose
|
||||
**Summary**
|
||||
|
||||
_Briefly describe the new feature(s), enhancement(s), or bugfix(es) included in this pull request. If this addresses an open GitHub Issue, mention the issue number, e.g. with `fixes #221` or `closes #135`, so that issue will be automatically closed when the pull request is merged_
|
||||
_Briefly describe the new feature(s), enhancement(s), or bugfix(es) included in this pull request._
|
||||
|
||||
## Author(s)
|
||||
**Related Issues**
|
||||
|
||||
_Please state name and affiliation of the author or authors that should be credited with the changes in this pull request_
|
||||
_If this addresses an open GitHub issue for this project, please mention the issue number here, and describe the relation. Use the phrases `fixes #221` or `closes #135`, when you want an issue to be automatically closed when the pull request is merged_
|
||||
|
||||
## Backward Compatibility
|
||||
**Author(s)**
|
||||
|
||||
_Please state whether any changes in the pull request break backward compatibility for inputs, and - if yes - explain what has been changed and why_
|
||||
_Please state name and affiliation of the author or authors that should be credited with the changes in this pull request. If this pull request adds new files to the distribution, please also provide a suitable "long-lived" e-mail address (ideally something that can outlive your institution's e-mail, in case you change jobs) for the *corresponding* author, i.e. the person the LAMMPS developers can contact directly with questions and requests related to maintenance and support of this contributed code._
|
||||
|
||||
## Implementation Notes
|
||||
**Licensing**
|
||||
|
||||
By submitting this pull request, I agree, that my contribution will be included in LAMMPS and redistributed under either the GNU General Public License version 2 (GPL v2) or the GNU Lesser General Public License version 2.1 (LGPL v2.1).
|
||||
|
||||
**Backward Compatibility**
|
||||
|
||||
_Please state whether any changes in the pull request will break backward compatibility for inputs, and - if yes - explain what has been changed and why_
|
||||
|
||||
**Implementation Notes**
|
||||
|
||||
_Provide any relevant details about how the changes are implemented, how correctness was verified, how other features - if any - in LAMMPS are affected_
|
||||
|
||||
## Post Submission Checklist
|
||||
**Post Submission Checklist**
|
||||
|
||||
_Please check the fields below as they are completed **after** the pull request has been submitted. Delete lines that don't apply_
|
||||
|
||||
_Please check the fields below as they are completed_
|
||||
- [ ] The feature or features in this pull request is complete
|
||||
- [ ] Suitable new documentation files and/or updates to the existing docs are included
|
||||
- [ ] One or more example input decks are included
|
||||
- [ ] Licensing information is complete
|
||||
- [ ] Corresponding author information is complete
|
||||
- [ ] The source code follows the LAMMPS formatting guidelines
|
||||
- [ ] Suitable new documentation files and/or updates to the existing docs are included
|
||||
- [ ] The added/updated documentation is integrated and tested with the documentation build system
|
||||
- [ ] The feature has been verified to work with the conventional build system
|
||||
- [ ] The feature has been verified to work with the CMake based build system
|
||||
- [ ] A package specific README file has been included or updated
|
||||
- [ ] One or more example input decks are included
|
||||
|
||||
## Further Information, Files, and Links
|
||||
**Further Information, Files, and Links**
|
||||
|
||||
_Put any additional information here, attach relevant text or image files, and URLs to external sites (e.g. DOIs or webpages)_
|
||||
|
||||
|
|
|
@ -0,0 +1,42 @@
|
|||
---
|
||||
name: Bug fix
|
||||
about: Submit a pull request that fixes one or more bugs
|
||||
title: "[BUGFIX] _Replace With Suitable Title_"
|
||||
labels: bugfix
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Summary**
|
||||
|
||||
_Briefly describe the bug or bugs, that are eliminated by this pull request._
|
||||
|
||||
**Related Issue(s)**
|
||||
|
||||
_If this request addresses or is related to an existing (open) GitHub issue, e.g. a bug report, mention the issue number number here following a pound sign (aka hashmark), e.g.`#222`._
|
||||
|
||||
**Author(s)**
|
||||
|
||||
_Please state name and affiliation of the author or authors that should be credited with the changes in this pull request_
|
||||
|
||||
**Licensing**
|
||||
|
||||
By submitting this pull request I implicitly accept, that my submission is subject to the same licensing terms as the files that are modified.
|
||||
|
||||
**Backward Compatibility**
|
||||
|
||||
_Please state whether any changes in the pull request break backward compatibility for inputs, and - if yes - explain what has been changed and why_
|
||||
|
||||
**Detailed Description**
|
||||
|
||||
_Provide any relevant details about how the fixed bug can be reproduced, how the changes are implemented, how correctness was verified, how other features - if any - in LAMMPS are affected_
|
||||
|
||||
## Post Submission Checklist
|
||||
|
||||
_Please check the fields below as they are completed *after* the pull request is submitted_
|
||||
- [ ] The code in this pull request is complete
|
||||
- [ ] The source code follows the LAMMPS formatting guidelines
|
||||
|
||||
## Further Information, Files, and Links
|
||||
|
||||
_Put any additional information here, attach relevant text or image files, and URLs to external sites (e.g. to download input decks for testing)_
|
|
@ -0,0 +1,35 @@
|
|||
---
|
||||
name: Maintenance or Refactoring
|
||||
about: Submit a pull request that does code refactoring or other maintenance changes
|
||||
title: "[MAINTENANCE] _Replace With Suitable Title_"
|
||||
labels: maintenance
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Summary**
|
||||
|
||||
_Briefly describe the included changes._
|
||||
|
||||
**Related Issue(s)**
|
||||
|
||||
_If this request addresses or is related to an existing (open) GitHub issue, e.g. a bug report, mention the issue number number here following a pound sign (aka hashmark), e.g.`#222`.
|
||||
|
||||
**Author(s)**
|
||||
|
||||
_Please state name and affiliation of the author or authors that should be credited with the changes in this pull request_
|
||||
|
||||
**Licensing**
|
||||
|
||||
By submitting this pull request I implicitly accept, that my submission is subject to the same licensing terms as the files that are modified.
|
||||
|
||||
**Detailed Description**
|
||||
|
||||
_Provide any relevant details about the included changes._
|
||||
|
||||
## Post Submission Checklist
|
||||
|
||||
_Please check the fields below as they are completed *after* the pull request is submitted_
|
||||
- [ ] The pull request is complete
|
||||
- [ ] The source code follows the LAMMPS formatting guidelines
|
||||
|
|
@ -0,0 +1,56 @@
|
|||
---
|
||||
name: New Feature
|
||||
about: Submit a pull request that adds new Features (complete files) to LAMMPS
|
||||
title: "[New Feature] _Replace With Suitable Title_"
|
||||
labels: enhancement
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Summary**
|
||||
|
||||
_Briefly describe the new feature(s) included in this pull request._
|
||||
|
||||
**Related Issues**
|
||||
|
||||
_If this addresses an existing (open) GitHub issue, e.g. a feature request, mention the issue number here following a pound sign (aka hashmark), e.g. `#331`._
|
||||
|
||||
**Author(s)**
|
||||
|
||||
_Please state name and affiliation of the author or authors that should be credited with the features added in this pull request. Please provide a suitable "long-lived" e-mail address (e.g. from gmail, yahoo, outlook, etc.) for the *corresponding* author, i.e. the person the LAMMPS developers can contact directly with questions and requests related to maintenance and support of this code. now and in the future_
|
||||
|
||||
**Licensing**
|
||||
|
||||
_Please add *yes* or *no* to the following two statements (please contact @lammps/core if you have questions about this)_
|
||||
|
||||
My contribution may be licensed as GPL v2 (default LAMMPS license):
|
||||
My contribution may be licensed as LGPL (for use as a library with proprietary software):
|
||||
|
||||
**Backward Compatibility**
|
||||
|
||||
_Please state if any of the changes in this pull request will affect backward compatibility for inputs, and - if yes - explain what has been changed and why_
|
||||
|
||||
**Implementation Notes**
|
||||
|
||||
_Provide any relevant details about how the new features are implemented, how correctness was verified, what platforms (OS, compiler, MPI, hardware, number of processors, accelerator(s)) it was tested on_
|
||||
|
||||
## Post Submission Checklist
|
||||
|
||||
_Please check the fields below as they are completed *after* the pull request has been submitted_
|
||||
|
||||
- [ ] The feature or features in this pull request is complete
|
||||
- [ ] Licensing information is complete
|
||||
- [ ] Corresponding author information is complete
|
||||
- [ ] The source code follows the LAMMPS formatting guidelines
|
||||
- [ ] Suitable new documentation files and/or updates to the existing docs are included
|
||||
- [ ] The added/updated documentation is integrated and tested with the documentation build system
|
||||
- [ ] The feature has been verified to work with the conventional build system
|
||||
- [ ] The feature has been verified to work with the CMake based build system
|
||||
- [ ] A package specific README file has been included or updated
|
||||
- [ ] One or more example input decks are included
|
||||
|
||||
## Further Information, Files, and Links
|
||||
|
||||
_Put any additional information here, attach relevant text or image files, and URLs to external sites (e.g. DOIs or webpages)_
|
||||
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
---
|
||||
name: Update or Enhancement
|
||||
about: Submit a pull request that provides update or enhancements for a package or feature in LAMMPS
|
||||
title: "[UPDATE] _Replace With Suitable Title_"
|
||||
labels: enhancement
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Summary**
|
||||
|
||||
_Briefly describe what kind of updates or enhancements for a package or feature are included. If you are not the original author of the package or feature, please mention, whether your contribution was created independently or in collaboration/cooperation with the original author._
|
||||
|
||||
**Author(s)**
|
||||
|
||||
_Please state name and affiliation of the author or authors that should be credited with the changes in this pull request_
|
||||
|
||||
**Licensing**
|
||||
|
||||
By submitting this pull request I implicitly accept, that my submission is subject to the same licensing terms as the original package or feature(s) that are updated or amended by this pull request.
|
||||
|
||||
**Backward Compatibility**
|
||||
|
||||
_Please state whether any changes in the pull request break backward compatibility for inputs, and - if yes - explain what has been changed and why_
|
||||
|
||||
**Implementation Notes**
|
||||
|
||||
_Provide any relevant details about how the changes are implemented, how correctness was verified, how other features - if any - in LAMMPS are affected_
|
||||
|
||||
**Post Submission Checklist**
|
||||
|
||||
_Please check the fields below as they are completed_
|
||||
- [ ] The feature or features in this pull request is complete
|
||||
- [ ] Suitable updates to the existing docs are included
|
||||
- [ ] One or more example input decks are included
|
||||
- [ ] The source code follows the LAMMPS formatting guidelines
|
||||
|
||||
**Further Information, Files, and Links**
|
||||
|
||||
_Put any additional information here, attach relevant text or image files, and URLs to external sites (e.g. DOIs or webpages)_
|
||||
|
||||
|
|
@ -11,6 +11,8 @@ get_filename_component(LAMMPS_LIB_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../lib
|
|||
get_filename_component(LAMMPS_LIB_BINARY_DIR ${CMAKE_BINARY_DIR}/lib ABSOLUTE)
|
||||
get_filename_component(LAMMPS_DOC_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../doc ABSOLUTE)
|
||||
|
||||
find_package(Git)
|
||||
|
||||
# by default, install into $HOME/.local (not /usr/local), so that no root access (and sudo!!) is needed
|
||||
if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
|
||||
set(CMAKE_INSTALL_PREFIX "$ENV{HOME}/.local" CACHE PATH "default install path" FORCE )
|
||||
|
@ -85,7 +87,7 @@ string(TOUPPER "${CMAKE_BUILD_TYPE}" BTYPE)
|
|||
# this is fast, so check for it all the time
|
||||
message(STATUS "Running check for auto-generated files from make-based build system")
|
||||
file(GLOB SRC_AUTOGEN_FILES ${LAMMPS_SOURCE_DIR}/style_*.h)
|
||||
list(APPEND SRC_AUTOGEN_FILES ${LAMMPS_SOURCE_DIR}/lmpinstalledpkgs.h)
|
||||
list(APPEND SRC_AUTOGEN_FILES ${LAMMPS_SOURCE_DIR}/lmpinstalledpkgs.h ${LAMMPS_SOURCE_DIR}/lmpgitversion.h)
|
||||
foreach(_SRC ${SRC_AUTOGEN_FILES})
|
||||
get_filename_component(FILENAME "${_SRC}" NAME)
|
||||
if(EXISTS ${LAMMPS_SOURCE_DIR}/${FILENAME})
|
||||
|
@ -178,7 +180,7 @@ set(DEFAULT_PACKAGES ASPHERE BODY CLASS2 COLLOID COMPRESS DIPOLE GRANULAR
|
|||
USER-MEAMC USER-MGPT USER-MISC USER-MOFFF USER-MOLFILE USER-NETCDF
|
||||
USER-PHONON USER-PLUMED USER-PTM USER-QTB USER-REAXC USER-SCAFACOS
|
||||
USER-SDPD USER-SMD USER-SMTBQ USER-SPH USER-TALLY USER-UEF USER-VTK
|
||||
USER-QUIP USER-QMMM)
|
||||
USER-QUIP USER-QMMM USER-YAFF USER-ADIOS)
|
||||
set(ACCEL_PACKAGES USER-OMP KOKKOS OPT USER-INTEL GPU)
|
||||
set(OTHER_PACKAGES CORESHELL QEQ)
|
||||
foreach(PKG ${DEFAULT_PACKAGES})
|
||||
|
@ -201,6 +203,17 @@ endif()
|
|||
|
||||
include_directories(${LAMMPS_SOURCE_DIR})
|
||||
|
||||
|
||||
if(PKG_USER-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
|
||||
enable_language(C)
|
||||
find_package(ADIOS2 REQUIRED)
|
||||
list(APPEND LAMMPS_LINK_LIBS adios2::adios2)
|
||||
endif()
|
||||
|
||||
|
||||
# do MPI detection after language activation, if MPI for these language is required
|
||||
find_package(MPI QUIET)
|
||||
option(BUILD_MPI "Build MPI version" ${MPI_FOUND})
|
||||
|
@ -307,10 +320,15 @@ pkg_depends(USER-LB MPI)
|
|||
pkg_depends(USER-PHONON KSPACE)
|
||||
pkg_depends(USER-SCAFACOS MPI)
|
||||
|
||||
include(CheckIncludeFileCXX)
|
||||
find_package(OpenMP QUIET)
|
||||
option(BUILD_OMP "Build with OpenMP support" ${OpenMP_FOUND})
|
||||
if(BUILD_OMP OR PKG_KOKKOS OR PKG_USER-INTEL)
|
||||
if(BUILD_OMP)
|
||||
find_package(OpenMP REQUIRED)
|
||||
check_include_file_cxx(omp.h HAVE_OMP_H_INCLUDE)
|
||||
if(NOT HAVE_OMP_H_INCLUDE)
|
||||
message(FATAL_ERROR "Cannot find required 'omp.h' header file")
|
||||
endif()
|
||||
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
|
||||
endif()
|
||||
|
@ -354,7 +372,7 @@ if(PKG_KSPACE)
|
|||
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_USER-ATC OR PKG_USER-AWPMD OR PKG_USER-PLUMED OR PKG_USER-QUIP OR PKG_LATTE)
|
||||
find_package(LAPACK)
|
||||
find_package(BLAS)
|
||||
if(NOT LAPACK_FOUND OR NOT BLAS_FOUND)
|
||||
|
@ -368,19 +386,10 @@ if(PKG_MSCG OR PKG_USER-ATC OR PKG_USER-AWPMD OR PKG_USER-QUIP OR PKG_LATTE)
|
|||
endif()
|
||||
|
||||
if(PKG_PYTHON)
|
||||
find_package(PythonInterp REQUIRED)
|
||||
find_package(PythonLibs REQUIRED)
|
||||
add_definitions(-DLMP_PYTHON)
|
||||
include_directories(${PYTHON_INCLUDE_DIR})
|
||||
list(APPEND LAMMPS_LINK_LIBS ${PYTHON_LIBRARY})
|
||||
if(BUILD_LIB AND BUILD_SHARED_LIBS)
|
||||
if(NOT PYTHON_INSTDIR)
|
||||
execute_process(COMMAND ${PYTHON_EXECUTABLE}
|
||||
-c "import distutils.sysconfig as cg; print(cg.get_python_lib(1,0,prefix='${CMAKE_INSTALL_PREFIX}'))"
|
||||
OUTPUT_VARIABLE PYTHON_INSTDIR OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
endif()
|
||||
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/../python/lammps.py DESTINATION ${PYTHON_INSTDIR})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
find_package(JPEG QUIET)
|
||||
|
@ -439,7 +448,13 @@ endif()
|
|||
|
||||
|
||||
if(PKG_VORONOI)
|
||||
option(DOWNLOAD_VORO "Download and compile the Voro++ library instead of using an already installed one" OFF)
|
||||
find_package(VORO)
|
||||
if(VORO_FOUND)
|
||||
set(DOWNLOAD_VORO_DEFAULT OFF)
|
||||
else()
|
||||
set(DOWNLOAD_VORO_DEFAULT ON)
|
||||
endif()
|
||||
option(DOWNLOAD_VORO "Download and compile the Voro++ library instead of using an already installed one" ${DOWNLOAD_VORO_DEFAULT})
|
||||
if(DOWNLOAD_VORO)
|
||||
message(STATUS "Voro++ download requested - we will build our own")
|
||||
include(ExternalProject)
|
||||
|
@ -453,7 +468,7 @@ if(PKG_VORONOI)
|
|||
set(VORO_BUILD_OPTIONS CXX=${CMAKE_CXX_COMPILER} CFLAGS=${VORO_BUILD_CFLAGS})
|
||||
|
||||
ExternalProject_Add(voro_build
|
||||
URL http://math.lbl.gov/voro++/download/dir/voro++-0.4.6.tar.gz
|
||||
URL https://download.lammps.org/thirdparty/voro++-0.4.6.tar.gz
|
||||
URL_MD5 2338b824c3b7b25590e18e8df5d68af9
|
||||
CONFIGURE_COMMAND "" BUILD_COMMAND make ${VORO_BUILD_OPTIONS} BUILD_IN_SOURCE 1 INSTALL_COMMAND ""
|
||||
)
|
||||
|
@ -472,7 +487,13 @@ if(PKG_VORONOI)
|
|||
endif()
|
||||
|
||||
if(PKG_LATTE)
|
||||
option(DOWNLOAD_LATTE "Download the LATTE library instead of using an already installed one" OFF)
|
||||
find_package(LATTE)
|
||||
if(LATTE_FOUND)
|
||||
set(DOWNLOAD_LATTE_DEFAULT OFF)
|
||||
else()
|
||||
set(DOWNLOAD_LATTE_DEFAULT ON)
|
||||
endif()
|
||||
option(DOWNLOAD_LATTE "Download the LATTE library instead of using an already installed one" ${DOWNLOAD_LATTE_DEFAULT})
|
||||
if(DOWNLOAD_LATTE)
|
||||
if (CMAKE_VERSION VERSION_LESS "3.7") # due to SOURCE_SUBDIR
|
||||
message(FATAL_ERROR "For downlading LATTE you need at least cmake-3.7")
|
||||
|
@ -483,7 +504,7 @@ if(PKG_LATTE)
|
|||
URL https://github.com/lanl/LATTE/archive/v1.2.1.tar.gz
|
||||
URL_MD5 85ac414fdada2d04619c8f936344df14
|
||||
SOURCE_SUBDIR cmake
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR> ${CMAKE_REQUEST_PIC}
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR> ${CMAKE_REQUEST_PIC} -DBLAS_LIBRARIES=${BLAS_LIBRARIES} -DLAPACK_LIBRARIES=${LAPACK_LIBRARIES}
|
||||
)
|
||||
ExternalProject_get_property(latte_build INSTALL_DIR)
|
||||
set(LATTE_LIBRARIES ${INSTALL_DIR}/${CMAKE_INSTALL_LIBDIR}/liblatte.a)
|
||||
|
@ -499,7 +520,15 @@ endif()
|
|||
|
||||
if(PKG_USER-SCAFACOS)
|
||||
find_package(GSL REQUIRED)
|
||||
option(DOWNLOAD_SCAFACOS "Download ScaFaCoS library instead of using an already installed one" OFF)
|
||||
find_package(PkgConfig QUIET)
|
||||
set(DOWNLOAD_SCAFACOS_DEFAULT ON)
|
||||
if(PKG_CONFIG_FOUND)
|
||||
pkg_check_modules(SCAFACOS QUIET scafacos)
|
||||
if(SCAFACOS_FOUND)
|
||||
set(DOWNLOAD_SCAFACOS_DEFAULT OFF)
|
||||
endif()
|
||||
endif()
|
||||
option(DOWNLOAD_SCAFACOS "Download ScaFaCoS library instead of using an already installed one" ${DOWNLOAD_SCAFACOS_DEFAULT})
|
||||
if(DOWNLOAD_SCAFACOS)
|
||||
message(STATUS "ScaFaCoS download requested - we will build our own")
|
||||
include(ExternalProject)
|
||||
|
@ -539,8 +568,8 @@ if(PKG_USER-SCAFACOS)
|
|||
list(APPEND LAMMPS_LINK_LIBS ${MPI_Fortran_LIBRARIES})
|
||||
list(APPEND LAMMPS_LINK_LIBS ${MPI_C_LIBRARIES})
|
||||
else()
|
||||
FIND_PACKAGE(PkgConfig REQUIRED)
|
||||
PKG_CHECK_MODULES(SCAFACOS scafacos REQUIRED)
|
||||
find_package(PkgConfig REQUIRED)
|
||||
pkg_check_modules(SCAFACOS REQUIRED scafacos)
|
||||
list(APPEND LAMMPS_LINK_LIBS ${SCAFACOS_LDFLAGS})
|
||||
endif()
|
||||
include_directories(${SCAFACOS_INCLUDE_DIRS})
|
||||
|
@ -554,24 +583,53 @@ if(PKG_USER-PLUMED)
|
|||
validate_option(PLUMED_MODE PLUMED_MODE_VALUES)
|
||||
string(TOUPPER ${PLUMED_MODE} PLUMED_MODE)
|
||||
|
||||
option(DOWNLOAD_PLUMED "Download Plumed package instead of using an already installed one" OFF)
|
||||
find_package(PkgConfig QUIET)
|
||||
set(DOWNLOAD_PLUMED_DEFAULT ON)
|
||||
if(PKG_CONFIG_FOUND)
|
||||
pkg_check_modules(PLUMED QUIET plumed)
|
||||
if(PLUMED_FOUND)
|
||||
set(DOWNLOAD_PLUMED_DEFAULT OFF)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
option(DOWNLOAD_PLUMED "Download Plumed package instead of using an already installed one" ${DOWNLOAD_PLUMED_DEFAULT})
|
||||
if(DOWNLOAD_PLUMED)
|
||||
if(BUILD_MPI)
|
||||
set(PLUMED_CONFIG_MPI "--enable-mpi")
|
||||
set(PLUMED_CONFIG_CC ${CMAKE_MPI_C_COMPILER})
|
||||
set(PLUMED_CONFIG_CXX ${CMAKE_MPI_CXX_COMPILER})
|
||||
else()
|
||||
set(PLUMED_CONFIG_MPI "--disable-mpi")
|
||||
set(PLUMED_CONFIG_CC ${CMAKE_C_COMPILER})
|
||||
set(PLUMED_CONFIG_CXX ${CMAKE_CXX_COMPILER})
|
||||
endif()
|
||||
if(BUILD_OMP)
|
||||
set(PLUMED_CONFIG_OMP "--enable-openmp")
|
||||
else()
|
||||
set(PLUMED_CONFIG_OMP "--disable-openmp")
|
||||
endif()
|
||||
message(STATUS "PLUMED download requested - we will build our own")
|
||||
include(ExternalProject)
|
||||
ExternalProject_Add(plumed_build
|
||||
URL https://github.com/plumed/plumed2/releases/download/v2.4.3/plumed-src-2.4.3.tgz
|
||||
URL_MD5 b1be7c48971627febc11c61b70767fc5
|
||||
URL https://github.com/plumed/plumed2/releases/download/v2.5.1/plumed-src-2.5.1.tgz
|
||||
URL_MD5 c2a7b519e32197a120cdf47e0f194f81
|
||||
BUILD_IN_SOURCE 1
|
||||
CONFIGURE_COMMAND <SOURCE_DIR>/configure --prefix=<INSTALL_DIR> ${CONFIGURE_REQUEST_PIC})
|
||||
CONFIGURE_COMMAND <SOURCE_DIR>/configure --prefix=<INSTALL_DIR>
|
||||
${CONFIGURE_REQUEST_PIC}
|
||||
--enable-modules=all
|
||||
${PLUMED_CONFIG_MPI}
|
||||
${PLUMED_CONFIG_OMP}
|
||||
CXX=${PLUMED_CONFIG_CXX}
|
||||
CC=${PLUMED_CONFIG_CC}
|
||||
)
|
||||
ExternalProject_get_property(plumed_build INSTALL_DIR)
|
||||
set(PLUMED_INSTALL_DIR ${INSTALL_DIR})
|
||||
list(APPEND LAMMPS_DEPS plumed_build)
|
||||
if(PLUMED_MODE STREQUAL "STATIC")
|
||||
add_definitions(-D__PLUMED_WRAPPER_CXX=1)
|
||||
list(APPEND LAMMPS_LINK_LIBS ${PLUMED_INSTALL_DIR}/lib/plumed/obj/kernel.o
|
||||
"${PLUMED_INSTALL_DIR}/lib/plumed/obj/PlumedStatic.o" ${GSL_LIBRARIES} ${CMAKE_DL_LIBS})
|
||||
list(APPEND LAMMPS_LINK_LIBS ${PLUMED_INSTALL_DIR}/lib/libplumed.a ${GSL_LIBRARIES} ${LAPACK_LIBRARIES} ${CMAKE_DL_LIBS})
|
||||
elseif(PLUMED_MODE STREQUAL "SHARED")
|
||||
list(APPEND LAMMPS_LINK_LIBS ${PLUMED_INSTALL_DIR}/lib/libplumed.so ${CMAKE_DL_LIBS})
|
||||
list(APPEND LAMMPS_LINK_LIBS ${PLUMED_INSTALL_DIR}/lib/libplumed.so ${PLUMED_INSTALL_DIR}/lib/libplumedKernel.so ${CMAKE_DL_LIBS})
|
||||
elseif(PLUMED_MODE STREQUAL "RUNTIME")
|
||||
add_definitions(-D__PLUMED_HAS_DLOPEN=1 -D__PLUMED_DEFAULT_KERNEL=${PLUMED_INSTALL_DIR}/lib/libplumedKernel.so)
|
||||
list(APPEND LAMMPS_LINK_LIBS ${PLUMED_INSTALL_DIR}/lib/libplumedWrapper.a -rdynamic ${CMAKE_DL_LIBS})
|
||||
|
@ -579,7 +637,7 @@ if(PKG_USER-PLUMED)
|
|||
set(PLUMED_INCLUDE_DIRS "${PLUMED_INSTALL_DIR}/include")
|
||||
else()
|
||||
find_package(PkgConfig REQUIRED)
|
||||
pkg_check_modules(PLUMED plumed REQUIRED)
|
||||
pkg_check_modules(PLUMED REQUIRED plumed)
|
||||
if(PLUMED_MODE STREQUAL "STATIC")
|
||||
add_definitions(-D__PLUMED_WRAPPER_CXX=1)
|
||||
include(${PLUMED_LIBDIR}/plumed/src/lib/Plumed.cmake.static)
|
||||
|
@ -595,9 +653,13 @@ if(PKG_USER-PLUMED)
|
|||
endif()
|
||||
|
||||
if(PKG_USER-MOLFILE)
|
||||
set(MOLFILE_INCLUDE_DIRS "${LAMMPS_LIB_SOURCE_DIR}/molfile" CACHE STRING "Path to VMD molfile plugin headers")
|
||||
add_library(molfile INTERFACE)
|
||||
target_include_directories(molfile INTERFACE ${LAMMPS_LIB_SOURCE_DIR}/molfile)
|
||||
target_link_libraries(molfile INTERFACE ${CMAKE_DL_LIBS})
|
||||
target_include_directories(molfile INTERFACE ${MOLFILE_INCLUDE_DIRS})
|
||||
# no need to link with -ldl on windows
|
||||
if(NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
|
||||
target_link_libraries(molfile INTERFACE ${CMAKE_DL_LIBS})
|
||||
endif()
|
||||
list(APPEND LAMMPS_LINK_LIBS molfile)
|
||||
endif()
|
||||
|
||||
|
@ -609,13 +671,19 @@ if(PKG_USER-NETCDF)
|
|||
endif()
|
||||
|
||||
if(PKG_USER-SMD)
|
||||
option(DOWNLOAD_EIGEN3 "Download Eigen3 instead of using an already installed one)" OFF)
|
||||
find_package(Eigen3 NO_MODULE)
|
||||
if(EIGEN3_FOUND)
|
||||
set(DOWNLOAD_EIGEN3_DEFAULT OFF)
|
||||
else()
|
||||
set(DOWNLOAD_EIGEN3_DEFAULT ON)
|
||||
endif()
|
||||
option(DOWNLOAD_EIGEN3 "Download Eigen3 instead of using an already installed one)" ${DOWNLOAD_EIGEN3_DEFAULT})
|
||||
if(DOWNLOAD_EIGEN3)
|
||||
message(STATUS "Eigen3 download requested - we will build our own")
|
||||
include(ExternalProject)
|
||||
ExternalProject_Add(Eigen3_build
|
||||
URL http://bitbucket.org/eigen/eigen/get/3.3.4.tar.gz
|
||||
URL_MD5 1a47e78efe365a97de0c022d127607c3
|
||||
URL http://bitbucket.org/eigen/eigen/get/3.3.7.tar.gz
|
||||
URL_MD5 f2a417d083fe8ca4b8ed2bc613d20f07
|
||||
CONFIGURE_COMMAND "" BUILD_COMMAND "" INSTALL_COMMAND ""
|
||||
)
|
||||
ExternalProject_get_property(Eigen3_build SOURCE_DIR)
|
||||
|
@ -651,28 +719,43 @@ if(PKG_USER-VTK)
|
|||
endif()
|
||||
|
||||
if(PKG_KIM)
|
||||
option(DOWNLOAD_KIM "Download KIM-API v1 from OpenKIM instead of using an already installed one)" OFF)
|
||||
find_package(CURL)
|
||||
if(CURL_FOUND)
|
||||
include_directories(${CURL_INCLUDE_DIRS})
|
||||
list(APPEND LAMMPS_LINK_LIBS ${CURL_LIBRARIES})
|
||||
add_definitions(-DLMP_KIM_CURL)
|
||||
endif()
|
||||
find_package(KIM-API QUIET)
|
||||
if(KIM-API_FOUND)
|
||||
set(DOWNLOAD_KIM_DEFAULT OFF)
|
||||
else()
|
||||
set(DOWNLOAD_KIM_DEFAULT ON)
|
||||
endif()
|
||||
option(DOWNLOAD_KIM "Download KIM-API from OpenKIM instead of using an already installed one" ${DOWNLOAD_KIM_DEFAULT})
|
||||
if(DOWNLOAD_KIM)
|
||||
message(STATUS "KIM-API v1 download requested - we will build our own")
|
||||
message(STATUS "KIM-API download requested - we will build our own")
|
||||
enable_language(C)
|
||||
enable_language(Fortran)
|
||||
include(ExternalProject)
|
||||
ExternalProject_Add(kim_build
|
||||
URL https://github.com/openkim/kim-api/archive/v1.9.5.tar.gz
|
||||
URL_MD5 9f66efc128da33039e30659f36fc6d00
|
||||
BUILD_IN_SOURCE 1
|
||||
CONFIGURE_COMMAND <SOURCE_DIR>/configure --prefix=<INSTALL_DIR>
|
||||
URL https://s3.openkim.org/kim-api/kim-api-2.0.2.txz
|
||||
URL_MD5 537d9c0abd30f85b875ebb584f9143fa
|
||||
BINARY_DIR build
|
||||
CMAKE_ARGS -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
|
||||
-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
|
||||
-DCMAKE_Fortran_COMPILER=${CMAKE_Fortran_COMPILER}
|
||||
-DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>
|
||||
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
|
||||
)
|
||||
ExternalProject_get_property(kim_build INSTALL_DIR)
|
||||
set(KIM_INCLUDE_DIRS ${INSTALL_DIR}/include/kim-api-v1)
|
||||
set(KIM_LIBRARIES ${INSTALL_DIR}/lib/libkim-api-v1.so)
|
||||
set(KIM-API_INCLUDE_DIRS ${INSTALL_DIR}/include/kim-api)
|
||||
set(KIM-API_LDFLAGS ${INSTALL_DIR}/${CMAKE_INSTALL_LIBDIR}/libkim-api${CMAKE_SHARED_LIBRARY_SUFFIX})
|
||||
list(APPEND LAMMPS_DEPS kim_build)
|
||||
else()
|
||||
find_package(KIM)
|
||||
if(NOT KIM_FOUND)
|
||||
message(FATAL_ERROR "KIM-API v1 not found, help CMake to find it by setting KIM_LIBRARY and KIM_INCLUDE_DIR, or set DOWNLOAD_KIM=ON to download it")
|
||||
endif()
|
||||
find_package(KIM-API REQUIRED)
|
||||
endif()
|
||||
list(APPEND LAMMPS_LINK_LIBS ${KIM_LIBRARIES})
|
||||
include_directories(${KIM_INCLUDE_DIRS})
|
||||
list(APPEND LAMMPS_LINK_LIBS "${KIM-API_LDFLAGS}")
|
||||
include_directories(${KIM-API_INCLUDE_DIRS})
|
||||
endif()
|
||||
|
||||
if(PKG_MESSAGE)
|
||||
|
@ -687,6 +770,7 @@ if(PKG_MESSAGE)
|
|||
set_target_properties(cslib PROPERTIES OUTPUT_NAME "csmpi")
|
||||
else()
|
||||
target_compile_definitions(cslib PRIVATE -DMPI_NO)
|
||||
target_include_directories(cslib PRIVATE ${LAMMPS_LIB_SOURCE_DIR}/message/cslib/src/STUBS_MPI)
|
||||
set_target_properties(cslib PROPERTIES OUTPUT_NAME "csnompi")
|
||||
endif()
|
||||
|
||||
|
@ -706,7 +790,13 @@ endif()
|
|||
|
||||
if(PKG_MSCG)
|
||||
find_package(GSL REQUIRED)
|
||||
option(DOWNLOAD_MSCG "Download MSCG library instead of using an already installed one)" OFF)
|
||||
find_package(MSCG QUIET)
|
||||
if(MSGC_FOUND)
|
||||
set(DOWNLOAD_MSCG_DEFAULT OFF)
|
||||
else()
|
||||
set(DOWNLOAD_MSCG_DEFAULT ON)
|
||||
endif()
|
||||
option(DOWNLOAD_MSCG "Download MSCG library instead of using an already installed one)" ${DOWNLOAD_MSCG_DEFAULT})
|
||||
if(DOWNLOAD_MSCG)
|
||||
if (CMAKE_VERSION VERSION_LESS "3.7") # due to SOURCE_SUBDIR
|
||||
message(FATAL_ERROR "For downlading MSCG you need at least cmake-3.7")
|
||||
|
@ -755,8 +845,7 @@ endif()
|
|||
########################################################################
|
||||
# Basic system tests (standard libraries, headers, functions, types) #
|
||||
########################################################################
|
||||
include(CheckIncludeFileCXX)
|
||||
foreach(HEADER math.h)
|
||||
foreach(HEADER cmath)
|
||||
check_include_file_cxx(${HEADER} FOUND_${HEADER})
|
||||
if(NOT FOUND_${HEADER})
|
||||
message(FATAL_ERROR "Could not find needed header - ${HEADER}")
|
||||
|
@ -922,7 +1011,7 @@ if(PKG_USER-OMP)
|
|||
|
||||
# detects styles which have USER-OMP version
|
||||
RegisterStylesExt(${USER-OMP_SOURCES_DIR} omp OMP_SOURCES)
|
||||
RegisterFixStyle("${USER-OMP_SOURCES_DIR}/fix_omp.h")
|
||||
RegisterFixStyle(${USER-OMP_SOURCES_DIR}/fix_omp.h)
|
||||
|
||||
get_property(USER-OMP_SOURCES GLOBAL PROPERTY OMP_SOURCES)
|
||||
|
||||
|
@ -1035,37 +1124,79 @@ if(PKG_OPT)
|
|||
endif()
|
||||
|
||||
if(PKG_USER-INTEL)
|
||||
find_package(TBB REQUIRED)
|
||||
find_package(MKL REQUIRED)
|
||||
if(LAMMPS_SIZES STREQUAL BIGBIG)
|
||||
message(FATAL_ERROR "The USER-INTEL Package is not compatible with -DLAMMPS_BIGBIG")
|
||||
endif()
|
||||
add_definitions(-DLMP_USER_INTEL)
|
||||
|
||||
if(NOT CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
|
||||
message(FATAL_ERROR "USER-INTEL is only useful together with intel compiler")
|
||||
endif()
|
||||
set(INTEL_ARCH "cpu" CACHE STRING "Architectures used by USER-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)
|
||||
string(TOUPPER ${INTEL_ARCH} INTEL_ARCH)
|
||||
|
||||
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}")
|
||||
endif()
|
||||
|
||||
if(NOT BUILD_OMP)
|
||||
message(FATAL_ERROR "USER-INTEL requires OpenMP")
|
||||
endif()
|
||||
|
||||
if(NOT ${LAMMPS_MEMALIGN} STREQUAL "64")
|
||||
message(FATAL_ERROR "USER-INTEL is only useful with LAMMPS_MEMALIGN=64")
|
||||
endif()
|
||||
|
||||
set(INTEL_ARCH "cpu" CACHE STRING "Architectures used by USER-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)
|
||||
string(TOUPPER ${INTEL_ARCH} INTEL_ARCH)
|
||||
|
||||
if(INTEL_ARCH STREQUAL "KNL")
|
||||
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\\\"\"")
|
||||
add_compile_options(-xMIC-AVX512 -qoffload -fno-alias -ansi-alias -restrict -qoverride-limits ${MIC_OPTIONS})
|
||||
add_definitions(-DLMP_INTEL_OFFLOAD)
|
||||
find_package(Threads QUIET)
|
||||
if(Threads_FOUND)
|
||||
set(INTEL_LRT_MODE "threads" CACHE STRING "Long-range threads mode (none, threads, or c++11)")
|
||||
else()
|
||||
set(INTEL_LRT_MODE "none" CACHE STRING "Long-range threads mode (none, threads, or c++11)")
|
||||
endif()
|
||||
set(INTEL_LRT_VALUES none threads c++11)
|
||||
set_property(CACHE INTEL_LRT_MODE PROPERTY STRINGS ${INTEL_LRT_VALUES})
|
||||
validate_option(INTEL_LRT_MODE INTEL_LRT_VALUES)
|
||||
string(TOUPPER ${INTEL_LRT_MODE} INTEL_LRT_MODE)
|
||||
if(INTEL_LRT_MODE STREQUAL "THREADS")
|
||||
if(Threads_FOUND)
|
||||
add_definitions(-DLMP_INTEL_USELRT)
|
||||
list(APPEND LAMMPS_LINK_LIBS ${CMAKE_THREAD_LIBS_INIT})
|
||||
else()
|
||||
message(FATAL_ERROR "Must have working threads library for Long-range thread support")
|
||||
endif()
|
||||
endif()
|
||||
if(INTEL_LRT_MODE STREQUAL "C++11")
|
||||
add_definitions(-DLMP_INTEL_USERLRT -DLMP_INTEL_LRT11)
|
||||
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}")
|
||||
endif()
|
||||
else()
|
||||
message(WARNING "USER-INTEL gives best performance with Intel compilers")
|
||||
endif()
|
||||
|
||||
find_package(TBB QUIET)
|
||||
if(TBB_FOUND)
|
||||
list(APPEND LAMMPS_LINK_LIBS ${TBB_MALLOC_LIBRARIES})
|
||||
else()
|
||||
add_definitions(-DLMP_INTEL_NO_TBB)
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
|
||||
message(WARNING "USER-INTEL with Intel compilers should use TBB malloc libraries")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
find_package(MKL QUIET)
|
||||
if(MKL_FOUND)
|
||||
add_definitions(-DLMP_USE_MKL_RNG)
|
||||
list(APPEND LAMMPS_LINK_LIBS ${MKL_LIBRARIES})
|
||||
else()
|
||||
message(STATUS "Pair style dpd/intel will be faster with MKL libraries")
|
||||
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")
|
||||
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")
|
||||
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\\\"\"")
|
||||
add_compile_options(-xMIC-AVX512 -qoffload -fno-alias -ansi-alias -restrict -qoverride-limits ${MIC_OPTIONS})
|
||||
add_definitions(-DLMP_INTEL_OFFLOAD)
|
||||
else()
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
|
||||
if(CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 17.3 OR CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 17.4)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -xCOMMON-AVX512")
|
||||
else()
|
||||
|
@ -1078,33 +1209,35 @@ if(PKG_USER-INTEL)
|
|||
add_compile_options(${_FLAG})
|
||||
endif()
|
||||
endforeach()
|
||||
else()
|
||||
add_compile_options(-O3 -ffast-math)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
add_definitions(-DLMP_INTEL_USELRT -DLMP_USE_MKL_RNG)
|
||||
# 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)
|
||||
|
||||
list(APPEND LAMMPS_LINK_LIBS ${TBB_MALLOC_LIBRARIES} ${MKL_LIBRARIES})
|
||||
set_property(GLOBAL PROPERTY "USER-INTEL_SOURCES" "${USER-INTEL_SOURCES}")
|
||||
|
||||
set(USER-INTEL_SOURCES_DIR ${LAMMPS_SOURCE_DIR}/USER-INTEL)
|
||||
set(USER-INTEL_SOURCES ${USER-INTEL_SOURCES_DIR}/intel_preprocess.h
|
||||
${USER-INTEL_SOURCES_DIR}/intel_buffers.h
|
||||
${USER-INTEL_SOURCES_DIR}/intel_buffers.cpp
|
||||
${USER-INTEL_SOURCES_DIR}/math_extra_intel.h
|
||||
${USER-INTEL_SOURCES_DIR}/nbin_intel.h
|
||||
${USER-INTEL_SOURCES_DIR}/nbin_intel.cpp
|
||||
${USER-INTEL_SOURCES_DIR}/npair_intel.h
|
||||
${USER-INTEL_SOURCES_DIR}/npair_intel.cpp
|
||||
${USER-INTEL_SOURCES_DIR}/intel_simd.h
|
||||
${USER-INTEL_SOURCES_DIR}/intel_intrinsics.h)
|
||||
# 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)
|
||||
|
||||
set_property(GLOBAL PROPERTY "USER-INTEL_SOURCES" "${USER-INTEL_SOURCES}")
|
||||
get_property(USER-INTEL_SOURCES GLOBAL PROPERTY USER-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)
|
||||
endif()
|
||||
|
||||
# detects styles which have USER-INTEL version
|
||||
RegisterStylesExt(${USER-INTEL_SOURCES_DIR} opt USER-INTEL_SOURCES)
|
||||
|
||||
get_property(USER-INTEL_SOURCES GLOBAL PROPERTY USER-INTEL_SOURCES)
|
||||
|
||||
list(APPEND LIB_SOURCES ${USER-INTEL_SOURCES})
|
||||
include_directories(${USER-INTEL_SOURCES_DIR})
|
||||
list(APPEND LIB_SOURCES ${USER-INTEL_SOURCES})
|
||||
include_directories(${USER-INTEL_SOURCES_DIR})
|
||||
endif()
|
||||
|
||||
if(PKG_GPU)
|
||||
|
@ -1146,6 +1279,10 @@ if(PKG_GPU)
|
|||
message(FATAL_ERROR "Could not find bin2c, use -DBIN2C=/path/to/bin2c to help cmake finding it.")
|
||||
endif()
|
||||
option(CUDPP_OPT "Enable CUDPP_OPT" ON)
|
||||
option(CUDA_MPS_SUPPORT "Enable tweaks to support CUDA Multi-process service (MPS)" OFF)
|
||||
if(CUDA_MPS_SUPPORT)
|
||||
set(GPU_CUDA_MPS_FLAGS "-DCUDA_PROXY")
|
||||
endif()
|
||||
|
||||
set(GPU_ARCH "sm_30" CACHE STRING "LAMMPS GPU CUDA SM primary architecture (e.g. sm_60)")
|
||||
|
||||
|
@ -1209,7 +1346,7 @@ if(PKG_GPU)
|
|||
add_library(gpu STATIC ${GPU_LIB_SOURCES} ${GPU_LIB_CUDPP_SOURCES} ${GPU_OBJS})
|
||||
target_link_libraries(gpu ${CUDA_LIBRARIES} ${CUDA_CUDA_LIBRARY})
|
||||
target_include_directories(gpu PRIVATE ${LAMMPS_LIB_BINARY_DIR}/gpu ${CUDA_INCLUDE_DIRS})
|
||||
target_compile_definitions(gpu PRIVATE -D_${GPU_PREC_SETTING} -DMPI_GERYON -DUCL_NO_EXIT)
|
||||
target_compile_definitions(gpu PRIVATE -D_${GPU_PREC_SETTING} -DMPI_GERYON -DUCL_NO_EXIT ${GPU_CUDA_MPS_FLAGS})
|
||||
if(CUDPP_OPT)
|
||||
target_include_directories(gpu PRIVATE ${LAMMPS_LIB_SOURCE_DIR}/gpu/cudpp_mini)
|
||||
target_compile_definitions(gpu PRIVATE -DUSE_CUDPP)
|
||||
|
@ -1235,7 +1372,15 @@ if(PKG_GPU)
|
|||
set(OCL_COMMON_HEADERS ${LAMMPS_LIB_SOURCE_DIR}/gpu/lal_preprocessor.h ${LAMMPS_LIB_SOURCE_DIR}/gpu/lal_aux_fun1.h)
|
||||
|
||||
file(GLOB GPU_LIB_CU ${LAMMPS_LIB_SOURCE_DIR}/gpu/[^.]*.cu)
|
||||
list(REMOVE_ITEM GPU_LIB_CU ${LAMMPS_LIB_SOURCE_DIR}/gpu/lal_gayberne.cu ${LAMMPS_LIB_SOURCE_DIR}/gpu/lal_gayberne_lj.cu)
|
||||
list(REMOVE_ITEM GPU_LIB_CU
|
||||
${LAMMPS_LIB_SOURCE_DIR}/gpu/lal_gayberne.cu
|
||||
${LAMMPS_LIB_SOURCE_DIR}/gpu/lal_gayberne_lj.cu
|
||||
${LAMMPS_LIB_SOURCE_DIR}/gpu/lal_re_squared.cu
|
||||
${LAMMPS_LIB_SOURCE_DIR}/gpu/lal_re_squared_lj.cu
|
||||
${LAMMPS_LIB_SOURCE_DIR}/gpu/lal_tersoff.cu
|
||||
${LAMMPS_LIB_SOURCE_DIR}/gpu/lal_tersoff_zbl.cu
|
||||
${LAMMPS_LIB_SOURCE_DIR}/gpu/lal_tersoff_mod.cu
|
||||
)
|
||||
|
||||
foreach(GPU_KERNEL ${GPU_LIB_CU})
|
||||
get_filename_component(basename ${GPU_KERNEL} NAME_WE)
|
||||
|
@ -1246,7 +1391,21 @@ if(PKG_GPU)
|
|||
|
||||
GenerateOpenCLHeader(gayberne ${CMAKE_CURRENT_BINARY_DIR}/gpu/gayberne_cl.h ${OCL_COMMON_HEADERS} ${LAMMPS_LIB_SOURCE_DIR}/gpu/lal_ellipsoid_extra.h ${LAMMPS_LIB_SOURCE_DIR}/gpu/lal_gayberne.cu)
|
||||
GenerateOpenCLHeader(gayberne_lj ${CMAKE_CURRENT_BINARY_DIR}/gpu/gayberne_lj_cl.h ${OCL_COMMON_HEADERS} ${LAMMPS_LIB_SOURCE_DIR}/gpu/lal_ellipsoid_extra.h ${LAMMPS_LIB_SOURCE_DIR}/gpu/lal_gayberne_lj.cu)
|
||||
list(APPEND GPU_LIB_SOURCES ${CMAKE_CURRENT_BINARY_DIR}/gpu/gayberne_cl.h ${CMAKE_CURRENT_BINARY_DIR}/gpu/gayberne_lj_cl.h)
|
||||
GenerateOpenCLHeader(re_squared ${CMAKE_CURRENT_BINARY_DIR}/gpu/re_squared_cl.h ${OCL_COMMON_HEADERS} ${LAMMPS_LIB_SOURCE_DIR}/gpu/lal_ellipsoid_extra.h ${LAMMPS_LIB_SOURCE_DIR}/gpu/lal_re_squared.cu)
|
||||
GenerateOpenCLHeader(re_squared_lj ${CMAKE_CURRENT_BINARY_DIR}/gpu/re_squared_lj_cl.h ${OCL_COMMON_HEADERS} ${LAMMPS_LIB_SOURCE_DIR}/gpu/lal_ellipsoid_extra.h ${LAMMPS_LIB_SOURCE_DIR}/gpu/lal_re_squared_lj.cu)
|
||||
GenerateOpenCLHeader(tersoff ${CMAKE_CURRENT_BINARY_DIR}/gpu/tersoff_cl.h ${OCL_COMMON_HEADERS} ${LAMMPS_LIB_SOURCE_DIR}/gpu/lal_tersoff_extra.h ${LAMMPS_LIB_SOURCE_DIR}/gpu/lal_tersoff.cu)
|
||||
GenerateOpenCLHeader(tersoff_zbl ${CMAKE_CURRENT_BINARY_DIR}/gpu/tersoff_zbl_cl.h ${OCL_COMMON_HEADERS} ${LAMMPS_LIB_SOURCE_DIR}/gpu/lal_tersoff_zbl_extra.h ${LAMMPS_LIB_SOURCE_DIR}/gpu/lal_tersoff_zbl.cu)
|
||||
GenerateOpenCLHeader(tersoff_mod ${CMAKE_CURRENT_BINARY_DIR}/gpu/tersoff_mod_cl.h ${OCL_COMMON_HEADERS} ${LAMMPS_LIB_SOURCE_DIR}/gpu/lal_tersoff_mod_extra.h ${LAMMPS_LIB_SOURCE_DIR}/gpu/lal_tersoff_mod.cu)
|
||||
|
||||
list(APPEND GPU_LIB_SOURCES
|
||||
${CMAKE_CURRENT_BINARY_DIR}/gpu/gayberne_cl.h
|
||||
${CMAKE_CURRENT_BINARY_DIR}/gpu/gayberne_lj_cl.h
|
||||
${CMAKE_CURRENT_BINARY_DIR}/gpu/re_squared_cl.h
|
||||
${CMAKE_CURRENT_BINARY_DIR}/gpu/re_squared_lj_cl.h
|
||||
${CMAKE_CURRENT_BINARY_DIR}/gpu/tersoff_cl.h
|
||||
${CMAKE_CURRENT_BINARY_DIR}/gpu/tersoff_zbl_cl.h
|
||||
${CMAKE_CURRENT_BINARY_DIR}/gpu/tersoff_mod_cl.h
|
||||
)
|
||||
|
||||
add_library(gpu STATIC ${GPU_LIB_SOURCES})
|
||||
target_link_libraries(gpu ${OpenCL_LIBRARIES})
|
||||
|
@ -1303,6 +1462,18 @@ message(STATUS "Generating lmpinstalledpkgs.h...")
|
|||
file(WRITE "${LAMMPS_STYLE_HEADERS_DIR}/lmpinstalledpkgs.h.tmp" "${temp}" )
|
||||
execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different "${LAMMPS_STYLE_HEADERS_DIR}/lmpinstalledpkgs.h.tmp" "${LAMMPS_STYLE_HEADERS_DIR}/lmpinstalledpkgs.h")
|
||||
|
||||
######################################
|
||||
# Generate lmpgitversion.h
|
||||
######################################
|
||||
add_custom_target(gitversion COMMAND ${CMAKE_COMMAND}
|
||||
-DCMAKE_CURRENT_SOURCE_DIR="${CMAKE_CURRENT_SOURCE_DIR}"
|
||||
-DGIT_EXECUTABLE="${GIT_EXECUTABLE}"
|
||||
-DGIT_FOUND="${GIT_FOUND}"
|
||||
-DLAMMPS_STYLE_HEADERS_DIR="${LAMMPS_STYLE_HEADERS_DIR}"
|
||||
-P ${CMAKE_CURRENT_SOURCE_DIR}/Modules/generate_lmpgitversion.cmake)
|
||||
set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES ${LAMMPS_STYLE_HEADERS_DIR}/gitversion.h)
|
||||
list(APPEND LAMMPS_DEPS gitversion)
|
||||
|
||||
###########################################
|
||||
# Actually add executable and lib to build
|
||||
############################################
|
||||
|
@ -1347,8 +1518,19 @@ if(BUILD_EXE)
|
|||
if(ENABLE_TESTING)
|
||||
add_test(ShowHelp ${LAMMPS_BINARY} -help)
|
||||
endif()
|
||||
|
||||
enable_language(C)
|
||||
get_filename_component(MSI2LMP_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../tools/msi2lmp/src ABSOLUTE)
|
||||
file(GLOB MSI2LMP_SOURCES ${MSI2LMP_SOURCE_DIR}/[^.]*.c)
|
||||
add_executable(msi2lmp ${MSI2LMP_SOURCES})
|
||||
target_link_libraries(msi2lmp m)
|
||||
install(TARGETS msi2lmp DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||
install(FILES ${LAMMPS_DOC_DIR}/msi2lmp.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)
|
||||
|
||||
endif()
|
||||
|
||||
|
||||
|
||||
###############################################################################
|
||||
# Build documentation
|
||||
###############################################################################
|
||||
|
@ -1410,11 +1592,14 @@ if(BUILD_DOC)
|
|||
endif()
|
||||
|
||||
###############################################################################
|
||||
# Install potential files in data directory
|
||||
# Install potential and force field files in data directory
|
||||
###############################################################################
|
||||
set(LAMMPS_POTENTIALS_DIR ${CMAKE_INSTALL_FULL_DATADIR}/lammps/potentials)
|
||||
install(DIRECTORY ${LAMMPS_SOURCE_DIR}/../potentials/ DESTINATION ${LAMMPS_POTENTIALS_DIR})
|
||||
|
||||
set(LAMMPS_FRC_FILES_DIR ${CMAKE_INSTALL_FULL_DATADIR}/lammps/frc_files)
|
||||
install(DIRECTORY ${LAMMPS_SOURCE_DIR}/../tools/msi2lmp/frc_files/ DESTINATION ${LAMMPS_FRC_FILES_DIR})
|
||||
|
||||
configure_file(etc/profile.d/lammps.sh.in ${CMAKE_BINARY_DIR}/etc/profile.d/lammps.sh @ONLY)
|
||||
configure_file(etc/profile.d/lammps.csh.in ${CMAKE_BINARY_DIR}/etc/profile.d/lammps.csh @ONLY)
|
||||
install(
|
||||
|
@ -1423,6 +1608,49 @@ install(
|
|||
DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/profile.d
|
||||
)
|
||||
|
||||
###############################################################################
|
||||
# Install LAMMPS lib and python module into site-packages folder with
|
||||
# "install-python" target. Behaves exactly like "make install-python" for
|
||||
# conventional build. Only available, if a shared library is built.
|
||||
# This is primarily for people that only want to use the Python wrapper.
|
||||
###############################################################################
|
||||
if(BUILD_LIB AND BUILD_SHARED_LIBS)
|
||||
find_package(PythonInterp)
|
||||
if (PYTHONINTERP_FOUND)
|
||||
add_custom_target(
|
||||
install-python
|
||||
${PYTHON_EXECUTABLE} install.py -v ${LAMMPS_SOURCE_DIR}/version.h
|
||||
-m ${CMAKE_CURRENT_SOURCE_DIR}/../python/lammps.py
|
||||
-l ${CMAKE_BINARY_DIR}/liblammps${CMAKE_SHARED_LIBRARY_SUFFIX}
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../python
|
||||
COMMENT "Installing LAMMPS Python module")
|
||||
else()
|
||||
add_custom_target(
|
||||
install-python
|
||||
${CMAKE_COMMAND} -E echo "Must have Python installed to install the LAMMPS Python module")
|
||||
endif()
|
||||
else()
|
||||
add_custom_target(
|
||||
install-python
|
||||
${CMAKE_COMMAND} -E echo "Must build LAMMPS as a shared library to use the Python module")
|
||||
endif()
|
||||
|
||||
###############################################################################
|
||||
# Add LAMMPS python module to "install" target. This is taylored for building
|
||||
# LAMMPS for package managers and with different prefix settings.
|
||||
# This requires either a shared library or that the PYTHON package is included.
|
||||
###############################################################################
|
||||
if((BUILD_LIB AND BUILD_SHARED_LIBS) OR (PKG_PYTHON))
|
||||
find_package(PythonInterp)
|
||||
if (PYTHONINTERP_FOUND)
|
||||
execute_process(COMMAND ${PYTHON_EXECUTABLE}
|
||||
-c "import distutils.sysconfig as cg; print(cg.get_python_lib(1,0,prefix='${CMAKE_INSTALL_PREFIX}'))"
|
||||
OUTPUT_VARIABLE PYTHON_DEFAULT_INSTDIR OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
set(PYTHON_INSTDIR ${PYTHON_DEFAULT_INSTDIR} CACHE PATH "Installation folder for LAMMPS Python module")
|
||||
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/../python/lammps.py DESTINATION ${PYTHON_INSTDIR})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
###############################################################################
|
||||
# Testing
|
||||
#
|
||||
|
|
|
@ -0,0 +1,59 @@
|
|||
#
|
||||
# CDDL HEADER START
|
||||
#
|
||||
# The contents of this file are subject to the terms of the Common Development
|
||||
# and Distribution License Version 1.0 (the "License").
|
||||
#
|
||||
# You can obtain a copy of the license at
|
||||
# http://www.opensource.org/licenses/CDDL-1.0. See the License for the
|
||||
# specific language governing permissions and limitations under the License.
|
||||
#
|
||||
# When distributing Covered Code, include this CDDL HEADER in each file and
|
||||
# include the License file in a prominent location with the name LICENSE.CDDL.
|
||||
# If applicable, add the following below this CDDL HEADER, with the fields
|
||||
# enclosed by brackets "[]" replaced with your own identifying information:
|
||||
#
|
||||
# Portions Copyright (c) [yyyy] [name of copyright owner]. All rights reserved.
|
||||
#
|
||||
# CDDL HEADER END
|
||||
#
|
||||
|
||||
#
|
||||
# Copyright (c) 2013--2019, Regents of the University of Minnesota.
|
||||
# All rights reserved.
|
||||
#
|
||||
# Contributors:
|
||||
# Richard Berger
|
||||
# Christoph Junghans
|
||||
# Ryan S. Elliott
|
||||
#
|
||||
|
||||
# - Find KIM-API
|
||||
#
|
||||
# sets standard pkg_check_modules variables plus:
|
||||
#
|
||||
# KIM-API-CMAKE_C_COMPILER
|
||||
# KIM-API-CMAKE_CXX_COMPILER
|
||||
# KIM-API-CMAKE_Fortran_COMPILER
|
||||
#
|
||||
|
||||
if(KIM-API_FIND_QUIETLY)
|
||||
set(REQ_OR_QUI "QUIET")
|
||||
else()
|
||||
set(REQ_OR_QUI "REQUIRED")
|
||||
endif()
|
||||
|
||||
find_package(PkgConfig ${REQ_OR_QUI})
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
pkg_check_modules(KIM-API ${REQ_OR_QUI} libkim-api>=2.0)
|
||||
|
||||
if(KIM-API_FOUND)
|
||||
pkg_get_variable(KIM-API-CMAKE_C_COMPILER libkim-api CMAKE_C_COMPILER)
|
||||
pkg_get_variable(KIM-API-CMAKE_CXX_COMPILER libkim-api CMAKE_CXX_COMPILER)
|
||||
pkg_get_variable(KIM-API_CMAKE_Fortran_COMPILER libkim-api CMAKE_Fortran_COMPILER)
|
||||
endif()
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set KIM-API_FOUND to TRUE
|
||||
# if all listed variables are TRUE
|
||||
find_package_handle_standard_args(KIM-API REQUIRED_VARS KIM-API_LIBRARIES)
|
|
@ -1,22 +0,0 @@
|
|||
# - Find kim
|
||||
# Find the native KIM headers and libraries.
|
||||
#
|
||||
# KIM_INCLUDE_DIRS - where to find kim.h, etc.
|
||||
# KIM_LIBRARIES - List of libraries when using kim.
|
||||
# KIM_FOUND - True if kim found.
|
||||
#
|
||||
|
||||
find_path(KIM_INCLUDE_DIR KIM_API.h PATH_SUFFIXES kim-api-v1)
|
||||
|
||||
find_library(KIM_LIBRARY NAMES kim-api-v1)
|
||||
|
||||
set(KIM_LIBRARIES ${KIM_LIBRARY})
|
||||
set(KIM_INCLUDE_DIRS ${KIM_INCLUDE_DIR})
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
# handle the QUIETLY and REQUIRED arguments and set KIM_FOUND to TRUE
|
||||
# if all listed variables are TRUE
|
||||
|
||||
find_package_handle_standard_args(KIM DEFAULT_MSG KIM_LIBRARY KIM_INCLUDE_DIR)
|
||||
|
||||
mark_as_advanced(KIM_INCLUDE_DIR KIM_LIBRARY )
|
|
@ -6,7 +6,7 @@ function(GenerateOpenCLHeader varname outfile files)
|
|||
foreach(IDX RANGE 2 ${ARG_END})
|
||||
list(GET ARGV ${IDX} filename)
|
||||
file(READ ${filename} content)
|
||||
string(REGEX REPLACE "\\s*//[^\n]*\n" "" content "${content}")
|
||||
string(REGEX REPLACE "\\s*//[^\n]*\n" "\n" content "${content}")
|
||||
string(REGEX REPLACE "\\\\" "\\\\\\\\" content "${content}")
|
||||
string(REGEX REPLACE "\"" "\\\\\"" content "${content}")
|
||||
string(REGEX REPLACE "([^\n]+)\n" "\"\\1\\\\n\"\n" content "${content}")
|
||||
|
|
|
@ -50,6 +50,7 @@ function(CreateStyleHeader path filename)
|
|||
list(REMOVE_AT ARGV 0 1)
|
||||
set(header_list)
|
||||
foreach(FNAME ${ARGV})
|
||||
set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS "${FNAME}")
|
||||
get_filename_component(FNAME ${FNAME} NAME)
|
||||
list(APPEND header_list ${FNAME})
|
||||
endforeach()
|
||||
|
@ -61,6 +62,7 @@ function(CreateStyleHeader path filename)
|
|||
message(STATUS "Generating ${filename}...")
|
||||
file(WRITE "${path}/${filename}.tmp" "${temp}" )
|
||||
execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different "${path}/${filename}.tmp" "${path}/${filename}")
|
||||
set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS "${path}/${filename}")
|
||||
endfunction(CreateStyleHeader)
|
||||
|
||||
function(GenerateStyleHeader path property style)
|
||||
|
@ -89,6 +91,10 @@ function(RegisterFixStyle path)
|
|||
AddStyleHeader(${path} FIX)
|
||||
endfunction(RegisterFixStyle)
|
||||
|
||||
function(RegisterIntegrateStyle path)
|
||||
AddStyleHeader(${path} INTEGRATE)
|
||||
endfunction(RegisterIntegrateStyle)
|
||||
|
||||
function(RegisterStyles search_path)
|
||||
FindStyleHeaders(${search_path} ANGLE_CLASS angle_ ANGLE ) # angle ) # force
|
||||
FindStyleHeaders(${search_path} ATOM_CLASS atom_vec_ ATOM_VEC ) # atom ) # atom atom_vec_hybrid
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
set(temp "#ifndef LMP_GIT_VERSION_H\n#define LMP_GIT_VERSION_H\n")
|
||||
set(temp_git_commit "(unknown)")
|
||||
set(temp_git_branch "(unknown)")
|
||||
set(temp_git_describe "(unknown)")
|
||||
set(temp_git_info "false")
|
||||
if(GIT_FOUND AND EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/../.git)
|
||||
set(temp_git_info "true")
|
||||
execute_process(COMMAND ${GIT_EXECUTABLE} -C ${CMAKE_CURRENT_SOURCE_DIR}/.. rev-parse HEAD
|
||||
OUTPUT_VARIABLE temp_git_commit
|
||||
ERROR_QUIET
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
execute_process(COMMAND ${GIT_EXECUTABLE} -C ${CMAKE_CURRENT_SOURCE_DIR}/.. rev-parse --abbrev-ref HEAD
|
||||
OUTPUT_VARIABLE temp_git_branch
|
||||
ERROR_QUIET
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
execute_process(COMMAND ${GIT_EXECUTABLE} -C ${CMAKE_CURRENT_SOURCE_DIR}/.. describe --dirty=-modified
|
||||
OUTPUT_VARIABLE temp_git_describe
|
||||
ERROR_QUIET
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
endif()
|
||||
|
||||
set(temp "${temp}const bool LAMMPS_NS::LAMMPS::has_git_info = ${temp_git_info};\n")
|
||||
set(temp "${temp}const char LAMMPS_NS::LAMMPS::git_commit[] = \"${temp_git_commit}\";\n")
|
||||
set(temp "${temp}const char LAMMPS_NS::LAMMPS::git_branch[] = \"${temp_git_branch}\";\n")
|
||||
set(temp "${temp}const char LAMMPS_NS::LAMMPS::git_descriptor[] = \"${temp_git_describe}\";\n")
|
||||
set(temp "${temp}#endif\n\n")
|
||||
|
||||
message(STATUS "Generating lmpgitversion.h...")
|
||||
file(WRITE "${LAMMPS_STYLE_HEADERS_DIR}/lmpgitversion.h.tmp" "${temp}" )
|
||||
execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different "${LAMMPS_STYLE_HEADERS_DIR}/lmpgitversion.h.tmp" "${LAMMPS_STYLE_HEADERS_DIR}/lmpgitversion.h")
|
|
@ -155,11 +155,13 @@ make
|
|||
|
||||
The CMake build exposes a lot of different options. In the old build system
|
||||
some of the package selections were possible by using special make target like
|
||||
`make yes-std` or `make no-lib`. Achieving the same result with cmake requires
|
||||
`make yes-std` or `make no-lib`. Achieving a similar result with cmake requires
|
||||
specifying all options manually. This can quickly become a very long command
|
||||
line that is hard to handle. While these could be stored in a simple script
|
||||
file, there is another way of defining "presets" to compile LAMMPS in a certain
|
||||
way.
|
||||
way. Since the cmake build process - contrary to the conventional build system -
|
||||
includes the compilation of the bundled libraries into the standard build process,
|
||||
the grouping of those presets is somewhat different.
|
||||
|
||||
A preset is a regular CMake script file that can use constructs such as
|
||||
variables, lists and for-loops to manipulate configuration options and create
|
||||
|
@ -171,10 +173,10 @@ Such a file can then be passed to cmake via the `-C` flag. Several examples of
|
|||
presets can be found in the `cmake/presets` folder.
|
||||
|
||||
```bash
|
||||
# build LAMMPS with all "standard" packages which don't use libraries and enable GPU package
|
||||
# build LAMMPS with all packages enabled which don't use external libraries and enable GPU package
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -C ../cmake/presets/std_nolib.cmake -D PKG_GPU=on ../cmake
|
||||
cmake -C ../cmake/presets/all_on.cmake -C ../cmake/presets/nolib.cmake -D PKG_GPU=on ../cmake
|
||||
```
|
||||
|
||||
# Reference
|
||||
|
@ -209,7 +211,7 @@ cmake -C ../cmake/presets/std_nolib.cmake -D PKG_GPU=on ../cmake
|
|||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code><CMAKE_VERBOSE_MAKEFILE/code></td>
|
||||
<td><code>CMAKE_VERBOSE_MAKEFILE</code></td>
|
||||
<td>Enable verbose output from Makefile builds (useful for debugging), the same can be achived by adding `VERBOSE=1` to the `make` call.</td>
|
||||
<td>
|
||||
<dl>
|
||||
|
@ -1429,6 +1431,17 @@ TODO
|
|||
</dl>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>INTEL_LRT_MODE</code></td>
|
||||
<td>How to support Long-range thread mode in Verlet integration</td>
|
||||
<td>
|
||||
<dl>
|
||||
<dt><code>threads</code> (default, if pthreads available)</dt>
|
||||
<dt><code>none</code> (default, if pthreads not available)</dt>
|
||||
<dt><code>c++11</code></dt>
|
||||
</dl>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
@ -1503,6 +1516,16 @@ target API.
|
|||
</dl>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>CUDA_MPS_SUPPORT</code> (CUDA only)</td>
|
||||
<td>Enable tweaks for running with Nvidia CUDA Multi-process services daemon</td>
|
||||
<td>
|
||||
<dl>
|
||||
<dt><code>on</code></dt>
|
||||
<dt><code>off</code> (default)</dt>
|
||||
</dl>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>BIN2C</code> (CUDA only)</td>
|
||||
<td>Path to bin2c executable, will automatically pick up the first one in your $PATH.</td>
|
||||
|
|
|
@ -1,2 +1,4 @@
|
|||
# set environment for LAMMPS executables to find potential files
|
||||
# set environment for LAMMPS and msi2lmp executables
|
||||
# to find potential and force field files
|
||||
if ( "$?LAMMPS_POTENTIALS" == 0 ) setenv LAMMPS_POTENTIALS @LAMMPS_POTENTIALS_DIR@
|
||||
if ( "$?MSI2LMP_LIBRARY" == 0 ) setenv MSI2LMP_LIBRARY @LAMMPS_FRC_FILES_DIR@
|
||||
|
|
|
@ -1,2 +1,5 @@
|
|||
# set environment for LAMMPS executables to find potential files
|
||||
export LAMMPS_POTENTIALS=${LAMMPS_POTENTIALS-@LAMMPS_POTENTIALS_DIR@}
|
||||
# set environment for LAMMPS and msi2lmp executables
|
||||
# to find potential and force field files
|
||||
LAMMPS_POTENTIALS=${LAMMPS_POTENTIALS-@LAMMPS_POTENTIALS_DIR@}
|
||||
MSI2LMP_LIBRARY=${MSI2LMP_LIBRARY-@LAMMPS_FRC_FILES_DIR@}
|
||||
export LAMMPS_POTENTIALS MSI2LMP_LIBRARY
|
||||
|
|
|
@ -1,21 +1,17 @@
|
|||
set(STANDARD_PACKAGES ASPHERE BODY CLASS2 COLLOID COMPRESS CORESHELL DIPOLE GPU
|
||||
GRANULAR KIM KOKKOS KSPACE LATTE MANYBODY MC MEAM MISC
|
||||
MOLECULE MPIIO MSCG OPT PERI POEMS
|
||||
PYTHON QEQ REAX REPLICA RIGID SHOCK SNAP SRD VORONOI)
|
||||
# preset that turns on all existing packages off. can be used to reset
|
||||
# an existing package selection without losing any other settings
|
||||
|
||||
set(USER_PACKAGES USER-ATC USER-AWPMD USER-BOCS USER-CGDNA USER-CGSDK USER-COLVARS
|
||||
USER-DIFFRACTION USER-DPD USER-DRUDE USER-EFF USER-FEP USER-H5MD
|
||||
USER-INTEL USER-LB USER-MANIFOLD USER-MEAMC USER-MESO
|
||||
USER-MGPT USER-MISC USER-MOFFF USER-MOLFILE
|
||||
USER-NETCDF USER-OMP USER-PHONON USER-QMMM USER-QTB
|
||||
USER-QUIP USER-REAXC USER-SDPD USER-SMD USER-SMTBQ USER-SPH USER-TALLY
|
||||
USER-UEF USER-VTK)
|
||||
|
||||
set(PACKAGES_WITH_LIB COMPRESS GPU KIM KOKKOS LATTE MEAM MPIIO MSCG POEMS PYTHON REAX VORONOI
|
||||
USER-ATC USER-AWPMD USER-COLVARS USER-H5MD USER-LB USER-MOLFILE
|
||||
USER-NETCDF USER-PLUMED USER-QMMM USER-QUIP USER-SMD USER-VTK)
|
||||
|
||||
set(ALL_PACKAGES ${STANDARD_PACKAGES} ${USER_PACKAGES})
|
||||
set(ALL_PACKAGES ASPHERE BODY CLASS2 COLLOID COMPRESS CORESHELL DIPOLE GPU
|
||||
GRANULAR KIM KOKKOS KSPACE LATTE MANYBODY MC MISC MESSAGE 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-MESO
|
||||
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-REAXC USER-SCAFACOS USER-SDPD USER-SMD USER-SMTBQ USER-SPH
|
||||
USER-TALLY USER-UEF USER-VTK USER-YAFF)
|
||||
|
||||
foreach(PKG ${ALL_PACKAGES})
|
||||
set(PKG_${PKG} OFF CACHE BOOL "" FORCE)
|
||||
|
|
|
@ -1,21 +1,19 @@
|
|||
set(STANDARD_PACKAGES ASPHERE BODY CLASS2 COLLOID COMPRESS CORESHELL DIPOLE GPU
|
||||
GRANULAR KIM KOKKOS KSPACE LATTE MANYBODY MC MEAM MISC
|
||||
MOLECULE MPIIO MSCG OPT PERI POEMS
|
||||
PYTHON QEQ REAX REPLICA RIGID SHOCK SNAP SRD VORONOI)
|
||||
# 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
|
||||
# with just a working C++ compiler and an MPI library.
|
||||
|
||||
set(USER_PACKAGES USER-ATC USER-AWPMD USER-BOCS USER-CGDNA USER-CGSDK USER-COLVARS
|
||||
USER-DIFFRACTION USER-DPD USER-DRUDE USER-EFF USER-FEP USER-H5MD
|
||||
USER-INTEL USER-LB USER-MANIFOLD USER-MEAMC USER-MESO
|
||||
USER-MGPT USER-MISC USER-MOFFF USER-MOLFILE
|
||||
USER-NETCDF USER-OMP USER-PHONON USER-QMMM USER-QTB
|
||||
USER-QUIP USER-REAXC USER-SDPD USER-SMD USER-SMTBQ USER-SPH USER-TALLY
|
||||
USER-UEF USER-VTK)
|
||||
|
||||
set(PACKAGES_WITH_LIB COMPRESS GPU KIM KOKKOS LATTE MEAM MPIIO MSCG POEMS PYTHON REAX VORONOI
|
||||
USER-ATC USER-AWPMD USER-COLVARS USER-H5MD USER-LB USER-MOLFILE
|
||||
USER-NETCDF USER-PLUMED USER-QMMM USER-QUIP USER-SMD USER-VTK)
|
||||
|
||||
set(ALL_PACKAGES ${STANDARD_PACKAGES} ${USER_PACKAGES})
|
||||
set(ALL_PACKAGES ASPHERE BODY CLASS2 COLLOID COMPRESS CORESHELL DIPOLE GPU
|
||||
GRANULAR KIM KOKKOS KSPACE LATTE MANYBODY MC MISC MESSAGE 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-MESO
|
||||
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-REAXC USER-SCAFACOS USER-SDPD USER-SMD USER-SMTBQ USER-SPH
|
||||
USER-TALLY USER-UEF USER-VTK USER-YAFF)
|
||||
|
||||
foreach(PKG ${ALL_PACKAGES})
|
||||
set(PKG_${PKG} ON CACHE BOOL "" FORCE)
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
# preset that will enable clang/clang++ with support for MPI and OpenMP (on Linux boxes)
|
||||
|
||||
set(CMAKE_CXX_COMPILER "clang++" CACHE STRING "" FORCE)
|
||||
set(CMAKE_C_COMPILER "clang" CACHE STRING "" FORCE)
|
||||
set(CMAKE_CXX_FLAGS "-Wall -Wextra -g -O2 -DNDEBG" CACHE STRING "" FORCE)
|
||||
set(MPI_CXX "clang++" CACHE STRING "" FORCE)
|
||||
set(MPI_CXX_COMPILER "mpicxx" CACHE STRING "" FORCE)
|
||||
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)
|
||||
set(OpenMP_CXX "clang++" CACHE STRING "" FORCE)
|
||||
set(OpenMP_CXX_FLAGS "-fopenmp" CACHE STRING "" FORCE)
|
||||
set(OpenMP_CXX_LIB_NAMES "omp" CACHE STRING "" FORCE)
|
||||
set(OpenMP_omp_LIBRARY "/usr/lib64/libomp.so" CACHE PATH "" FORCE)
|
||||
|
|
@ -1,71 +0,0 @@
|
|||
set(PKG_ASPHERE OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_BODY OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_CLASS2 OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_COLLOID OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_COMPRESS OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_CORESHELL OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_DIPOLE OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_GPU OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_GRANULAR OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_KIM OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_KOKKOS OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_KSPACE OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_LATTE OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_LIB OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_MANYBODY OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_MC OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_MEAM OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_MISC OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_MOLECULE OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_MPIIO OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_MSCG OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_OPT OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_PERI OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_POEMS OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_PYTHOFF OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_QEQ OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_REAX OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_REPLICA OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_RIGID OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_SHOCK OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_SNAP OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_SRD OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_VOROFFOI OFF CACHE BOOL "" FORCE)
|
||||
|
||||
set(PKG_USER OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_USER-ATC OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_USER-AWPMD OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_USER-BOCS OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_USER-CGDNA OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_USER-CGSDK OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_USER-COLVARS OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_USER-DIFFRACTIOFF OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_USER-DPD OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_USER-DRUDE OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_USER-EFF OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_USER-FEP OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_USER-H5MD OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_USER-INTEL OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_USER-LB OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_USER-MANIFOLD OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_USER-MEAMC OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_USER-MESO OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_USER-MGPT OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_USER-MISC OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_USER-MOFFF OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_USER-MOLFILE OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_USER-NETCDF OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_USER-OMP OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_USER-PHONON OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_USER-PLUMED OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_USER-QMMM OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_USER-QTB OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_USER-QUIP OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_USER-REAXC OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_USER-SDPD OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_USER-SMD OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_USER-SMTBQ OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_USER-SPH OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_USER-TALLY OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_USER-UEF OFF CACHE BOOL "" FORCE)
|
||||
set(PKG_USER-VTK OFF CACHE BOOL "" FORCE)
|
|
@ -0,0 +1,17 @@
|
|||
set(WIN_PACKAGES ASPHERE BODY CLASS2 COLLOID COMPRESS CORESHELL DIPOLE GPU
|
||||
GRANULAR KSPACE MANYBODY MC MISC 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-MESO USER-MISC USER-MOFFF USER-MOLFILE USER-OMP
|
||||
USER-PHONON USER-PTM USER-QTB USER-REAXC USER-SDPD USER-SMD
|
||||
USER-SMTBQ USER-SPH USER-TALLY USER-UEF USER-YAFF)
|
||||
|
||||
foreach(PKG ${WIN_PACKAGES})
|
||||
set(PKG_${PKG} ON CACHE BOOL "" FORCE)
|
||||
endforeach()
|
||||
|
||||
set(DOWNLOAD_VORO ON CACHE BOOL "" FORCE)
|
||||
set(DOWNLOAD_EIGEN3 ON CACHE BOOL "" FORCE)
|
||||
set(LAMMPS_MEMALIGN "0" CACHE STRING "" FORCE)
|
||||
set(INTEL_LRT_MODE "none" CACHE STRING "" FORCE)
|
|
@ -0,0 +1,8 @@
|
|||
# preset that turns on just a few, frequently used packages
|
||||
# this will be compiled quickly and handle a lot of common inputs.
|
||||
|
||||
set(ALL_PACKAGES KSPACE MANYBODY MOLECULE RIGID)
|
||||
|
||||
foreach(PKG ${ALL_PACKAGES})
|
||||
set(PKG_${PKG} ON CACHE BOOL "" FORCE)
|
||||
endforeach()
|
|
@ -0,0 +1,15 @@
|
|||
# preset that turns on a wide range of packages, some of which require
|
||||
# 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 CLASS2 COLLOID CORESHELL DIPOLE
|
||||
GRANULAR KSPACE MANYBODY MC MISC MOLECULE OPT PERI
|
||||
PYTHON QEQ REPLICA RIGID SHOCK SRD VORONOI
|
||||
USER-CGDNA USER-CGSDK USER-COLVARS USER-DIFFRACTION USER-DPD
|
||||
USER-DRUDE USER-FEP USER-MEAMC USER-MESO
|
||||
USER-MISC USER-MOFFF USER-OMP USER-PLUMED USER-PHONON USER-REAXC
|
||||
USER-SPH USER-SMD USER-UEF USER-YAFF)
|
||||
|
||||
foreach(PKG ${ALL_PACKAGES})
|
||||
set(PKG_${PKG} ON CACHE BOOL "" FORCE)
|
||||
endforeach()
|
|
@ -1,21 +1,10 @@
|
|||
set(STANDARD_PACKAGES ASPHERE BODY CLASS2 COLLOID COMPRESS CORESHELL DIPOLE GPU
|
||||
GRANULAR KIM KOKKOS KSPACE LATTE MANYBODY MC MEAM MISC
|
||||
MOLECULE MPIIO MSCG OPT PERI POEMS
|
||||
PYTHON QEQ REAX REPLICA RIGID SHOCK SNAP SRD VORONOI)
|
||||
# preset that turns off all packages that require some form of external
|
||||
# library or special compiler (fortran or cuda) or equivalent.
|
||||
|
||||
set(USER_PACKAGES USER-ATC USER-AWPMD USER-BOCS USER-CGDNA USER-CGSDK USER-COLVARS
|
||||
USER-DIFFRACTION USER-DPD USER-DRUDE USER-EFF USER-FEP USER-H5MD
|
||||
USER-INTEL USER-LB USER-MANIFOLD USER-MEAMC USER-MESO
|
||||
USER-MGPT USER-MISC USER-MOFFF USER-MOLFILE
|
||||
USER-NETCDF USER-OMP USER-PHONON USER-QMMM USER-QTB
|
||||
USER-QUIP USER-REAXC USER-SDPD USER-SMD USER-SMTBQ USER-SPH USER-TALLY
|
||||
USER-UEF USER-VTK)
|
||||
|
||||
set(PACKAGES_WITH_LIB COMPRESS GPU KIM KOKKOS LATTE MEAM MPIIO MSCG POEMS PYTHON REAX VORONOI
|
||||
USER-ATC USER-AWPMD USER-COLVARS USER-H5MD USER-LB USER-MOLFILE
|
||||
USER-NETCDF USER-PLUMED USER-QMMM USER-QUIP USER-SMD USER-VTK)
|
||||
|
||||
set(ALL_PACKAGES ${STANDARD_PACKAGES} ${USER_PACKAGES})
|
||||
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-NETCDF USER-PLUMED USER-QMMM USER-QUIP
|
||||
USER-SCAFACOS USER-SMD USER-VTK)
|
||||
|
||||
foreach(PKG ${PACKAGES_WITH_LIB})
|
||||
set(PKG_${PKG} OFF CACHE BOOL "" FORCE)
|
||||
|
|
|
@ -1,22 +0,0 @@
|
|||
set(STANDARD_PACKAGES ASPHERE BODY CLASS2 COLLOID COMPRESS CORESHELL DIPOLE GPU
|
||||
GRANULAR KIM KOKKOS KSPACE LATTE MANYBODY MC MEAM MISC
|
||||
MOLECULE MPIIO MSCG OPT PERI POEMS
|
||||
PYTHON QEQ REAX REPLICA RIGID SHOCK SNAP SRD VORONOI)
|
||||
|
||||
set(USER_PACKAGES USER-ATC USER-AWPMD USER-BOCS USER-CGDNA USER-CGSDK USER-COLVARS
|
||||
USER-DIFFRACTION USER-DPD USER-DRUDE USER-EFF USER-FEP USER-H5MD
|
||||
USER-INTEL USER-LB USER-MANIFOLD USER-MEAMC USER-MESO
|
||||
USER-MGPT USER-MISC USER-MOFFF USER-MOLFILE
|
||||
USER-NETCDF USER-OMP USER-PHONON USER-QMMM USER-QTB
|
||||
USER-QUIP USER-REAXC USER-SDPD USER-SMD USER-SMTBQ USER-SPH USER-TALLY
|
||||
USER-UEF USER-VTK)
|
||||
|
||||
set(PACKAGES_WITH_LIB COMPRESS GPU KIM KOKKOS LATTE MEAM MPIIO MSCG POEMS PYTHON REAX VORONOI
|
||||
USER-ATC USER-AWPMD USER-COLVARS USER-H5MD USER-LB USER-MOLFILE
|
||||
USER-NETCDF USER-QMMM USER-QUIP USER-SMD USER-VTK)
|
||||
|
||||
set(ALL_PACKAGES ${STANDARD_PACKAGES} ${USER_PACKAGES})
|
||||
|
||||
foreach(PKG ${STANDARD_PACKAGES})
|
||||
set(PKG_${PKG} ON CACHE BOOL "" FORCE)
|
||||
endforeach()
|
|
@ -1,26 +0,0 @@
|
|||
set(STANDARD_PACKAGES ASPHERE BODY CLASS2 COLLOID COMPRESS CORESHELL DIPOLE GPU
|
||||
GRANULAR KIM KOKKOS KSPACE LATTE MANYBODY MC MEAM MISC
|
||||
MOLECULE MPIIO MSCG OPT PERI POEMS
|
||||
PYTHON QEQ REAX REPLICA RIGID SHOCK SNAP SRD VORONOI)
|
||||
|
||||
set(USER_PACKAGES USER-ATC USER-AWPMD USER-BOCS USER-CGDNA USER-CGSDK USER-COLVARS
|
||||
USER-DIFFRACTION USER-DPD USER-DRUDE USER-EFF USER-FEP USER-H5MD
|
||||
USER-INTEL USER-LB USER-MANIFOLD USER-MEAMC USER-MESO
|
||||
USER-MGPT USER-MISC USER-MOFFF USER-MOLFILE
|
||||
USER-NETCDF USER-OMP USER-PHONON USER-QMMM USER-QTB
|
||||
USER-QUIP USER-REAXC USER-SDPD USER-SMD USER-SMTBQ USER-SPH USER-TALLY
|
||||
USER-UEF USER-VTK)
|
||||
|
||||
set(PACKAGES_WITH_LIB COMPRESS GPU KIM KOKKOS LATTE MEAM MPIIO MSCG POEMS PYTHON REAX VORONOI
|
||||
USER-ATC USER-AWPMD USER-COLVARS USER-H5MD USER-LB USER-MOLFILE
|
||||
USER-NETCDF USER-QMMM USER-QUIP USER-SMD USER-VTK)
|
||||
|
||||
set(ALL_PACKAGES ${STANDARD_PACKAGES} ${USER_PACKAGES})
|
||||
|
||||
foreach(PKG ${STANDARD_PACKAGES})
|
||||
set(PKG_${PKG} ON CACHE BOOL "" FORCE)
|
||||
endforeach()
|
||||
|
||||
foreach(PKG ${PACKAGES_WITH_LIB})
|
||||
set(PKG_${PKG} OFF CACHE BOOL "" FORCE)
|
||||
endforeach()
|
|
@ -1,22 +0,0 @@
|
|||
set(STANDARD_PACKAGES ASPHERE BODY CLASS2 COLLOID COMPRESS CORESHELL DIPOLE GPU
|
||||
GRANULAR KIM KOKKOS KSPACE LATTE MANYBODY MC MEAM MISC
|
||||
MOLECULE MPIIO MSCG OPT PERI POEMS
|
||||
PYTHON QEQ REAX REPLICA RIGID SHOCK SNAP SRD VORONOI)
|
||||
|
||||
set(USER_PACKAGES USER-ATC USER-AWPMD USER-BOCS USER-CGDNA USER-CGSDK USER-COLVARS
|
||||
USER-DIFFRACTION USER-DPD USER-DRUDE USER-EFF USER-FEP USER-H5MD
|
||||
USER-INTEL USER-LB USER-MANIFOLD USER-MEAMC USER-MESO
|
||||
USER-MGPT USER-MISC USER-MOFFF USER-MOLFILE
|
||||
USER-NETCDF USER-OMP USER-PHONON USER-QMMM USER-QTB
|
||||
USER-QUIP USER-REAXC USER-SDPD USER-SMD USER-SMTBQ USER-SPH USER-TALLY
|
||||
USER-UEF USER-VTK)
|
||||
|
||||
set(PACKAGES_WITH_LIB COMPRESS GPU KIM KOKKOS LATTE MEAM MPIIO MSCG POEMS PYTHON REAX VORONOI
|
||||
USER-ATC USER-AWPMD USER-COLVARS USER-H5MD USER-LB USER-MOLFILE
|
||||
USER-NETCDF USER-PLUMED USER-QMMM USER-QUIP USER-SMD USER-VTK)
|
||||
|
||||
set(ALL_PACKAGES ${STANDARD_PACKAGES} ${USER_PACKAGES})
|
||||
|
||||
foreach(PKG ${USER_PACKAGES})
|
||||
set(PKG_${PKG} ON CACHE BOOL "" FORCE)
|
||||
endforeach()
|
|
@ -1,4 +1,6 @@
|
|||
/old
|
||||
/html
|
||||
/latex
|
||||
/spelling
|
||||
/LAMMPS.epub
|
||||
/LAMMPS.mobi
|
||||
|
|
60
doc/Makefile
|
@ -39,7 +39,7 @@ help:
|
|||
@echo "Please use \`make <target>' where <target> is one of"
|
||||
@echo " html create HTML doc pages in html dir"
|
||||
@echo " pdf create Developer.pdf and Manual.pdf in this dir"
|
||||
@echo " old create old-style HTML doc pages in old dir"
|
||||
@echo " old create old-style HTML doc pages and Manual.pdf in old 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)"
|
||||
|
@ -48,6 +48,7 @@ help:
|
|||
@echo " clean-all reset the entire build environment"
|
||||
@echo " txt2html build txt2html tool"
|
||||
@echo " anchor_check scan for duplicate anchor labels"
|
||||
@echo " spelling spell-check the manual"
|
||||
|
||||
# ------------------------------------------
|
||||
|
||||
|
@ -55,7 +56,7 @@ clean-all: clean
|
|||
rm -rf $(BUILDDIR)/* utils/txt2html/txt2html.exe
|
||||
|
||||
clean:
|
||||
rm -rf $(RSTDIR) html old epub
|
||||
rm -rf $(RSTDIR) html old epub latex
|
||||
rm -rf spelling
|
||||
|
||||
clean-spelling:
|
||||
|
@ -114,21 +115,44 @@ mobi: epub
|
|||
@ebook-convert LAMMPS.epub LAMMPS.mobi
|
||||
@echo "Conversion finished. The MOBI manual file is created."
|
||||
|
||||
pdf: utils/txt2html/txt2html.exe
|
||||
pdf: $(OBJECTS) $(ANCHORCHECK)
|
||||
@(\
|
||||
set -e; \
|
||||
cd src/Developer; \
|
||||
pdflatex developer; \
|
||||
pdflatex developer; \
|
||||
mv developer.pdf ../../Developer.pdf; \
|
||||
cd ..; \
|
||||
../utils/txt2html/txt2html.exe -b *.txt; \
|
||||
htmldoc --batch lammps.book; \
|
||||
for s in `echo *.txt | sed -e 's/ \(pairs\|bonds\|angles\|dihedrals\|impropers\|commands_list\|fixes\|computes\).txt/ /g' | sed -e 's,\.txt,\.html,g'` ; \
|
||||
do grep -q ^$$s lammps.book || \
|
||||
echo WARNING: doc file $$s missing in src/lammps.book; done; \
|
||||
rm *.html; \
|
||||
cd ../../; \
|
||||
)
|
||||
@(\
|
||||
. $(VENV)/bin/activate ;\
|
||||
cp -r src/* $(RSTDIR)/ ;\
|
||||
sphinx-build $(SPHINXEXTRA) -b latex -c utils/sphinx-config -d $(BUILDDIR)/doctrees $(RSTDIR) latex ;\
|
||||
echo "############################################" ;\
|
||||
doc_anchor_check src/*.txt ;\
|
||||
echo "############################################" ;\
|
||||
deactivate ;\
|
||||
)
|
||||
@cd latex && \
|
||||
sed 's/latexmk -pdf -dvi- -ps-/pdflatex/g' Makefile > temp && \
|
||||
mv temp Makefile && \
|
||||
sed 's/\\begin{equation}//g' LAMMPS.tex > tmp.tex && \
|
||||
mv tmp.tex LAMMPS.tex && \
|
||||
sed 's/\\end{equation}//g' LAMMPS.tex > tmp.tex && \
|
||||
mv tmp.tex LAMMPS.tex && \
|
||||
make && \
|
||||
make && \
|
||||
mv LAMMPS.pdf ../Manual.pdf && \
|
||||
cd ../;
|
||||
@rm -rf latex/_sources
|
||||
@rm -rf latex/PDF
|
||||
@rm -rf latex/USER
|
||||
@cp -r src/PDF latex/PDF
|
||||
@cp -r src/USER latex/USER
|
||||
@rm -rf latex/PDF/.[sg]*
|
||||
@rm -rf latex/USER/.[sg]*
|
||||
@rm -rf latex/USER/*/.[sg]*
|
||||
@rm -rf latex/USER/*/*.[sg]*
|
||||
@echo "Build finished. Manual.pdf and Developer.pdf are in this directory."
|
||||
|
||||
old: utils/txt2html/txt2html.exe
|
||||
@rm -rf old
|
||||
|
@ -138,6 +162,18 @@ old: utils/txt2html/txt2html.exe
|
|||
cp Eqs/*.jpg ../old/Eqs; \
|
||||
cp JPG/* ../old/JPG; \
|
||||
cp PDF/* ../old/PDF;
|
||||
@( set -e;\
|
||||
cd src/Developer; \
|
||||
pdflatex developer; \
|
||||
pdflatex developer; \
|
||||
mv developer.pdf ../../old/Developer.pdf; \
|
||||
cd ../../old; \
|
||||
for s in `echo ../src/*.txt | sed -e 's,\.\./src/,,g' -e 's/ \(pairs\|bonds\|angles\|dihedrals\|impropers\|commands_list\|fixes\|computes\).txt/ /g' | sed -e 's,\.txt,\.html,g'` ; \
|
||||
do grep -q ^$$s ../src/lammps.book || \
|
||||
echo WARNING: doc file $$s missing in src/lammps.book; done; \
|
||||
htmldoc --batch ../src/lammps.book; \
|
||||
)
|
||||
|
||||
|
||||
fetch:
|
||||
@rm -rf html_www Manual_www.pdf Developer_www.pdf
|
||||
|
@ -175,7 +211,7 @@ $(VENV):
|
|||
@( \
|
||||
$(VIRTUALENV) -p $(PYTHON) $(VENV); \
|
||||
. $(VENV)/bin/activate; \
|
||||
pip install Sphinx; \
|
||||
pip install Sphinx==1.7.6; \
|
||||
deactivate;\
|
||||
)
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ choices the LAMMPS developers have agreed on. Git and GitHub provide the
|
|||
tools, but do not set policies, so it is up to the developers to come to
|
||||
an agreement as to how to define and interpret policies. This document
|
||||
is likely to change as our experiences and needs change and we try to
|
||||
adapt accordingly. Last change 2018-11-15.
|
||||
adapt accordingly. Last change 2018-12-19.
|
||||
|
||||
## Table of Contents
|
||||
|
||||
|
@ -50,8 +50,8 @@ This is indicated by who the pull request is assigned to. LAMMPS core
|
|||
developers can self-assign or they can decide to assign a pull request
|
||||
to a different LAMMPS developer. Being assigned to a pull request means,
|
||||
that this pull request may need some work and the assignee is tasked to
|
||||
determine what this might be needed or not, and may either implement the
|
||||
required changes or ask the submitter of the pull request to implement
|
||||
determine whether this might be needed or not, and may either implement
|
||||
the required changes or ask the submitter of the pull request to implement
|
||||
them. Even though, all LAMMPS developers may have write access to pull
|
||||
requests (if enabled by the submitter, which is the default), only the
|
||||
submitter or the assignee of a pull request may do so. During this
|
||||
|
@ -76,12 +76,15 @@ People can be assigned to review a pull request in two ways:
|
|||
Reviewers are requested to state their appraisal of the proposed changes
|
||||
and either approve or request changes. People may unassign themselves
|
||||
from review, if they feel not competent about the changes proposed. At
|
||||
least one review from a LAMMPS developer with write access is required
|
||||
before merging in addition to the automated compilation tests. The
|
||||
feature, that reviews from code owners are "hard" reviews (i.e. they
|
||||
must all be approved before merging is allowed), is currently disabled
|
||||
and it is in the discretion of the merge maintainer to assess when
|
||||
a sufficient degree of approval has been reached. Reviews may be
|
||||
least two approvals from LAMMPS developers with write access are required
|
||||
before merging in addition to the automated compilation tests.
|
||||
Merging counts as implicit approval, so does submission of a pull request
|
||||
(by a LAMMPS developer). So the person doing the merge may not also submit
|
||||
an approving review. The feature, that reviews from code owners are "hard"
|
||||
reviews (i.e. they must all be approved before merging is allowed), is
|
||||
currently disabled and it is in the discretion of the merge maintainer to
|
||||
assess when a sufficient degree of approval, especially from external
|
||||
contributors, has been reached in these cases. Reviews may be
|
||||
(automatically) dismissed, when the reviewed code has been changed,
|
||||
and then approval is required a second time.
|
||||
|
||||
|
@ -120,7 +123,7 @@ Here are some items to check:
|
|||
* float.h -> cfloat
|
||||
* limits.h -> climits
|
||||
* math.h -> cmath
|
||||
* omplex.h -> complex
|
||||
* complex.h -> complex
|
||||
* setjmp.h -> csetjmp
|
||||
* signal.h -> csignal
|
||||
* stddef.h -> cstddef
|
||||
|
@ -129,16 +132,17 @@ Here are some items to check:
|
|||
* stdlib.h -> cstdlib
|
||||
* string.h -> cstring
|
||||
* time.h -> ctime
|
||||
Do not replace (as they are C++-11): `inttypes.h` and `stdint.h`.
|
||||
* Do NOT replace (as they are C++-11): `inttypes.h` and `stdint.h`.
|
||||
* Code should follow the C++-98 standard. C++-11 is only accepted
|
||||
in individual special purpose packages
|
||||
* indentation is two spaces per level
|
||||
* there should be no tabs and no trailing whitespace
|
||||
* indentation is 2 spaces per level
|
||||
* there should be NO tabs and no trailing whitespace
|
||||
* header files, especially of new styles, should not include any
|
||||
other headers, except the header with the base class or cstdio.
|
||||
Forward declarations should be used instead when possible.
|
||||
* iostreams should be avoided. LAMMPS uses stdio from the C-library.
|
||||
* use of STL in headers and class definitions should be avoided.
|
||||
* there MUST NOT be any "using namespace XXX;" statements in headers.
|
||||
* static class members should be avoided at all cost.
|
||||
* anything storing atom IDs should be using `tagint` and not `int`.
|
||||
This can be flagged by the compiler only for pointers and only when
|
||||
|
|
259
doc/lammps.1
|
@ -1,40 +1,259 @@
|
|||
.TH LAMMPS "2018-08-22"
|
||||
.TH LAMMPS "30 April 2019" "2019-04-30"
|
||||
.SH NAME
|
||||
.B LAMMPS
|
||||
\- Molecular Dynamics Simulator.
|
||||
|
||||
.SH SYNOPSIS
|
||||
.B lmp
|
||||
-in in.file
|
||||
.B lmp
|
||||
\-in <input file> [OPTIONS] ...
|
||||
|
||||
or
|
||||
|
||||
mpirun \-np 2
|
||||
.B lmp
|
||||
-in in.file
|
||||
mpirun \-np 2
|
||||
.B lmp
|
||||
<input file> [OPTIONS] ...
|
||||
|
||||
or
|
||||
|
||||
.B lmp
|
||||
\-r2data file.restart file.data
|
||||
|
||||
.SH DESCRIPTION
|
||||
.B LAMMPS
|
||||
LAMMPS is a classical molecular dynamics code, and an acronym for Large-scale
|
||||
Atomic/Molecular Massively Parallel Simulator. LAMMPS has potentials for soft
|
||||
materials (biomolecules, polymers) and solid-state materials (metals,
|
||||
semiconductors) and coarse-grained or mesoscopic systems. It can be used to
|
||||
model atoms or, more generically, as a parallel particle simulator at the
|
||||
.B LAMMPS
|
||||
is a classical molecular dynamics code, and an acronym for \fBL\fRarge-scale
|
||||
\fBA\fRtomic/\fBM\fRolecular \fBM\fRassively \fBP\fRarallel \fBS\fRimulator.
|
||||
.B LAMMPS
|
||||
has potentials for soft
|
||||
materials (bio-molecules, polymers) and solid-state materials (metals,
|
||||
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 http://lammps.sandia.gov/ for documentation.
|
||||
See https://lammps.sandia.gov/ for more information and documentation.
|
||||
|
||||
.SH EXECUTABLE NAME
|
||||
The
|
||||
.B LAMMPS
|
||||
executable can have different names depending on how it was configured,
|
||||
compiled and installed. It will be either
|
||||
.B lmp
|
||||
or
|
||||
.B lmp_<machine name>.
|
||||
The <machine name> suffix corresponds to the (machine specific) makefile
|
||||
used to compile
|
||||
.B LAMMPS
|
||||
when using the conventional build process. When building
|
||||
.B LAMMPS
|
||||
using
|
||||
.B CMake
|
||||
this <machine name> parameter can be chosen arbitrarily at configuration
|
||||
time, but more common is to just use
|
||||
.B lmp
|
||||
without a suffix. In this manpage we will use
|
||||
.B lmp
|
||||
to represent any of those names.
|
||||
|
||||
.SH OPTIONS
|
||||
See https://lammps.sandia.gov/doc/Run_options.html for details on
|
||||
command-line options.
|
||||
|
||||
.SH COPYRIGHT
|
||||
© 2003--2018 Sandia Corporation
|
||||
.TP
|
||||
\fB\-h\fR or \fB\-help\fR
|
||||
Print a brief help summary and a list of settings and options compiled
|
||||
into this executable. It also explicitly lists all LAMMPS styles
|
||||
(atom_style, fix, compute, pair_style, bond_style, etc) available in
|
||||
the specific executable. This can tell you if the command you want to
|
||||
use was included via the appropriate package at compile time.
|
||||
LAMMPS will print the info and immediately exit if this switch is used.
|
||||
.TP
|
||||
\fB\-e\fR or \fB\-echo\fR
|
||||
Set the style of command echoing. The style can be
|
||||
.B none
|
||||
or
|
||||
.B screen
|
||||
or
|
||||
.B log
|
||||
or
|
||||
.B both.
|
||||
Depending on the style, each command read from the input script will
|
||||
be echoed to the screen and/or logfile. This can be useful to figure
|
||||
out which line of your script is causing an input error.
|
||||
The default value is
|
||||
.B log.
|
||||
.TP
|
||||
\fB\-i <input file>\fR or \fB\-in <input file>\fR
|
||||
Specify a file to use as an input script. If it is not specified,
|
||||
LAMMPS reads its script from standard input. This is a required
|
||||
switch when running LAMMPS in multi-partition mode.
|
||||
.TP
|
||||
\fB\-k on/off [keyword value]\fR or \fB\-kokkos on/off [keyword value]\fR
|
||||
Enable or disable general KOKKOS support, as provided by the KOKKOS
|
||||
package. Even if LAMMPS is built with this package, this switch must
|
||||
be set to \fBon\fR to enable running with KOKKOS-enabled styles. More
|
||||
details on this switch and its optional keyword value pairs are discussed
|
||||
at: https://lammps.sandia.gov/doc/Run_options.html
|
||||
.TP
|
||||
\fB\-l <log file>\fR or \fB\-log <log file>\fR
|
||||
Specify a log file for LAMMPS to write status information to.
|
||||
The default value is "log.lammps". If the file name "none" is used,
|
||||
\fBLAMMPS\fR will not write a log file. In multi-partition mode only
|
||||
some high-level all-partition information is written to the "<log file>"
|
||||
file, the remainder is written in a per-partition file "<log file>.N"
|
||||
with "N" being the respective partition number, unless overridden
|
||||
by the \-plog flag (see below).
|
||||
.TP
|
||||
\fB\-m <number>\fR or \fB\-mpicolor <number>\fR
|
||||
If used, this must be the first command-line argument after the
|
||||
.B LAMMPS
|
||||
executable name. It is only used when
|
||||
.B LAMMPS
|
||||
is launched by an mpirun command which also launches one or more
|
||||
other executable(s) at the same time.
|
||||
.B LAMMPS
|
||||
and the other executable(s) perform an MPI_Comm_split(), each with
|
||||
their own different colors, to split the MPI_COMM_WORLD communicator
|
||||
for each executable to the subset of processors they are supposed to
|
||||
be actually running on. Currently, this is only used in
|
||||
.B LAMMPS
|
||||
to perform client/server messaging with another application.
|
||||
.B LAMMPS
|
||||
can act as either a client or server (or both).
|
||||
.TP
|
||||
\fB\-nc\fR or \fB\-nocite\fR
|
||||
Disable writing the "log.cite" file which is normally written to
|
||||
list references for specific cite-able features used during a
|
||||
.B LAMMPS
|
||||
run.
|
||||
.TP
|
||||
\fB\-pk <style> [options]\fR or \fB\-package <style> [options]\fR
|
||||
Invoke the \fBpackage\R command with <style> and optional arguments.
|
||||
The syntax is the same as if the command appeared in an input script.
|
||||
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
|
||||
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.
|
||||
.TP
|
||||
\fB\-p\fR or \fB\-partition\fR
|
||||
Invoke
|
||||
.B LAMMPS
|
||||
in multi-partition mode. Without this,
|
||||
.B LAMMPS
|
||||
uses all P processors allocated via MPI to run a single simulation.
|
||||
If this switch is used, the P processors are split into separate
|
||||
partitions and each partition runs its own simulation. The arguments
|
||||
to the switch specify the number of processors in each partition.
|
||||
Arguments of the form "MxN" mean M partitions, each with N processors.
|
||||
Arguments of the form "N" mean a single partition with N processors.
|
||||
The sum of processors in all partitions must be equal P. Thus the
|
||||
command “-partition 8x2 4 5” has 10 partitions and runs on a total
|
||||
of 25 processors. Running with multiple partitions is required for
|
||||
multi-replica simulations, where each replica runs on on one or more
|
||||
few processors.
|
||||
.TP
|
||||
\fB\-pl <basename>\fR or \fB\-plog <basename>\fR
|
||||
Specify the base name for the per-partition log files in multi-partition
|
||||
runs, where partition N writes log information to <basename>.N.
|
||||
If basename is set to "none", then no per-partition log files are created.
|
||||
This overrides the name specified in the \-log command-line option.
|
||||
.TP
|
||||
\fB\-ps <basename>\fR or \fB\-pscreen <basename>\fR
|
||||
Specify the base name for the per-partition screen files in multi-partition
|
||||
runs, where partition N writes screen output to <basename>.N.
|
||||
If basename is set to "none", then no per-partition screen files are created.
|
||||
The default value is "screen" or whatever is set by the \-screen flag.
|
||||
.TP
|
||||
\fB\-r2data <restart file> [remap] <data file>\fR or
|
||||
\fB\-restart2data <restart file> [remap] <data file>\fR
|
||||
Convert <restart file> previously written by
|
||||
.B LAMMPS
|
||||
into a data file and immediately exit. This option has replaced the
|
||||
external restart2data executable. Following <restart file>
|
||||
argument, the optional word "remap" may be used. This has the
|
||||
same effect like adding it to a "read_restart" command.
|
||||
The syntax following the <data file> name is identical to the
|
||||
arguments of the "write_data" command. See the
|
||||
.B LAMMPS
|
||||
manual for details on either of the two commands.
|
||||
.TP
|
||||
\fB\-r2dump <restart file> [remap] <dump file>\fR or
|
||||
\fB\-restart2dump <restart file> [remap] <dump file>\fR
|
||||
Convert <restart file> previously written by
|
||||
.B LAMMPS
|
||||
into a dump file and immediately exit. Following <restart file>
|
||||
argument, the optional word "remap" may be used. This has the
|
||||
same effect like adding it to a "read_restart" command.
|
||||
The syntax following the <dump file> name is identical to the
|
||||
arguments of the "dump" command. See the
|
||||
.B LAMMPS
|
||||
manual for details on either of the two commands.
|
||||
.TP
|
||||
\fB\-sc <file name>\fR or \fB\-screen <file name>\fR
|
||||
Specify a file for
|
||||
.B LAMMPS
|
||||
to write its screen information to. By default, this will be
|
||||
the standard output. If <file name> is "none", (most) screen
|
||||
output will be suppressed. In multi-partition mode only
|
||||
some high-level all-partition information is written to the
|
||||
screen or "<file name>" file, the remainder is written in a
|
||||
per-partition file "screen.N" or "<file name>.N"
|
||||
with "N" being the respective partition number, and unless
|
||||
overridden by the \-pscreen flag (see above).
|
||||
.TP
|
||||
\fB\-sf <suffix>\fR or \fB\-suffix <suffix>\fR
|
||||
Use variants of various styles in the input, if they exist. This is
|
||||
achieved by transparently trying to convert a style named <my/style>
|
||||
into <my/style/suffix> if that latter style exists, but otherwise
|
||||
fall back to the former. The most useful suffixes are "gpu",
|
||||
"intel", "kk", "omp", "opt", or "hybrid". These refer to styles from
|
||||
optional packages that LAMMPS can be built with. The hybrid suffix is
|
||||
special, as it enables, having two suffixes tried (e.g. first "intel"
|
||||
and then "omp") and thus requires two arguments. Along with the
|
||||
"-package" command-line switch, this is a convenient mechanism for
|
||||
invoking styles from accelerator packages and setting their options
|
||||
without having to edit an input script.
|
||||
|
||||
See https://lammps.sandia.gov/doc/Run_options.html for additional
|
||||
details and discussions on command-line options.
|
||||
|
||||
.SH LAMMPS BASICS
|
||||
LAMMPS executes by reading commands from a input script (text file),
|
||||
one line at a time. When the input script ends, LAMMPS exits. Each
|
||||
command causes LAMMPS to take some action. It may set or change an
|
||||
internal, read and parse a file, or run a simulation. Most commands
|
||||
have default settings, which means you only need to use the command
|
||||
if you wish to change the default.
|
||||
|
||||
The ordering of commands in an input script is usually not very important
|
||||
unless a command like "run" is encountered, which starts some calculation
|
||||
using the current internal state. Also, if a "pair_style" or "bond_style"
|
||||
other similar style command is issued that has a different name from what
|
||||
was previously active, it will replace the previous style and wipe out
|
||||
all corresponding "pair_coeff" or "bond_coeff" or equivalent settings.
|
||||
Some commands are only valid when they follow other commands. For
|
||||
example you cannot set the temperature of a group of atoms until atoms
|
||||
have been defined and a group command is used to define which atoms
|
||||
belong to the group of a given name. Sometimes command B will use values
|
||||
that can be set by command A. This means command A must precede command
|
||||
B in the input to have the desired effect. Some commands must be issued
|
||||
.B before
|
||||
the simulation box is defined and others can only be issued
|
||||
.B after.
|
||||
Many input script errors are detected by
|
||||
.B LAMMPS
|
||||
and an ERROR or WARNING message is printed. The documentation for
|
||||
each command lists restrictions on how the command can be used, and
|
||||
the chapter on errors in the
|
||||
.B LAMMPS
|
||||
manual gives some additional information about error messages, if possible.
|
||||
|
||||
.SH COPYRIGHT
|
||||
© 2003--2019 Sandia Corporation
|
||||
|
||||
This package is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
it under the terms of the GNU General Public License version 2 as
|
||||
published by the Free Software Foundation.
|
||||
|
||||
This package is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
|
|
@ -0,0 +1,111 @@
|
|||
.TH MSI2LMP "v3.9.9" "2018-11-05"
|
||||
.SH NAME
|
||||
.B MSI2LMP
|
||||
\- Converter for Materials Studio files to LAMMPS
|
||||
|
||||
.SH SYNOPSIS
|
||||
.B msi2lmp
|
||||
<ROOTNAME> [-class <I|1|II|2|O|0>] [-frc <path to frc file>] [-print #] [-ignore] [-nocenter] [-oldstyle] [-shift <x> <y> <z>]
|
||||
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
.B MSI2LMP
|
||||
is a tool bundled with LAMMPS to aide in the conversion of simulation
|
||||
inputs from Biovia's Materials Studio software for use with LAMMPS.
|
||||
It is a standalone program that generates a LAMMPS data file based on
|
||||
the information in an MS .car file (atom coordinates), an .mdf file
|
||||
(molecular topology and atom types) and an .frc (forcefield parameters)
|
||||
file. The .car and .mdf files are specific to a molecular system while
|
||||
the .frc file is specific to a forcefield (variant). The only coherency
|
||||
needed between .frc and .car/.mdf files are the atom types.
|
||||
.PP
|
||||
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
\fB\<ROOTNAME>\fR
|
||||
This has to be the first argument and is a
|
||||
.B mandatory
|
||||
argument. It defines the root of the file names; i.e. for a
|
||||
.B <ROOTNAME>
|
||||
of benzene, you have to provide the files 'benzene.car' and 'benzene.mdf'
|
||||
in the current working directory.
|
||||
.B msi2lmp
|
||||
will then read and process those files according to its remaining settings.
|
||||
All other settins are optional and have defaults as listed.
|
||||
.TP
|
||||
\fB\-c <I,1,II,2,O,0>\fR, \fB\-class <I,1,II,2,O,0>\fR
|
||||
The \-c or \-class option selects the force field class, i.e which pair
|
||||
styles and bond styles and so on are required in the LAMMPS input file.
|
||||
Class I or class 1 uses similar combination of functional forms as Amber
|
||||
and Charmm force field and support the force fields
|
||||
.B cvff
|
||||
and
|
||||
.B clayff.
|
||||
Class II or class 2 corresponds to the more complex force fields
|
||||
.B COMPASS
|
||||
and
|
||||
.B pcff.
|
||||
Class O or class 0 finally is an experimental and incomplete extension
|
||||
and supports generating output for
|
||||
.B OPLS-AA
|
||||
.TP
|
||||
\fB\-f <ffname>\fR, \fB\-frc <ffname>\fR
|
||||
The \-c or \-frc option allows the selection of the force field parameter
|
||||
file
|
||||
.B<ffname>.frc.
|
||||
Valid names for <ffname> with this distribution are: cvff, clayff, cvff_aug,
|
||||
pcff, compass_published, cff91, and oplsaa. If the argument is a pathname,
|
||||
i.e. it starts with a '.' or a '/', then this absolute path is used to read
|
||||
the force field, otherwise
|
||||
.B msi2lmp
|
||||
will look in the folder pointed to by the environment variable
|
||||
$MSI2LMP_LIBRARY. If the variable is not set, then it will look in the current
|
||||
directory. The extension '.frc' is appended, if missing.
|
||||
Default is to look for the cvff.frc force field file.
|
||||
.TP
|
||||
\fB\-p <loglevel>\fR, \fB\-print <loglevel>\fR,
|
||||
Selects the amount of information messages about the progress of the
|
||||
conversion printed to the screen.
|
||||
.B <loglevel>
|
||||
can be a number from 0 (silent except for errors) to 3 (very detailed).
|
||||
.TP
|
||||
\fB\-i\fR, \fB\-ignore\fR,
|
||||
Ignore errors about missing parameters and use 0.0 for the respective
|
||||
force constants making these no-ops. Is correct to be used for a few
|
||||
molecules and settings, but often an indication, that either the atom
|
||||
type assignment have errors, or the force field file is missing entries.
|
||||
.TP
|
||||
\fB\-n\fR, \fB\-nocenter\fR,
|
||||
Do not center the box around the (geometrical) center of the atoms,
|
||||
but around the origin. Default is to recenter.
|
||||
.TP
|
||||
\fB\-o\fR, \fB\-oldstyle\fR,
|
||||
Write out a data file without style hint comments to be compatible
|
||||
with old LAMMPS versions. Default is to write out those comments.
|
||||
.TP
|
||||
\fB-s <x> <y> <z>\fR, \fB-shift <x> <y> <z>\fR,
|
||||
Shift the entire system (box and coordinates) by a vector
|
||||
(default: 0.0 0.0 0.0).
|
||||
.TP
|
||||
|
||||
.SH EXAMPLES
|
||||
|
||||
msi2lmp benzene -c 2 -p 1 -f ../frc_files/pcff.frc
|
||||
|
||||
msi2lmp benzene-class1 -c I
|
||||
|
||||
msi2lmp decane -c 0 -f oplsaa
|
||||
|
||||
|
||||
.SH COPYRIGHT
|
||||
© 2003--2019 Sandia Corporation
|
||||
|
||||
This package is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License version 2 as
|
||||
published by the Free Software Foundation.
|
||||
|
||||
This package is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
|
@ -116,6 +116,18 @@ enables OpenMP. For GNU compilers it is -fopenmp. For (recent) Intel
|
|||
compilers it is -qopenmp. If you are using a different compiler,
|
||||
please refer to its documentation.
|
||||
|
||||
[OpenMP Compiler compatibility info]: :link(default-none-issues)
|
||||
|
||||
Some compilers do not fully support the 'default(none)' directive
|
||||
and others (e.g. GCC version 9 and beyond) may implement OpenMP 4.0
|
||||
semantics, which are incompatible with the OpenMP 3.1 directives used
|
||||
in LAMMPS (for maximal compatibility with compiler versions in use).
|
||||
In those case, all 'default(none)' directives (which aid in detecting
|
||||
incorrect and unwanted sharing) can be replaced with 'default(shared)'
|
||||
while dropping all 'shared()' directives. The script
|
||||
'src/USER-OMP/hack_openmp_for_pgi_gcc9.sh' can be used to automate
|
||||
this conversion.
|
||||
|
||||
:line
|
||||
|
||||
Choice of compiler and compile/link options :h4,link(compile)
|
||||
|
|
|
@ -28,7 +28,7 @@ Makefile(s). Example:
|
|||
|
||||
cd lammps # change to the LAMMPS distribution directory
|
||||
mkdir build; cd build # create a new directory (folder) for build
|
||||
cmake ../cmake \[options ...\] # configuration with (command-line) cmake
|
||||
cmake \[options ...\] ../cmake # configuration with (command-line) cmake
|
||||
make # compilation :pre
|
||||
|
||||
The cmake command will detect available features, enable selected
|
||||
|
@ -41,7 +41,8 @@ If your machine has multiple CPU cores (most do these days), using a
|
|||
command like "make -jN" (with N being the number of available local
|
||||
CPU cores) can be much faster. If you plan to do development on
|
||||
LAMMPS or need to re-compile LAMMPS repeatedly, installation of the
|
||||
ccache (= Compiler Cache) software may speed up compilation even more.
|
||||
ccache (= Compiler Cache) software may speed up repeated compilation
|
||||
even more.
|
||||
|
||||
After compilation, you can optionally copy the LAMMPS executable and
|
||||
library into your system folders (by default under $HOME/.local) with:
|
||||
|
@ -108,7 +109,8 @@ command-line options. Several useful ones are:
|
|||
-D CMAKE_BUILD_TYPE=type # type = Release or Debug
|
||||
-G output # style of output CMake generates
|
||||
-DVARIABLE=value # setting for a LAMMPS feature to enable
|
||||
-D VARIABLE=value # ditto, but cannot come after CMakeLists.txt dir :pre
|
||||
-D VARIABLE=value # ditto, but cannot come after CMakeLists.txt dir
|
||||
-C path/to/preset/file # load some CMake settings before configuring :pre
|
||||
|
||||
All the LAMMPS-specific -D variables that a LAMMPS build supports are
|
||||
described on the pages linked to from the "Build"_Build.html doc page.
|
||||
|
|
|
@ -37,6 +37,7 @@ This is the list of packages that may require additional steps.
|
|||
"POEMS"_#poems,
|
||||
"PYTHON"_#python,
|
||||
"VORONOI"_#voronoi,
|
||||
"USER-ADIOS"_#user-adios,
|
||||
"USER-ATC"_#user-atc,
|
||||
"USER-AWPMD"_#user-awpmd,
|
||||
"USER-COLVARS"_#user-colvars,
|
||||
|
@ -81,20 +82,23 @@ which GPU hardware to build for.
|
|||
|
||||
[CMake build]:
|
||||
|
||||
-D GPU_API=value # value = opencl (default) or cuda
|
||||
-D GPU_PREC=value # precision setting
|
||||
# value = double or mixed (default) or single
|
||||
-D OCL_TUNE=value # hardware choice for GPU_API=opencl
|
||||
# generic (default) or intel (Intel CPU) or fermi, kepler, cypress (NVIDIA)
|
||||
-D GPU_ARCH=value # primary GPU hardware choice for GPU_API=cuda
|
||||
# value = sm_XX, see below
|
||||
# default is Cuda-compiler dependent, but typically sm_20
|
||||
-D CUDPP_OPT=value # optimization setting for GPU_API=cuda
|
||||
# enables CUDA Performance Primitives Optimizations
|
||||
# yes (default) or no :pre
|
||||
-D GPU_API=value # value = opencl (default) or cuda
|
||||
-D GPU_PREC=value # precision setting
|
||||
# value = double or mixed (default) or single
|
||||
-D OCL_TUNE=value # hardware choice for GPU_API=opencl
|
||||
# generic (default) or intel (Intel CPU) or fermi, kepler, cypress (NVIDIA)
|
||||
-D GPU_ARCH=value # primary GPU hardware choice for GPU_API=cuda
|
||||
# value = sm_XX, see below
|
||||
# default is Cuda-compiler dependent, but typically sm_20
|
||||
-D CUDPP_OPT=value # optimization setting for GPU_API=cuda
|
||||
# enables CUDA Performance Primitives Optimizations
|
||||
# value = yes (default) or no
|
||||
-D CUDA_MPS_SUPPORT=value # enables some tweaks required to run with active nvidia-cuda-mps daemon
|
||||
# value = yes or no (default) :pre
|
||||
|
||||
GPU_ARCH settings for different GPU hardware is as follows:
|
||||
|
||||
sm_12 or sm_13 for GT200 (supported by CUDA 3.2 until CUDA 6.5)
|
||||
sm_20 or sm_21 for Fermi (supported by CUDA 3.2 until CUDA 7.5)
|
||||
sm_30 or sm_35 or sm_37 for Kepler (supported since CUDA 5)
|
||||
sm_50 or sm_52 for Maxwell (supported since CUDA 6)
|
||||
|
@ -135,7 +139,7 @@ specified by the "-m" switch. For your convenience, machine makefiles
|
|||
for "mpi" and "serial" are provided, which have the same settings as
|
||||
the corresponding machine makefiles in the main LAMMPS source
|
||||
folder. In addition you can alter 4 important settings in the
|
||||
Makefile.machine you start from via the corresponding -h, -a, -p, -e
|
||||
Makefile.machine you start from via the corresponding -c, -a, -p, -e
|
||||
switches (as in the examples above), and also save a copy of the new
|
||||
Makefile if desired:
|
||||
|
||||
|
@ -167,39 +171,33 @@ used to build the GPU library.
|
|||
|
||||
KIM package :h4,link(kim)
|
||||
|
||||
To build with this package, the KIM library must be downloaded and
|
||||
built on your system. It must include the KIM models that you want to
|
||||
use with LAMMPS.
|
||||
To build with this package, the KIM library with API v2 must be downloaded
|
||||
and built on your system. It must include the KIM models that you want to
|
||||
use with LAMMPS. If you want to use the "kim_query"_kim_query.html
|
||||
command, you also need to have libcurl installed with the matching
|
||||
development headers and the curl-config tool.
|
||||
|
||||
Note that in LAMMPS lingo, a KIM model driver is a pair style
|
||||
(e.g. EAM or Tersoff). A KIM model is a pair style for a particular
|
||||
element or alloy and set of parameters, e.g. EAM for Cu with a
|
||||
specific EAM potential file. Also note that installing the KIM API
|
||||
library with all its models, may take around 30 min to build. Of
|
||||
course you only need to do that once.
|
||||
specific EAM potential file. Also note that downloading and installing
|
||||
the KIM API library with all its models, may take a long time (10s of
|
||||
minutes to hours) to build. Of course you only need to do that once.
|
||||
|
||||
See the list of KIM model drivers here:
|
||||
https://openkim.org/kim-items/model-drivers/alphabetical
|
||||
https://openkim.org/browse/model-drivers/alphabetical
|
||||
|
||||
See the list of all KIM models here:
|
||||
https://openkim.org/kim-items/models/by-model-drivers
|
||||
|
||||
See the list of example KIM models included by default here:
|
||||
https://openkim.org/kim-api on the "What is in the KIM API source
|
||||
package?" page.
|
||||
https://openkim.org/browse/models/by-model-drivers
|
||||
|
||||
[CMake build]:
|
||||
|
||||
-D DOWNLOAD_KIM=value # download OpenKIM API v1 for build, value = no (default) or yes
|
||||
-D KIM_LIBRARY=path # KIM library file (only needed if a custom location)
|
||||
-D KIM_INCLUDE_DIR=path # KIM include directory (only needed if a custom location) :pre
|
||||
-D DOWNLOAD_KIM=value # download OpenKIM API v2 for build, value = no (default) or yes :pre
|
||||
|
||||
If DOWNLOAD_KIM is set, the KIM library will be downloaded and built
|
||||
inside the CMake build directory. If the KIM library is already on
|
||||
your system (in a location CMake cannot find it), KIM_LIBRARY is the
|
||||
filename (plus path) of the KIM library file, not the directory the
|
||||
library file is in. KIM_INCLUDE_DIR is the directory the KIM include
|
||||
file is in.
|
||||
your system (in a location CMake cannot find it), set the PKG_CONFIG_PATH
|
||||
environment variable so that libkim-api can be found.
|
||||
|
||||
[Traditional make]:
|
||||
|
||||
|
@ -213,8 +211,8 @@ make lib-kim args="-b " # (re-)install KIM API lib with only example models
|
|||
make lib-kim args="-b -a Glue_Ercolessi_Adams_Al__MO_324507536345_001" # ditto plus one model
|
||||
make lib-kim args="-b -a everything" # install KIM API lib with all models
|
||||
make lib-kim args="-n -a EAM_Dynamo_Ackland_W__MO_141627196590_002" # add one model or model driver
|
||||
make lib-kim args="-p /usr/local/kim-api" # use an existing KIM API installation at the provided location
|
||||
make lib-kim args="-p /usr/local/kim-api -a EAM_Dynamo_Ackland_W__MO_141627196590_002" # ditto but add one model or driver :pre
|
||||
make lib-kim args="-p /usr/local" # use an existing KIM API installation at the provided location
|
||||
make lib-kim args="-p /usr/local -a EAM_Dynamo_Ackland_W__MO_141627196590_002" # ditto but add one model or driver :pre
|
||||
|
||||
:line
|
||||
|
||||
|
@ -575,6 +573,32 @@ the lib/voronoi/Makefile.lammps file.
|
|||
|
||||
:line
|
||||
|
||||
USER-ADIOS package :h4,link(user-adios)
|
||||
|
||||
The USER-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 LAMMPS are automatically detected, if the PATH
|
||||
and LD_LIBRARY_PATH environment variables have been updated for the local ADIOS
|
||||
installation and the instructions below are followed for the respective build systems.
|
||||
|
||||
[CMake build]:
|
||||
|
||||
-D ADIOS2_DIR=path # path is where ADIOS 2.x is installed
|
||||
-D PKG_USER-ADIOS=yes :pre
|
||||
|
||||
[Traditional make]:
|
||||
|
||||
Turn on the USER-ADIOS package before building LAMMPS. If the ADIOS 2.x software is installed in PATH, there is nothing else to do:
|
||||
|
||||
make yes-user-adios :pre
|
||||
|
||||
otherwise, set ADIOS2_DIR environment variable when turning on the package:
|
||||
|
||||
ADIOS2_DIR=path make yes-user-adios # path is where ADIOS 2.x is installed :pre
|
||||
|
||||
:line
|
||||
|
||||
USER-ATC package :h4,link(user-atc)
|
||||
|
||||
The USER-ATC package requires the MANYBODY package also be installed.
|
||||
|
@ -835,23 +859,34 @@ file.
|
|||
USER-INTEL package :h4,link(user-intel)
|
||||
|
||||
To build with this package, you must choose which hardware you want to
|
||||
build for, either Intel CPUs or Intel KNLs. You should also typically
|
||||
"install the USER-OMP package"_#user-omp, as it can be used in tandem
|
||||
with the USER-INTEL package to good effect, as explained on the "Speed
|
||||
intel"_Speed_intel.html doc page.
|
||||
build for, either x86 CPUs or Intel KNLs in offload mode. You should
|
||||
also typically "install the USER-OMP package"_#user-omp, as it can be
|
||||
used in tandem with the USER-INTEL package to good effect, as explained
|
||||
on the "Speed intel"_Speed_intel.html doc page.
|
||||
|
||||
[CMake build]:
|
||||
|
||||
-D INTEL_ARCH=value # value = cpu (default) or knl
|
||||
-D BUILD_OMP=yes # also required to build with the USER-INTEl package :pre
|
||||
-D INTEL_LRT_MODE=value # value = threads, none, or c++11 :pre
|
||||
|
||||
Requires an Intel compiler as well as the Intel TBB and MKL libraries.
|
||||
In Long-range thread mode (LRT) a modified verlet style is used, that
|
||||
operates the Kspace calculation in a separate thread concurrently to
|
||||
other calculations. This has to be enabled in the "package intel"_package.html
|
||||
command at runtime. With the setting "threads" it used the pthreads
|
||||
library, while c++11 will use the built-in thread support of C++11
|
||||
compilers. The option "none" skips compilation of this feature. The
|
||||
default is to use "threads" if pthreads is available and otherwise "none".
|
||||
|
||||
Best performance is achieved with Intel hardware, Intel compilers, as well as
|
||||
the Intel TBB and MKL libraries. However, the code also compiles, links, and
|
||||
runs with other compilers and without TBB and MKL.
|
||||
|
||||
[Traditional make]:
|
||||
|
||||
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.
|
||||
Makefile.knl files for examples. and src/USER-INTEL/README for
|
||||
additional information.
|
||||
|
||||
For CPUs:
|
||||
|
||||
|
@ -873,7 +908,17 @@ USER-MOLFILE package :h4,link(user-molfile)
|
|||
|
||||
[CMake build]:
|
||||
|
||||
No additional settings are needed besides "-D PKG_USER-MOLFILE=yes".
|
||||
-D MOLFILE_INCLUDE_DIRS=path # (optional) path where VMD molfile plugin headers are installed
|
||||
-D PKG_USER-MOLFILE=yes :pre
|
||||
|
||||
|
||||
Using "-D PKG_USER-MOLFILE=yes" enables the package, and setting
|
||||
"-D MOLFILE_INCLUDE DIRS" 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
|
||||
folder of the local VMD installation in use. LAMMPS ships with a
|
||||
couple of default header files that correspond to a popular VMD
|
||||
version, usually the latest release.
|
||||
|
||||
[Traditional make]:
|
||||
|
||||
|
@ -882,7 +927,11 @@ loading library libdl.a that is typically present on all systems. It
|
|||
is required for LAMMPS to link with this package. If the setting is
|
||||
not valid for your system, you will need to edit the Makefile.lammps
|
||||
file. See lib/molfile/README and lib/molfile/Makefile.lammps for
|
||||
details.
|
||||
details. It is also possible to configure a different folder with
|
||||
the VMD molfile plugin header files. LAMMPS ships with a couple of
|
||||
default headers, but these are not compatible with all VMD versions,
|
||||
so it is often best to change this setting to the location of the
|
||||
same include files of the local VMD installation in use.
|
||||
|
||||
:line
|
||||
|
||||
|
@ -931,7 +980,9 @@ LINKFLAGS: -fopenmp # for GNU Compilers
|
|||
LINKFLAGS: -qopenmp # for Intel compilers on Linux :pre
|
||||
|
||||
For other platforms and compilers, please consult the documentation
|
||||
about OpenMP support for your compiler.
|
||||
about OpenMP support for your compiler. Please see the note about
|
||||
how to address compatibility "issues with the 'default(none)'
|
||||
directive"_Build_basics.html#default-none-issues of some compilers.
|
||||
|
||||
:line
|
||||
|
||||
|
|
|
@ -78,7 +78,7 @@ description of the Python interface to LAMMPS, which wraps the C-style
|
|||
interface.
|
||||
|
||||
See the sample codes in examples/COUPLE/simple for examples of C++ and
|
||||
C and Fortran codes that invoke LAMMPS thru its library interface.
|
||||
C and Fortran codes that invoke LAMMPS through its library interface.
|
||||
Other examples in the COUPLE directory use coupling ideas discussed on
|
||||
the "Howto couple"_Howto_couple.html doc page.
|
||||
|
||||
|
|
|
@ -48,6 +48,7 @@ packages:
|
|||
"POEMS"_Build_extras.html#poems,
|
||||
"PYTHON"_Build_extras.html#python,
|
||||
"VORONOI"_Build_extras.html#voronoi,
|
||||
"USER-ADIOS"_Build_extras.html#user-adios,
|
||||
"USER-ATC"_Build_extras.html#user-atc,
|
||||
"USER-AWPMD"_Build_extras.html#user-awpmd,
|
||||
"USER-COLVARS"_Build_extras.html#user-colvars,
|
||||
|
@ -148,26 +149,41 @@ system. Using these files you can enable/disable portions of the
|
|||
available packages in LAMMPS. If you need a custom preset you can take
|
||||
one of them as a starting point and customize it to your needs.
|
||||
|
||||
cmake -C ../cmake/presets/all_on.cmake \[OPTIONS\] ../cmake | enable all packages
|
||||
cmake -C ../cmake/presets/all_off.cmake \[OPTIONS\] ../cmake | disable all packages
|
||||
cmake -C ../cmake/presets/std.cmake \[OPTIONS\] ../cmake | enable standard packages
|
||||
cmake -C ../cmake/presets/user.cmake \[OPTIONS\] ../cmake | enable user packages
|
||||
cmake -C ../cmake/presets/std_nolib.cmake \[OPTIONS\] ../cmake | enable standard packages that do not require extra libraries
|
||||
cmake -C ../cmake/presets/nolib.cmake \[OPTIONS\] ../cmake | disable all packages that do not require extra libraries
|
||||
cmake -C ../cmake/presets/manual_selection.cmake \[OPTIONS\] ../cmake | example of how to create a manual selection of packages :tb(s=|,a=l)
|
||||
cmake -C ../cmake/presets/all_on.cmake \[OPTIONS\] ../cmake |
|
||||
enable all packages |
|
||||
cmake -C ../cmake/presets/all_off.cmake \[OPTIONS\] ../cmake |
|
||||
disable all packages |
|
||||
cmake -C ../cmake/presets/minimal.cmake \[OPTIONS\] ../cmake |
|
||||
enable just a few core packages |
|
||||
cmake -C ../cmake/presets/most.cmake \[OPTIONS\] ../cmake |
|
||||
enable most common packages |
|
||||
cmake -C ../cmake/presets/nolib.cmake \[OPTIONS\] ../cmake |
|
||||
disable packages that do require extra libraries or tools |
|
||||
cmake -C ../cmake/presets/clang.cmake \[OPTIONS\] ../cmake |
|
||||
change settings to use the Clang compilers by default |
|
||||
cmake -C ../cmake/presets/mingw.cmake \[OPTIONS\] ../cmake |
|
||||
enable all packages compatible with MinGW compilers :tb(c=2,s=|,a=l)
|
||||
|
||||
NOTE: Running cmake this way manipulates the variable cache in your
|
||||
current build directory. You can combine presets and options with
|
||||
multiple cmake runs.
|
||||
current build directory. You can combine multiple presets and options
|
||||
in a single cmake run, or change settings incrementally by running
|
||||
cmake with new flags.
|
||||
|
||||
[Example:]
|
||||
|
||||
# build LAMMPS with all "standard" packages which don't
|
||||
# use libraries and enable GPU package
|
||||
# build LAMMPS with most commonly used packages, but then remove
|
||||
# those requiring additional library or tools, but still enable
|
||||
# GPU package and configure it for using CUDA. You can run.
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -C ../cmake/presets/std_nolib.cmake -D PKG_GPU=on ../cmake :pre
|
||||
cmake -C ../cmake/presets/most.cmake -C ../cmake/presets/nolib.cmake -D PKG_GPU=on -D GPU_API=cuda ../cmake :pre
|
||||
|
||||
# to add another package, say BODY to the previous configuration you can run:
|
||||
cmake -D PKG_BODY=on . :pre
|
||||
|
||||
# to reset the package selection from above to the default of no packages
|
||||
# but leaving all other settings untouched. You can run:
|
||||
cmake -C ../cmake/presets/no_all.cmake . :pre
|
||||
:line
|
||||
|
||||
[Make shortcuts for installing many packages]:
|
||||
|
|
|
@ -57,10 +57,10 @@ FFT_INC = -DFFT_SINGLE # do not specify for double precision
|
|||
FFT_INC = -DFFT_PACK_ARRAY # or -DFFT_PACK_POINTER or -DFFT_PACK_MEMCPY :pre
|
||||
# default is FFT_PACK_ARRAY if not specified
|
||||
|
||||
FFT_INC = -I/usr/local/include
|
||||
FFT_INC = -I/usr/local/include
|
||||
FFT_PATH = -L/usr/local/lib
|
||||
FFT_LIB = -lfftw3 # FFTW3 double precision
|
||||
FFT_LIB = -lfftw3 -lfftw3f # FFTW3 single precision
|
||||
FFT_LIB = -lfftw3 # FFTW3 double precision
|
||||
FFT_LIB = -lfftw3 -lfftw3f # FFTW3 single precision
|
||||
FFT_LIB = -lmkl_intel_lp64 -lmkl_sequential -lmkl_core # MKL with Intel compiler
|
||||
FFT_LIB = -lmkl_gf_lp64 -lmkl_sequential -lmkl_core # MKL with GNU compier :pre
|
||||
|
||||
|
@ -179,8 +179,11 @@ e.g. from 511 to -512, which can cause diagnostics like the
|
|||
mean-squared displacement, as calculated by the "compute
|
||||
msd"_compute_msd.html command, to be faulty.
|
||||
|
||||
Note that the USER-ATC package is not currently compatible with the
|
||||
"bigbig" setting.
|
||||
Note that the USER-ATC package and the USER-INTEL package are currently
|
||||
not compatible with the "bigbig" setting. Also, there are limitations
|
||||
when using the library interface. Some functions with known issues
|
||||
have been replaced by dummy calls printing a corresponding error rather
|
||||
than crashing randomly or corrupting data.
|
||||
|
||||
Also note that the GPU package requires its lib/gpu library to be
|
||||
compiled with the same size setting, or the link will fail. A CMake
|
||||
|
|
|
@ -51,11 +51,10 @@ provides a unix/linux interface to low-level Windows functions, so LAMMPS
|
|||
can be compiled on Windows. The necessary (minor) modifications to LAMMPS
|
||||
are included, but may not always up-to-date for recently added functionality
|
||||
and the corresponding new code. A machine makefile for using cygwin for
|
||||
the old build system is provided. The CMake build system is untested
|
||||
for this; you will have to request that makefiles are generated and
|
||||
manually set the compiler.
|
||||
the old build system is provided. Using CMake for this mode of compilation
|
||||
is untested and not likely to work.
|
||||
|
||||
When compiling for Windows [not] set the -DLAMMPS_MEMALIGN define
|
||||
When compiling for Windows do [not] set the -DLAMMPS_MEMALIGN define
|
||||
in the LMP_INC makefile variable and add -lwsock32 -lpsapi to the linker
|
||||
flags in LIB makefile variable. Try adding -static-libgcc or -static or
|
||||
both to the linker flags when your resulting LAMMPS Windows executable
|
||||
|
@ -79,7 +78,13 @@ probably the currently best tested and supported way to build LAMMPS
|
|||
executables for Windows. There are makefiles provided for the
|
||||
traditional build system, but CMake has also been successfully tested
|
||||
using the mingw32-cmake and mingw64-cmake wrappers that are bundled
|
||||
with the cross-compiler environment on Fedora machines.
|
||||
with the cross-compiler environment on Fedora machines. A CMake preset
|
||||
selecting all packages compatible with this cross-compilation build
|
||||
is provided. You likely need to disable the GPU package unless you
|
||||
download and install the contents of the pre-compiled "OpenCL ICD loader
|
||||
library"_https://download.lammps.org/thirdparty/opencl-win-devel.tar.gz
|
||||
into your MinGW64 cross-compiler environment. The cross-compilation
|
||||
currently will only produce non-MPI serial binaries.
|
||||
|
||||
Please keep in mind, though, that this only applies to compiling LAMMPS.
|
||||
Whether the resulting binaries do work correctly is no tested by the
|
||||
|
|
|
@ -48,12 +48,14 @@ An alphabetic list of all general LAMMPS commands.
|
|||
"dimension"_dimension.html,
|
||||
"displace_atoms"_displace_atoms.html,
|
||||
"dump"_dump.html,
|
||||
"dump adios"_dump_adios.html,
|
||||
"dump image"_dump_image.html,
|
||||
"dump_modify"_dump_modify.html,
|
||||
"dump movie"_dump_image.html,
|
||||
"dump netcdf"_dump_netcdf.html,
|
||||
"dump netcdf/mpiio"_dump_netcdf.html,
|
||||
"dump vtk"_dump_vtk.html,
|
||||
"dynamical_matrix"_dynamical_matrix.html,
|
||||
"echo"_echo.html,
|
||||
"fix"_fix.html,
|
||||
"fix_modify"_fix_modify.html,
|
||||
|
@ -66,6 +68,7 @@ An alphabetic list of all general LAMMPS commands.
|
|||
"improper_style"_improper_style.html,
|
||||
"include"_include.html,
|
||||
"jump"_jump.html,
|
||||
"kim_query"_kim_query.html,
|
||||
"kspace_modify"_kspace_modify.html,
|
||||
"kspace_style"_kspace_style.html,
|
||||
"label"_label.html,
|
||||
|
@ -76,9 +79,11 @@ An alphabetic list of all general LAMMPS commands.
|
|||
"minimize"_minimize.html,
|
||||
"min_modify"_min_modify.html,
|
||||
"min_style"_min_style.html,
|
||||
"min_style spin"_min_spin.html,
|
||||
"molecule"_molecule.html,
|
||||
"ndx2group"_group2ndx.html,
|
||||
"neb"_neb.html,
|
||||
"neb_spin"_neb_spin.html,
|
||||
"neigh_modify"_neigh_modify.html,
|
||||
"neighbor"_neighbor.html,
|
||||
"newton"_newton.html,
|
||||
|
|
|
@ -37,6 +37,7 @@ OPT.
|
|||
"harmonic (iko)"_bond_harmonic.html,
|
||||
"harmonic/shift (o)"_bond_harmonic_shift.html,
|
||||
"harmonic/shift/cut (o)"_bond_harmonic_shift_cut.html,
|
||||
"mm3"_bond_mm3.html,
|
||||
"morse (o)"_bond_morse.html,
|
||||
"nonlinear (o)"_bond_nonlinear.html,
|
||||
"oxdna/fene"_bond_oxdna.html,
|
||||
|
@ -60,17 +61,19 @@ OPT.
|
|||
"charmm (iko)"_angle_charmm.html,
|
||||
"class2 (ko)"_angle_class2.html,
|
||||
"class2/p6"_angle_class2.html,
|
||||
"cosine (o)"_angle_cosine.html,
|
||||
"cosine (ko)"_angle_cosine.html,
|
||||
"cosine/buck6d"_angle_cosine_buck6d.html,
|
||||
"cosine/delta (o)"_angle_cosine_delta.html,
|
||||
"cosine/periodic (o)"_angle_cosine_periodic.html,
|
||||
"cosine/shift (o)"_angle_cosine_shift.html,
|
||||
"cosine/shift/exp (o)"_angle_cosine_shift_exp.html,
|
||||
"cosine/squared (o)"_angle_cosine_squared.html,
|
||||
"cross"_angle_cross.html,
|
||||
"dipole (o)"_angle_dipole.html,
|
||||
"fourier (o)"_angle_fourier.html,
|
||||
"fourier/simple (o)"_angle_fourier_simple.html,
|
||||
"harmonic (iko)"_angle_harmonic.html,
|
||||
"mm3"_angle_mm3.html,
|
||||
"quartic (o)"_angle_quartic.html,
|
||||
"sdk (o)"_angle_sdk.html,
|
||||
"table (o)"_angle_table.html :tb(c=4,ea=c)
|
||||
|
@ -120,8 +123,10 @@ OPT.
|
|||
"cossq (o)"_improper_cossq.html,
|
||||
"cvff (io)"_improper_cvff.html,
|
||||
"distance"_improper_distance.html,
|
||||
"distharm"_improper_distharm.html,
|
||||
"fourier (o)"_improper_fourier.html,
|
||||
"harmonic (iko)"_improper_harmonic.html,
|
||||
"inversion/harmonic"_improper_inversion_harmonic.html,
|
||||
"ring (o)"_improper_ring.html,
|
||||
"sqdistharm"_improper_sqdistharm.html,
|
||||
"umbrella (o)"_improper_umbrella.html :tb(c=4,ea=c)
|
||||
|
|
|
@ -116,6 +116,7 @@ Actions:
|
|||
|
||||
"minimize"_minimize.html,
|
||||
"neb"_neb.html,
|
||||
"neb_spin"_neb_spin.html,
|
||||
"prd"_prd.html,
|
||||
"rerun"_rerun.html,
|
||||
"run"_run.html,
|
||||
|
|
|
@ -61,6 +61,7 @@ OPT.
|
|||
"edpd/source"_fix_dpd_source.html,
|
||||
"efield"_fix_efield.html,
|
||||
"ehex"_fix_ehex.html,
|
||||
"electron/stopping"_fix_electron_stopping.html,
|
||||
"enforce2d (k)"_fix_enforce2d.html,
|
||||
"eos/cv"_fix_eos_cv.html,
|
||||
"eos/table"_fix_eos_table.html,
|
||||
|
@ -106,6 +107,7 @@ OPT.
|
|||
"mvv/edpd"_fix_mvv_dpd.html,
|
||||
"mvv/tdpd"_fix_mvv_dpd.html,
|
||||
"neb"_fix_neb.html,
|
||||
"neb_spin"_fix_neb_spin.html,
|
||||
"nph (ko)"_fix_nh.html,
|
||||
"nph/asphere (o)"_fix_nph_asphere.html,
|
||||
"nph/body"_fix_nph_body.html,
|
||||
|
@ -224,7 +226,7 @@ OPT.
|
|||
"wall/body/polyhedron"_fix_wall_body_polyhedron.html,
|
||||
"wall/colloid"_fix_wall.html,
|
||||
"wall/ees"_fix_wall_ees.html,
|
||||
"wall/gran (o)"_fix_wall_gran.html,
|
||||
"wall/gran"_fix_wall_gran.html,
|
||||
"wall/gran/region"_fix_wall_gran_region.html,
|
||||
"wall/harmonic"_fix_wall.html,
|
||||
"wall/lj1043"_fix_wall.html,
|
||||
|
|
|
@ -63,13 +63,13 @@ OPT.
|
|||
"comb (o)"_pair_comb.html,
|
||||
"comb3"_pair_comb.html,
|
||||
"coul/cut (gko)"_pair_coul.html,
|
||||
"coul/cut/soft (o)"_pair_lj_soft.html,
|
||||
"coul/cut/soft (o)"_pair_fep_soft.html,
|
||||
"coul/debye (gko)"_pair_coul.html,
|
||||
"coul/diel (o)"_pair_coul_diel.html,
|
||||
"coul/dsf (gko)"_pair_coul.html,
|
||||
"coul/long (gko)"_pair_coul.html,
|
||||
"coul/long/cs (g)"_pair_cs.html,
|
||||
"coul/long/soft (o)"_pair_lj_soft.html,
|
||||
"coul/long/soft (o)"_pair_fep_soft.html,
|
||||
"coul/msm (o)"_pair_coul.html,
|
||||
"coul/shield"_pair_coul_shield.html,
|
||||
"coul/streitz"_pair_coul.html,
|
||||
|
@ -98,6 +98,7 @@ OPT.
|
|||
"gran/hertz/history (o)"_pair_gran.html,
|
||||
"gran/hooke (o)"_pair_gran.html,
|
||||
"gran/hooke/history (ko)"_pair_gran.html,
|
||||
"granular"_pair_granular.html,
|
||||
"gw"_pair_gw.html,
|
||||
"gw/zbl"_pair_gw.html,
|
||||
"hbond/dreiding/lj (o)"_pair_hbond_dreiding.html,
|
||||
|
@ -107,38 +108,42 @@ OPT.
|
|||
"kolmogorov/crespi/full"_pair_kolmogorov_crespi_full.html,
|
||||
"kolmogorov/crespi/z"_pair_kolmogorov_crespi_z.html,
|
||||
"lcbop"_pair_lcbop.html,
|
||||
"lebedeva/z"_pair_lebedeva_z.html,
|
||||
"lennard/mdf"_pair_mdf.html,
|
||||
"line/lj"_pair_line_lj.html,
|
||||
"list"_pair_list.html,
|
||||
"lj/charmm/coul/charmm (iko)"_pair_charmm.html,
|
||||
"lj/charmm/coul/charmm/implicit (ko)"_pair_charmm.html,
|
||||
"lj/charmm/coul/long (gikot)"_pair_charmm.html,
|
||||
"lj/charmm/coul/long/soft (o)"_pair_lj_soft.html,
|
||||
"lj/charmm/coul/long/soft (o)"_pair_fep_soft.html,
|
||||
"lj/charmm/coul/msm (o)"_pair_charmm.html,
|
||||
"lj/charmmfsw/coul/charmmfsh"_pair_charmm.html,
|
||||
"lj/charmmfsw/coul/long"_pair_charmm.html,
|
||||
"lj/class2 (gko)"_pair_class2.html,
|
||||
"lj/class2/coul/cut (ko)"_pair_class2.html,
|
||||
"lj/class2/coul/cut/soft"_pair_fep_soft.html,
|
||||
"lj/class2/coul/long (gko)"_pair_class2.html,
|
||||
"lj/class2/coul/long/soft"_pair_fep_soft.html,
|
||||
"lj/class2/soft"_pair_fep_soft.html,
|
||||
"lj/cubic (go)"_pair_lj_cubic.html,
|
||||
"lj/cut (gikot)"_pair_lj.html,
|
||||
"lj/cut/coul/cut (gko)"_pair_lj.html,
|
||||
"lj/cut/coul/cut/soft (o)"_pair_lj_soft.html,
|
||||
"lj/cut/coul/cut/soft (o)"_pair_fep_soft.html,
|
||||
"lj/cut/coul/debye (gko)"_pair_lj.html,
|
||||
"lj/cut/coul/dsf (gko)"_pair_lj.html,
|
||||
"lj/cut/coul/long (gikot)"_pair_lj.html,
|
||||
"lj/cut/coul/long/cs"_pair_cs.html,
|
||||
"lj/cut/coul/long/soft (o)"_pair_lj_soft.html,
|
||||
"lj/cut/coul/long/soft (o)"_pair_fep_soft.html,
|
||||
"lj/cut/coul/msm (go)"_pair_lj.html,
|
||||
"lj/cut/coul/wolf (o)"_pair_lj.html,
|
||||
"lj/cut/dipole/cut (go)"_pair_dipole.html,
|
||||
"lj/cut/dipole/long (g)"_pair_dipole.html,
|
||||
"lj/cut/dipole/sf (go)"_pair_dipole.html,
|
||||
"lj/cut/soft (o)"_pair_lj_soft.html,
|
||||
"lj/cut/soft (o)"_pair_fep_soft.html,
|
||||
"lj/cut/thole/long (o)"_pair_thole.html,
|
||||
"lj/cut/tip4p/cut (o)"_pair_lj.html,
|
||||
"lj/cut/tip4p/long (ot)"_pair_lj.html,
|
||||
"lj/cut/tip4p/long/soft (o)"_pair_lj_soft.html,
|
||||
"lj/cut/tip4p/long/soft (o)"_pair_fep_soft.html,
|
||||
"lj/expand (gko)"_pair_lj_expand.html,
|
||||
"lj/expand/coul/long (g)"_pair_lj_expand.html,
|
||||
"lj/gromacs (gko)"_pair_gromacs.html,
|
||||
|
@ -153,6 +158,7 @@ OPT.
|
|||
"lj/sf/dipole/sf (go)"_pair_dipole.html,
|
||||
"lj/smooth (o)"_pair_lj_smooth.html,
|
||||
"lj/smooth/linear (o)"_pair_lj_smooth_linear.html,
|
||||
"lj/switch3/coulgauss/long"_pair_lj_switch3_coulgauss.html,
|
||||
"lj96/cut (go)"_pair_lj96.html,
|
||||
"lubricate (o)"_pair_lubricate.html,
|
||||
"lubricate/poly (o)"_pair_lubricate.html,
|
||||
|
@ -168,7 +174,7 @@ OPT.
|
|||
"momb"_pair_momb.html,
|
||||
"morse (gkot)"_pair_morse.html,
|
||||
"morse/smooth/linear (o)"_pair_morse.html,
|
||||
"morse/soft"_pair_morse.html,
|
||||
"morse/soft"_pair_fep_soft.html,
|
||||
"multi/lucy"_pair_multi_lucy.html,
|
||||
"multi/lucy/rx (k)"_pair_multi_lucy_rx.html,
|
||||
"nb3b/harmonic"_pair_nb3b_harmonic.html,
|
||||
|
@ -228,7 +234,7 @@ OPT.
|
|||
"thole"_pair_thole.html,
|
||||
"tip4p/cut (o)"_pair_coul.html,
|
||||
"tip4p/long (o)"_pair_coul.html,
|
||||
"tip4p/long/soft (o)"_pair_lj_soft.html,
|
||||
"tip4p/long/soft (o)"_pair_fep_soft.html,
|
||||
"tri/lj"_pair_tri_lj.html,
|
||||
"ufm (got)"_pair_ufm.html,
|
||||
"vashishta (gko)"_pair_vashishta.html,
|
||||
|
|
After Width: | Height: | Size: 7.8 KiB |
|
@ -0,0 +1,9 @@
|
|||
\documentclass[12pt]{article}
|
||||
|
||||
\begin{document}
|
||||
\thispagestyle{empty}
|
||||
$$
|
||||
E = K_{SS} \left(r_{12}-r_{12,0}\right)\left(r_{32}-r_{32,0}\right) + K_{BS0}\left(r_{12}-r_{12,0}\right)\left(\theta-\theta_0\right) + K_{BS1}\left(r_{32}-r_{32,0}\right)\left(\theta-\theta_0\right)
|
||||
$$
|
||||
|
||||
\end{document}
|
After Width: | Height: | Size: 9.0 KiB |
|
@ -0,0 +1,9 @@
|
|||
\documentclass[12pt]{article}
|
||||
|
||||
\begin{document}
|
||||
\thispagestyle{empty}
|
||||
$$
|
||||
E = K (\theta - \theta_0)^2 \left[ 1 - 0.014(\theta - \theta_0) + 5.6(10)^{-5} (\theta - \theta_0)^2 - 7.0(10)^{-7} (\theta - \theta_0)^3 + 9(10)^{-10} (\theta - \theta_0)^4 \right]
|
||||
$$
|
||||
|
||||
\end{document}
|
After Width: | Height: | Size: 5.7 KiB |
|
@ -0,0 +1,9 @@
|
|||
\documentclass[12pt]{article}
|
||||
|
||||
\begin{document}
|
||||
\thispagestyle{empty}
|
||||
$$
|
||||
E = K (r - r_0)^2 \left[ 1 - 2.55(r-r_0) + (7/12) 2.55^2(r-r_0)^2 \right]
|
||||
$$
|
||||
|
||||
\end{document}
|
After Width: | Height: | Size: 2.1 KiB |
|
@ -0,0 +1,9 @@
|
|||
\documentclass[12pt]{article}
|
||||
|
||||
\begin{document}
|
||||
\thispagestyle{empty}
|
||||
$$
|
||||
E = K (d - d_0)^2
|
||||
$$
|
||||
|
||||
\end{document}
|
After Width: | Height: | Size: 2.2 KiB |
|
@ -0,0 +1,9 @@
|
|||
\documentclass[12pt]{article}
|
||||
|
||||
\begin{document}
|
||||
\thispagestyle{empty}
|
||||
$$
|
||||
E = K (d^2 - d_0^2)^2
|
||||
$$
|
||||
|
||||
\end{document}
|
After Width: | Height: | Size: 6.9 KiB |
|
@ -0,0 +1,13 @@
|
|||
\documentclass[preview]{standalone}
|
||||
\usepackage{varwidth}
|
||||
\usepackage[utf8x]{inputenc}
|
||||
\usepackage{amsmath, amssymb, graphics, setspace}
|
||||
|
||||
\begin{document}
|
||||
\begin{varwidth}{50in}
|
||||
\begin{equation}
|
||||
\frac{d \vec{s}_{i}}{dt} = \lambda\, \vec{s}_{i} \times\left( \vec{\omega}_{i} \times\vec{s}_{i} \right)
|
||||
\nonumber
|
||||
\end{equation}
|
||||
\end{varwidth}
|
||||
\end{document}
|
After Width: | Height: | Size: 5.8 KiB |
|
@ -0,0 +1,14 @@
|
|||
\documentclass[preview]{standalone}
|
||||
\usepackage{varwidth}
|
||||
\usepackage[utf8x]{inputenc}
|
||||
\usepackage{amsmath, amssymb, graphics, setspace}
|
||||
|
||||
\begin{document}
|
||||
\begin{varwidth}{50in}
|
||||
\begin{equation}
|
||||
{\Delta t}_{\rm max} = \frac{2\pi}{\kappa
|
||||
\left|\vec{\omega}_{\rm max} \right|}
|
||||
\nonumber
|
||||
\end{equation}
|
||||
\end{varwidth}
|
||||
\end{document}
|
After Width: | Height: | Size: 9.4 KiB |
|
@ -0,0 +1,15 @@
|
|||
\documentclass[preview]{standalone}
|
||||
\usepackage{varwidth}
|
||||
\usepackage[utf8x]{inputenc}
|
||||
\usepackage{amsmath, amssymb, graphics, setspace}
|
||||
|
||||
\begin{document}
|
||||
\begin{varwidth}{50in}
|
||||
\begin{equation}
|
||||
\omega_i^{\nu} =
|
||||
(\nu - 1) \Delta \omega_i
|
||||
{\rm ~~and~~} \Delta \omega_i = \frac{\omega_i}{Q-1}
|
||||
, \nonumber
|
||||
\end{equation}
|
||||
\end{varwidth}
|
||||
\end{document}
|
After Width: | Height: | Size: 8.2 KiB |
|
@ -0,0 +1,16 @@
|
|||
\documentclass[preview]{standalone}
|
||||
\usepackage{varwidth}
|
||||
\usepackage[utf8x]{inputenc}
|
||||
\usepackage{amsmath, amssymb, graphics, setspace}
|
||||
|
||||
\begin{document}
|
||||
\begin{varwidth}{50in}
|
||||
\begin{equation}
|
||||
\vec{k}_i =
|
||||
\frac{\vec{m}_i^I \times \vec{m}_i^F}{\left|\vec{m}_i^I
|
||||
\times \vec{m}_i^F\right|}
|
||||
%&{\rm ~if~}& \vec{m}_i^I \times \vec{m}_i^F
|
||||
, \nonumber
|
||||
\end{equation}
|
||||
\end{varwidth}
|
||||
\end{document}
|
After Width: | Height: | Size: 20 KiB |
|
@ -0,0 +1,16 @@
|
|||
\documentclass[preview]{standalone}
|
||||
\usepackage{varwidth}
|
||||
\usepackage[utf8x]{inputenc}
|
||||
\usepackage{amsmath, amssymb, graphics, setspace}
|
||||
|
||||
\begin{document}
|
||||
\begin{varwidth}{50in}
|
||||
\begin{equation}
|
||||
\vec{m}_i^{\nu} = \vec{m}_i^{I} \cos(\omega_i^{\nu})
|
||||
+ (\vec{k}_i \times \vec{m}_i^{I}) \sin(\omega_i^{\nu})
|
||||
+ (1.0-\cos(\omega_i^{\nu})) \vec{k}_i (\vec{k}_i\cdot
|
||||
\vec{m}_i^{I})
|
||||
, \nonumber
|
||||
\end{equation}
|
||||
\end{varwidth}
|
||||
\end{document}
|
After Width: | Height: | Size: 4.5 KiB |
|
@ -0,0 +1,9 @@
|
|||
\documentclass[12pt]{article}
|
||||
|
||||
\begin{document}
|
||||
\thispagestyle{empty}
|
||||
\begin{eqnarray*}
|
||||
E &=& \frac{q_i q_j \mathrm{erf}\left( r/\sqrt{\gamma_1^2+\gamma_2^2} \right) }{\epsilon r_{ij}}
|
||||
\end{eqnarray*}
|
||||
|
||||
\end{document}
|
After Width: | Height: | Size: 30 KiB |
After Width: | Height: | Size: 3.6 KiB |
|
@ -0,0 +1,11 @@
|
|||
\documentclass[12pt]{article}
|
||||
|
||||
\begin{document}
|
||||
\thispagestyle{empty}
|
||||
|
||||
\begin{eqnarray*}
|
||||
E = 4\epsilon \left[ \left(\frac{\sigma}{r}\right)^{12}-\left(\frac{\sigma}{r}\right)^{6} \right]
|
||||
% \qquad r < r_c \\
|
||||
\end{eqnarray*}
|
||||
|
||||
\end{document}
|
After Width: | Height: | Size: 11 KiB |
|
@ -0,0 +1,11 @@
|
|||
\documentclass[12pt]{article}
|
||||
|
||||
\begin{document}
|
||||
\thispagestyle{empty}
|
||||
\begin{eqnarray*}
|
||||
E &=& \epsilon_{ij} \left[ -2.25 \left(\frac{r_{v,ij}}{r_{ij}}\right)^6 + 1.84(10)^5 \exp\left[-12.0 r_{ij}/r_{v,ij}\right] \right] S_3(r_{ij}) \\
|
||||
r_{v,ij} &=& r_{v,i} + r_{v,j} \\
|
||||
\epsilon_{ij} &=& \sqrt{\epsilon_i \epsilon_j}
|
||||
\end{eqnarray*}
|
||||
|
||||
\end{document}
|
After Width: | Height: | Size: 6.6 KiB |
|
@ -0,0 +1,14 @@
|
|||
\documentclass[12pt]{article}
|
||||
|
||||
\begin{document}
|
||||
\thispagestyle{empty}
|
||||
|
||||
\begin{eqnarray*}
|
||||
S_3(r) = \left\lbrace \begin{array}{ll}
|
||||
1 & \quad\mathrm{if}\quad r < r_\mathrm{c} - w \\
|
||||
3x^2 - 2x^3 & \quad\mathrm{if}\quad r < r_\mathrm{c} \quad\mathrm{with\quad} x=\frac{r_\mathrm{c} - r}{w} \\
|
||||
0 & \quad\mathrm{if}\quad r >= r_\mathrm{c}
|
||||
\end{array} \right.
|
||||
\end{eqnarray*}
|
||||
|
||||
\end{document}
|
|
@ -74,7 +74,7 @@ is an integer or floating-point number, respectively, and reject the
|
|||
input with an error message (for instance, when an integer is required,
|
||||
but a floating-point number 1.0 is provided):
|
||||
|
||||
ERROR: Expected integer parameter in input script or data file :pre
|
||||
ERROR: Expected integer parameter instead of '1.0' in input script or data file :pre
|
||||
|
||||
Some commands allow for using variable references in place of numeric
|
||||
constants so that the value can be evaluated and may change over the
|
||||
|
@ -85,6 +85,9 @@ reading the input and before parsing commands,
|
|||
|
||||
NOTE: Using a variable reference (i.e. {v_name}) is only allowed if
|
||||
the documentation of the corresponding command explicitly says it is.
|
||||
Otherwise, you will receive an error message of this kind:
|
||||
|
||||
ERROR: Expected floating point parameter instead of 'v_name' in input script or data file :pre
|
||||
|
||||
Generally, LAMMPS will print a message to the screen and logfile and
|
||||
exit gracefully when it encounters a fatal error. Sometimes it will
|
||||
|
|
|
@ -6917,7 +6917,7 @@ types. :dd
|
|||
|
||||
{Invalid use of library file() function} :dt
|
||||
|
||||
This function is called thru the library interface. This
|
||||
This function is called through the library interface. This
|
||||
error should not occur. Contact the developers if it does. :dd
|
||||
|
||||
{Invalid value in set command} :dt
|
||||
|
@ -6988,12 +6988,6 @@ The atom style defined does not have this attribute. :dd
|
|||
|
||||
The atom style defined does not have these attributes. :dd
|
||||
|
||||
{KIM neighbor iterator exceeded range} :dt
|
||||
|
||||
This should not happen. It likely indicates a bug
|
||||
in the KIM implementation of the interatomic potential
|
||||
where it is requesting neighbors incorrectly. :dd
|
||||
|
||||
{KOKKOS package does not yet support comm_style tiled} :dt
|
||||
|
||||
Self-explanatory. :dd
|
||||
|
@ -10185,10 +10179,6 @@ valid. :dd
|
|||
|
||||
Self-explanatory. :dd
|
||||
|
||||
{Unrecognized virial argument in pair_style command} :dt
|
||||
|
||||
Only two options are supported: LAMMPSvirial and KIMvirial :dd
|
||||
|
||||
{Unsupported mixing rule in kspace_style ewald/disp} :dt
|
||||
|
||||
Only geometric mixing is supported. :dd
|
||||
|
|
|
@ -178,12 +178,6 @@ When using fixes like box/relax, the potential energy used by the minimizer
|
|||
is augmented by an additional energy provided by the fix. Thus the printed
|
||||
converged energy may be different from the total potential energy. :dd
|
||||
|
||||
{Energy tally does not account for 'zero yes'} :dt
|
||||
|
||||
The energy removed by using the 'zero yes' flag is not accounted
|
||||
for in the energy tally and thus energy conservation cannot be
|
||||
monitored in this case. :dd
|
||||
|
||||
{Estimated error in splitting of dispersion coeffs is %g} :dt
|
||||
|
||||
Error is greater than 0.0001 percent. :dd
|
||||
|
|
|
@ -148,7 +148,7 @@ END_RST -->
|
|||
|
||||
<!-- HTML_ONLY -->
|
||||
|
||||
"CHARMM, AMBER, and DREIDING force fields"_Howto_bioFF.html
|
||||
"CHARMM, AMBER, COMPASS, and DREIDING force fields"_Howto_bioFF.html
|
||||
"TIP3P water model"_Howto_tip3p.html
|
||||
"TIP4P water model"_Howto_tip4p.html
|
||||
"SPC water model"_Howto_spc.html :all(b)
|
||||
|
|
|
@ -7,29 +7,31 @@ Documentation"_ld - "LAMMPS Commands"_lc :c
|
|||
|
||||
:line
|
||||
|
||||
CHARMM, AMBER, and DREIDING force fields :h3
|
||||
CHARMM, AMBER, COMPASS, and DREIDING force fields :h3
|
||||
|
||||
A force field has 2 parts: the formulas that define it and the
|
||||
coefficients used for a particular system. Here we only discuss
|
||||
formulas implemented in LAMMPS that correspond to formulas commonly
|
||||
used in the CHARMM, AMBER, and DREIDING force fields. Setting
|
||||
coefficients is done in the input data file via the
|
||||
"read_data"_read_data.html command or in the input script with
|
||||
used in the CHARMM, AMBER, COMPASS, and DREIDING force fields. Setting
|
||||
coefficients is done either from special sections in an input data file
|
||||
via the "read_data"_read_data.html command or in the input script with
|
||||
commands like "pair_coeff"_pair_coeff.html or
|
||||
"bond_coeff"_bond_coeff.html. See the "Tools"_Tools.html doc page for
|
||||
additional tools that can use CHARMM or AMBER to assign force field
|
||||
coefficients and convert their output into LAMMPS input.
|
||||
"bond_coeff"_bond_coeff.html and so on. See the "Tools"_Tools.html doc
|
||||
page for additional tools that can use CHARMM, AMBER, or Materials
|
||||
Studio generated files to assign force field coefficients and convert
|
||||
their output into LAMMPS input.
|
||||
|
||||
See "(MacKerell)"_#howto-MacKerell for a description of the CHARMM force
|
||||
field. See "(Cornell)"_#howto-Cornell for a description of the AMBER force
|
||||
field.
|
||||
field. See "(Cornell)"_#howto-Cornell for a description of the AMBER
|
||||
force field. See "(Sun)"_#howto-Sun for a description of the COMPASS
|
||||
force field.
|
||||
|
||||
:link(charmm,http://www.scripps.edu/brooks)
|
||||
:link(amber,http://amber.scripps.edu)
|
||||
|
||||
These style choices compute force field formulas that are consistent
|
||||
with common options in CHARMM or AMBER. See each command's
|
||||
documentation for the formula it computes.
|
||||
The interaction styles listed below compute force field formulas that
|
||||
are consistent with common options in CHARMM or AMBER. See each
|
||||
command's documentation for the formula it computes.
|
||||
|
||||
"bond_style"_bond_harmonic.html harmonic
|
||||
"angle_style"_angle_charmm.html charmm
|
||||
|
@ -44,28 +46,54 @@ documentation for the formula it computes.
|
|||
"special_bonds"_special_bonds.html charmm
|
||||
"special_bonds"_special_bonds.html amber :ul
|
||||
|
||||
NOTE: For CHARMM, newer {charmmfsw} or {charmmfsh} styles were
|
||||
released in March 2017. We recommend they be used instead of the
|
||||
older {charmm} styles. See discussion of the differences on the "pair
|
||||
charmm"_pair_charmm.html and "dihedral charmm"_dihedral_charmm.html
|
||||
doc pages.
|
||||
NOTE: For CHARMM, newer {charmmfsw} or {charmmfsh} styles were released
|
||||
in March 2017. We recommend they be used instead of the older {charmm}
|
||||
styles. See discussion of the differences on the "pair
|
||||
charmm"_pair_charmm.html and "dihedral charmm"_dihedral_charmm.html doc
|
||||
pages.
|
||||
|
||||
COMPASS is a general force field for atomistic simulation of common
|
||||
organic molecules, inorganic small molecules, and polymers which was
|
||||
developed using ab initio and empirical parameterization techniques.
|
||||
See the "Tools"_Tools.html doc page for the msi2lmp tool for creating
|
||||
LAMMPS template input and data files from BIOVIA’s Materials Studio
|
||||
files. Please note that the msi2lmp tool is very old and largely
|
||||
unmaintained, so it does not support all features of Materials Studio
|
||||
provided force field files, especially additions during the last decade.
|
||||
You should watch the output carefully and compare results, where
|
||||
possible. See "(Sun)"_#howto-Sun for a description of the COMPASS force
|
||||
field.
|
||||
|
||||
These interaction styles listed below compute force field formulas that
|
||||
are consistent with the COMPASS force field. See each command's
|
||||
documentation for the formula it computes.
|
||||
|
||||
"bond_style"_bond_class2.html class2
|
||||
"angle_style"_angle_class2.html class2
|
||||
"dihedral_style"_dihedral_class2.html class2
|
||||
"improper_style"_improper_class2.html class2 :ul
|
||||
|
||||
"pair_style"_pair_class2.html lj/class2
|
||||
"pair_style"_pair_class2.html lj/class2/coul/cut
|
||||
"pair_style"_pair_class2.html lj/class2/coul/long :ul
|
||||
|
||||
"special_bonds"_special_bonds.html lj/coul 0 0 1 :ul
|
||||
|
||||
DREIDING is a generic force field developed by the "Goddard
|
||||
group"_http://www.wag.caltech.edu at Caltech and is useful for
|
||||
predicting structures and dynamics of organic, biological and
|
||||
main-group inorganic molecules. The philosophy in DREIDING is to use
|
||||
general force constants and geometry parameters based on simple
|
||||
hybridization considerations, rather than individual force constants
|
||||
and geometric parameters that depend on the particular combinations of
|
||||
atoms involved in the bond, angle, or torsion terms. DREIDING has an
|
||||
"explicit hydrogen bond term"_pair_hbond_dreiding.html to describe
|
||||
interactions involving a hydrogen atom on very electronegative atoms
|
||||
(N, O, F).
|
||||
predicting structures and dynamics of organic, biological and main-group
|
||||
inorganic molecules. The philosophy in DREIDING is to use general force
|
||||
constants and geometry parameters based on simple hybridization
|
||||
considerations, rather than individual force constants and geometric
|
||||
parameters that depend on the particular combinations of atoms involved
|
||||
in the bond, angle, or torsion terms. DREIDING has an "explicit hydrogen
|
||||
bond term"_pair_hbond_dreiding.html to describe interactions involving a
|
||||
hydrogen atom on very electronegative atoms (N, O, F).
|
||||
|
||||
See "(Mayo)"_#howto-Mayo for a description of the DREIDING force field
|
||||
|
||||
These style choices compute force field formulas that are consistent
|
||||
with the DREIDING force field. See each command's
|
||||
The interaction styles listed below compute force field formulas that
|
||||
are consistent with the DREIDING force field. See each command's
|
||||
documentation for the formula it computes.
|
||||
|
||||
"bond_style"_bond_harmonic.html harmonic
|
||||
|
@ -100,6 +128,9 @@ Fischer, Gao, Guo, Ha, et al, J Phys Chem, 102, 3586 (1998).
|
|||
[(Cornell)] Cornell, Cieplak, Bayly, Gould, Merz, Ferguson,
|
||||
Spellmeyer, Fox, Caldwell, Kollman, JACS 117, 5179-5197 (1995).
|
||||
|
||||
:link(howto-Sun)
|
||||
[(Sun)] Sun, J. Phys. Chem. B, 102, 7338–7364 (1998).
|
||||
|
||||
:link(howto-Mayo)
|
||||
[(Mayo)] Mayo, Olfason, Goddard III, J Phys Chem, 94, 8897-8909
|
||||
(1990).
|
||||
|
|
|
@ -82,7 +82,7 @@ Monte Carlo client code as the driver.
|
|||
|
||||
The lammps_vasp dir shows how to couple LAMMPS as a client code
|
||||
running MD timestepping to VASP acting as a server providing quantum
|
||||
DFT forces, thru a Python wrapper script on VASP.
|
||||
DFT forces, through a Python wrapper script on VASP.
|
||||
|
||||
Here is how to launch a client and server code together for any of the
|
||||
4 modes of message exchange that the "message"_message.html command
|
||||
|
|
|
@ -50,7 +50,7 @@ In this scenario, the other code can be called as a library, as in
|
|||
(1), or it could be a stand-alone code, invoked by a system() call
|
||||
made by the command (assuming your parallel machine allows one or more
|
||||
processors to start up another program). In the latter case the
|
||||
stand-alone code could communicate with LAMMPS thru files that the
|
||||
stand-alone code could communicate with LAMMPS through files that the
|
||||
command writes and reads.
|
||||
|
||||
See the "Modify command"_Modify_command.html doc page for info on how
|
||||
|
|
|
@ -87,7 +87,7 @@ commands to LAMMPS to execute, the same as if they were coming from an
|
|||
input script.
|
||||
|
||||
Via these functions, the calling code can read or generate a series of
|
||||
LAMMPS commands one or multiple at a time and pass it thru the library
|
||||
LAMMPS commands one or multiple at a time and pass it through the library
|
||||
interface to setup a problem and then run it in stages. The caller
|
||||
can interleave the command function calls with operations it performs,
|
||||
calls to extract information from or set information within LAMMPS, or
|
||||
|
@ -166,9 +166,6 @@ void lammps_gather_atoms_subset(void *, char *, int, int, int, int *, void *)
|
|||
void lammps_scatter_atoms(void *, char *, int, int, void *)
|
||||
void lammps_scatter_atoms_subset(void *, char *, int, int, int, int *, void *) :pre
|
||||
|
||||
void lammps_create_atoms(void *, int, tagint *, int *, double *, double *,
|
||||
imageint *, int) :pre
|
||||
|
||||
The gather functions collect peratom info of the requested type (atom
|
||||
coords, atom types, forces, etc) from all processors, and returns the
|
||||
same vector of values to each calling processor. The scatter
|
||||
|
@ -176,6 +173,11 @@ functions do the inverse. They distribute a vector of peratom values,
|
|||
passed by all calling processors, to individual atoms, which may be
|
||||
owned by different processors.
|
||||
|
||||
IMPORTANT NOTE: These functions are not compatible with the
|
||||
-DLAMMPS_BIGBIG setting when compiling LAMMPS. Dummy functions
|
||||
that result in an error message and abort will be substituted
|
||||
instead of resulting in random crashes and memory corruption.
|
||||
|
||||
The lammps_gather_atoms() function does this for all N atoms in the
|
||||
system, ordered by atom ID, from 1 to N. The
|
||||
lammps_gather_atoms_concat() function does it for all N atoms, but
|
||||
|
@ -196,6 +198,9 @@ those values to each atom in the system. The
|
|||
lammps_scatter_atoms_subset() function takes a subset of IDs as an
|
||||
argument and only scatters those values to the owning atoms.
|
||||
|
||||
void lammps_create_atoms(void *, int, tagint *, int *, double *, double *,
|
||||
imageint *, int) :pre
|
||||
|
||||
The lammps_create_atoms() function takes a list of N atoms as input
|
||||
with atom types and coords (required), an optionally atom IDs and
|
||||
velocities and image flags. It uses the coords of each atom to assign
|
||||
|
|
|
@ -57,6 +57,17 @@ library is then loaded by the Python interface. In this example we enable the
|
|||
MOLECULE package and compile LAMMPS with C++ exceptions, PNG, JPEG and FFMPEG
|
||||
output support enabled.
|
||||
|
||||
Step 1a: For the CMake based build system, the steps are:
|
||||
|
||||
mkdir $LAMMPS_DIR/build-shared
|
||||
cd $LAMMPS_DIR/build-shared :pre
|
||||
|
||||
# MPI, PNG, Jpeg, FFMPEG are auto-detected
|
||||
cmake ../cmake -DPKG_MOLECULE=yes -DLAMMPS_EXCEPTIONS=yes -DBUILD_LIB=yes -DBUILD_SHARED_LIBS=yes
|
||||
make :pre
|
||||
|
||||
Step 1b: For the legacy, make based build system, the steps are:
|
||||
|
||||
cd $LAMMPS_DIR/src :pre
|
||||
|
||||
# add packages if necessary
|
||||
|
@ -68,10 +79,9 @@ make mpi mode=shlib LMP_INC="-DLAMMPS_PNG -DLAMMPS_JPEG -DLAMMPS_FFMPEG -DLAMMPS
|
|||
Step 2: Installing the LAMMPS Python package :h6
|
||||
|
||||
PyLammps is part of the lammps Python package. To install it simply install
|
||||
that package into your current Python installation.
|
||||
that package into your current Python installation with:
|
||||
|
||||
cd $LAMMPS_DIR/python
|
||||
python install.py :pre
|
||||
make install-python :pre
|
||||
|
||||
NOTE: Recompiling the shared library requires re-installing the Python package
|
||||
|
||||
|
@ -94,14 +104,21 @@ apt-get install python-virtualenv :pre
|
|||
|
||||
Creating a virtualenv with lammps installed :h6
|
||||
|
||||
# create virtualenv name 'testing' :pre
|
||||
# create virtualenv named 'testing'
|
||||
virtualenv $HOME/python/testing :pre
|
||||
|
||||
# activate 'testing' environment
|
||||
source testing/bin/activate :pre
|
||||
source $HOME/python/testing/bin/activate :pre
|
||||
|
||||
Now configure and compile the LAMMPS shared library as outlined above.
|
||||
When using CMake and the shared library has already been build, you
|
||||
need to re-run CMake to update the location of the python executable
|
||||
to the location in the virtual environment with:
|
||||
|
||||
cmake . -DPYTHON_EXECUTABLE=$(which python) :pre
|
||||
|
||||
# install LAMMPS package in virtualenv
|
||||
(testing) cd $LAMMPS_DIR/python
|
||||
(testing) python install.py :pre
|
||||
(testing) make install-python :pre
|
||||
|
||||
# install other useful packages
|
||||
(testing) pip install matplotlib jupyter mpi4py :pre
|
||||
|
|
|
@ -17,6 +17,7 @@ periodically.
|
|||
These are the relevant commands:
|
||||
|
||||
"neb"_neb.html for nudged elastic band calculations
|
||||
"neb_spin"_neb_spin.html for magnetic nudged elastic band calculations
|
||||
"prd"_prd.html for parallel replica dynamics
|
||||
"tad"_tad.html for temperature accelerated dynamics
|
||||
"temper"_temper.html for parallel tempering
|
||||
|
|
|
@ -10,7 +10,7 @@ Documentation"_ld - "LAMMPS Commands"_lc :c
|
|||
Magnetic spins :h3
|
||||
|
||||
The magnetic spin simulations are enabled by the SPIN package, whose
|
||||
implementation is detailed in "Tranchida"_#Tranchida7.
|
||||
implementation is detailed in "Tranchida"_#Tranchida.
|
||||
|
||||
The model represents the simulation of atomic magnetic spins coupled
|
||||
to lattice vibrations. The dynamics of those magnetic spins can be used
|
||||
|
@ -36,13 +36,28 @@ A Langevin thermostat can be applied to those magnetic spins using
|
|||
"fix langevin/spin"_fix_langevin_spin.html. Typically, this thermostat
|
||||
can be coupled to another Langevin thermostat applied to the atoms
|
||||
using "fix langevin"_fix_langevin.html in order to simulate
|
||||
thermostatted spin-lattice system.
|
||||
thermostatted spin-lattice systems.
|
||||
|
||||
The magnetic Gilbert damping can also be applied using "fix
|
||||
langevin/spin"_fix_langevin_spin.html. It allows to either dissipate
|
||||
the thermal energy of the Langevin thermostat, or to perform a
|
||||
relaxation of the magnetic configuration toward an equilibrium state.
|
||||
|
||||
The command "fix setforce/spin"_fix_setforce.html allows to set the
|
||||
components of the magnetic precession vectors (while erasing and
|
||||
replacing the previously computed magnetic precession vectors on
|
||||
the atom).
|
||||
This command can be used to freeze the magnetic moment of certain
|
||||
atoms in the simulation by zeroing their precession vector.
|
||||
|
||||
The command "fix nve/spin"_fix_nve_spin.html can be used to
|
||||
perform a symplectic integration of the combined dynamics of spins
|
||||
and atomic motions.
|
||||
|
||||
The minimization style "min/spin"_min_spin.html can be applied
|
||||
to the spins to perform a minimization of the spin configuration.
|
||||
|
||||
|
||||
All the computed magnetic properties can be output by two main
|
||||
commands. The first one is "compute spin"_compute_spin.html, that
|
||||
enables to evaluate magnetic averaged quantities, such as the total
|
||||
|
@ -54,6 +69,6 @@ magnetic spin, or the magnetic force acting on this spin.
|
|||
|
||||
:line
|
||||
|
||||
:link(Tranchida7)
|
||||
:link(Tranchida)
|
||||
[(Tranchida)] Tranchida, Plimpton, Thibaudeau and Thompson,
|
||||
arXiv preprint arXiv:1801.10233, (2018).
|
||||
Journal of Computational Physics, 372, 406-425, (2018).
|
||||
|
|
|
@ -10,7 +10,7 @@ Documentation"_ld - "LAMMPS Commands"_lc :c
|
|||
TIP3P water model :h3
|
||||
|
||||
The TIP3P water model as implemented in CHARMM
|
||||
"(MacKerell)"_#howto-MacKerell specifies a 3-site rigid water molecule with
|
||||
"(MacKerell)"_#howto-tip3p specifies a 3-site rigid water molecule with
|
||||
charges and Lennard-Jones parameters assigned to each of the 3 atoms.
|
||||
In LAMMPS the "fix shake"_fix_shake.html command can be used to hold
|
||||
the two O-H bonds and the H-O-H angle rigid. A bond style of
|
||||
|
@ -60,6 +60,10 @@ models"_http://en.wikipedia.org/wiki/Water_model.
|
|||
|
||||
:line
|
||||
|
||||
:link(howto-tip3p)
|
||||
[(MacKerell)] MacKerell, Bashford, Bellott, Dunbrack, Evanseck, Field,
|
||||
Fischer, Gao, Guo, Ha, et al, J Phys Chem, 102, 3586 (1998).
|
||||
|
||||
:link(Jorgensen1)
|
||||
[(Jorgensen)] Jorgensen, Chandrasekhar, Madura, Impey, Klein, J Chem
|
||||
Phys, 79, 926 (1983).
|
||||
|
|
|
@ -48,15 +48,8 @@ your machine and "unstable" is one of the 3 branches listed above.
|
|||
between them at any time using "git checkout <branch name>".)
|
||||
|
||||
Once the command completes, your directory will contain the same files
|
||||
as if you unpacked a current LAMMPS tarball, with two exceptions:
|
||||
|
||||
1) No LAMMPS packages are initially installed in the src dir (a few
|
||||
packages are installed by default in the tarball src dir). You can
|
||||
install whichever packages you wish before building LAMMPS; type "make
|
||||
package" from the src dir to see the options, and the
|
||||
"Packages"_Packages.html doc page for a discussion of packages.
|
||||
|
||||
2) The HTML documentation files are not included. They can be fetched
|
||||
as if you unpacked a current LAMMPS tarball, with the exception, that
|
||||
the HTML documentation files are not included. They can be fetched
|
||||
from the LAMMPS website by typing "make fetch" in the doc directory.
|
||||
Or they can be generated from the content provided in doc/src by
|
||||
typing "make html" from the the doc directory.
|
||||
|
|
|
@ -36,15 +36,8 @@ where "mylammps" is the name of the directory you wish to create on
|
|||
your machine.
|
||||
|
||||
Once the command completes, your directory will contain the same files
|
||||
as if you unpacked a current LAMMPS tarball, with two exceptions:
|
||||
|
||||
1) No LAMMPS packages are initially installed in the src dir (a few
|
||||
packages are installed by default in the tarball src dir). You can
|
||||
install whichever packages you wish before building LAMMPS; type "make
|
||||
package" from the src dir to see the options, and the
|
||||
"Packages"_Packages.html doc page for a discussion of packages.
|
||||
|
||||
2) The HTML documentation files are not included. They can be fetched
|
||||
as if you unpacked a current LAMMPS tarball, with the exception, that
|
||||
the HTML documentation files are not included. They can be fetched
|
||||
from the LAMMPS website by typing "make fetch" in the doc directory.
|
||||
Or they can be generated from the content provided in doc/src by
|
||||
typing "make html" from the the doc directory.
|
||||
|
|
|
@ -12,7 +12,7 @@ Download an executable for Windows :h3
|
|||
Pre-compiled Windows installers which install LAMMPS executables on a
|
||||
Windows system can be downloaded from this site:
|
||||
|
||||
"http://rpm.lammps.org/windows.html"_http://rpm.lammps.org/windows.html
|
||||
"http://packages.lammps.org/windows.html"_http://packages.lammps.org/windows.html
|
||||
|
||||
Note that each installer package has a date in its name, which
|
||||
corresponds to the LAMMPS version of the same date. Installers for
|
||||
|
@ -42,7 +42,7 @@ environment manipulations.
|
|||
|
||||
Note that to update to a newer version of LAMMPS, you should typically
|
||||
uninstall the version you currently have, download a new installer,
|
||||
and go thru the install procedure described above. I.e. the same
|
||||
and go through the install procedure described above. I.e. the same
|
||||
procedure for installing/updating most Windows programs. You can
|
||||
install multiple versions of LAMMPS (in different directories), but
|
||||
only the executable for the last-installed package will be found
|
||||
|
|
|
@ -40,7 +40,7 @@ General features :h4,link(general)
|
|||
syntax for defining and using variables and formulas
|
||||
syntax for looping over runs and breaking out of loops
|
||||
run one or multiple simulations simultaneously (in parallel) from one script
|
||||
build as library, invoke LAMMPS thru library interface or provided Python wrapper
|
||||
build as library, invoke LAMMPS through library interface or provided Python wrapper
|
||||
couple with other codes: LAMMPS calls other code, other code calls LAMMPS, umbrella code calls both :ul
|
||||
|
||||
Particle and model types :h4,link(particle)
|
||||
|
|
|
@ -15,8 +15,8 @@ functionality for setting up simulations and analyzing their output.
|
|||
|
||||
Specifically, LAMMPS was not conceived and designed for:
|
||||
|
||||
being run thru a GUI
|
||||
build molecular systems, or building molecular topologies
|
||||
being run through a GUI
|
||||
building molecular systems, or building molecular topologies
|
||||
assign force-field coefficients automagically
|
||||
perform sophisticated analysis of your MD simulation
|
||||
visualize your MD simulation interactively
|
||||
|
@ -24,18 +24,18 @@ plot your output data :ul
|
|||
|
||||
Although over the years these limitations have been somewhat
|
||||
reduced through features added to LAMMPS or external tools
|
||||
that either interface with LAMMPS or extend LAMMPS.
|
||||
that either closely interface with LAMMPS or extend LAMMPS.
|
||||
|
||||
Here are suggestions on how to perform these tasks:
|
||||
|
||||
GUI: LAMMPS can be built as a library and a Python wrapper that wraps
|
||||
[GUI:] LAMMPS can be built as a library and a Python wrapper that wraps
|
||||
the library interface is provided. Thus, GUI interfaces can be
|
||||
written in Python (or C or C++ if desired) that run LAMMPS and
|
||||
visualize or plot its output. Examples of this are provided in the
|
||||
python directory and described on the "Python"_Python_head.html doc
|
||||
page. Also, there are several external wrappers or GUI front ends.:ulb,l
|
||||
page. Also, there are several external wrappers or GUI front ends. :ulb,l
|
||||
|
||||
Builder: Several pre-processing tools are packaged with LAMMPS. Some
|
||||
[Builder:] Several pre-processing tools are packaged with LAMMPS. Some
|
||||
of them convert input files in formats produced by other MD codes such
|
||||
as CHARMM, AMBER, or Insight into LAMMPS input formats. Some of them
|
||||
are simple programs that will build simple molecular systems, such as
|
||||
|
@ -45,15 +45,20 @@ the "Tools"_Tools.html doc page for details on tools packaged with
|
|||
LAMMPS. The "Pre/post processing
|
||||
page"_http:/lammps.sandia.gov/prepost.html of the LAMMPS website
|
||||
describes a variety of 3rd party tools for this task. Furthermore,
|
||||
some LAMMPS internal commands to reconstruct topology, as well as
|
||||
the option to insert molecule templates instead of atoms.:l
|
||||
some LAMMPS internal commands allow to reconstruct, or selectively add
|
||||
topology information, as well as provide the option to insert molecule
|
||||
templates instead of atoms for building bulk molecular systems. :l
|
||||
|
||||
Force-field assignment: The conversion tools described in the previous
|
||||
[Force-field assignment:] The conversion tools described in the previous
|
||||
bullet for CHARMM, AMBER, and Insight will also assign force field
|
||||
coefficients in the LAMMPS format, assuming you provide CHARMM, AMBER,
|
||||
or BIOVIA (formerly Accelrys) force field files. :l
|
||||
or BIOVIA (formerly Accelrys) force field files. The tools
|
||||
"ParmEd"_https://parmed.github.io/ParmEd/html/index.html and
|
||||
"InterMol"_https://github.com/shirtsgroup/InterMol are particularly
|
||||
powerful and flexible in converting force field and topology data
|
||||
between various MD simulation programs. :l
|
||||
|
||||
Simulation analysis: If you want to perform analysis on-the-fly as
|
||||
[Simulation analysis:] If you want to perform analysis on-the-fly as
|
||||
your simulation runs, see the "compute"_compute.html and
|
||||
"fix"_fix.html doc pages, which list commands that can be used in a
|
||||
LAMMPS input script. Also see the "Modify"_Modify.html doc page for
|
||||
|
@ -71,22 +76,22 @@ tools/python directory can extract and massage data in dump files to
|
|||
make it easier to import into other programs. See the
|
||||
"Tools"_Tools.html doc page for details on these various options. :l
|
||||
|
||||
Visualization: LAMMPS can produce JPG or PNG snapshot images
|
||||
[Visualization:] LAMMPS can produce NETPBM, JPG or PNG snapshot images
|
||||
on-the-fly via its "dump image"_dump_image.html command and pass
|
||||
them to an external program FFmpeg to generate movies from them. For
|
||||
high-quality, interactive visualization there are many excellent and
|
||||
free tools available. See the "Other Codes
|
||||
them to an external program, "FFmpeg"_https://www.ffmpeg.org to generate
|
||||
movies from them. For high-quality, interactive visualization there are
|
||||
many excellent and free tools available. See the "Other Codes
|
||||
page"_http://lammps.sandia.gov/viz.html page of the LAMMPS website for
|
||||
visualization packages that can use LAMMPS output data. :l
|
||||
|
||||
Plotting: See the next bullet about Pizza.py as well as the
|
||||
[Plotting:] See the next bullet about Pizza.py as well as the
|
||||
"Python"_Python_head.html doc page for examples of plotting LAMMPS
|
||||
output. Scripts provided with the {python} tool in the tools
|
||||
directory will extract and massage data in log and dump files to make
|
||||
it easier to analyze and plot. See the "Tools"_Tools.html doc page
|
||||
for more discussion of the various tools. :l
|
||||
|
||||
Pizza.py: Our group has also written a separate toolkit called
|
||||
[Pizza.py:] Our group has also written a separate toolkit called
|
||||
"Pizza.py"_http://pizza.sandia.gov which can do certain kinds of
|
||||
setup, analysis, plotting, and visualization (via OpenGL) for LAMMPS
|
||||
simulations. It thus provides some functionality for several of the
|
||||
|
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 38 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 35 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 37 KiB |
|
@ -1,7 +1,7 @@
|
|||
<!-- HTML_ONLY -->
|
||||
<HEAD>
|
||||
<TITLE>LAMMPS Users Manual</TITLE>
|
||||
<META NAME="docnumber" CONTENT="12 Dec 2018 version">
|
||||
<META NAME="docnumber" CONTENT="30 Apr 2019 version">
|
||||
<META NAME="author" CONTENT="http://lammps.sandia.gov - Sandia National Laboratories">
|
||||
<META NAME="copyright" CONTENT="Copyright (2003) Sandia Corporation. This software and manual is distributed under the GNU General Public License.">
|
||||
</HEAD>
|
||||
|
@ -21,7 +21,7 @@
|
|||
:line
|
||||
|
||||
LAMMPS Documentation :c,h1
|
||||
12 Dec 2018 version :c,h2
|
||||
30 Apr 2019 version :c,h2
|
||||
|
||||
"What is a LAMMPS version?"_Manual_version.html
|
||||
|
||||
|
@ -37,27 +37,21 @@ LAMMPS is an open-source code, distributed freely under the terms of
|
|||
the GNU Public License (GPL).
|
||||
|
||||
The "LAMMPS website"_lws has a variety of information about the code.
|
||||
It includes links to an on-line version of this manual, a "mail
|
||||
It includes links to an on-line version of this manual, a "mailing
|
||||
list"_http://lammps.sandia.gov/mail.html where users can post
|
||||
questions, and a "GitHub site"https://github.com/lammps/lammps where
|
||||
questions, and a "GitHub site"_https://github.com/lammps/lammps where
|
||||
all LAMMPS development is coordinated.
|
||||
|
||||
:line
|
||||
|
||||
"PDF file"_Manual.pdf of the entire manual, generated by
|
||||
"htmldoc"_http://freecode.com/projects/htmldoc
|
||||
|
||||
The content for this manual is part of the LAMMPS distribution. You
|
||||
can build a local copy of the Manual as HTML pages or a PDF file, by
|
||||
following the steps on the "Manual build"_Manual_build.html doc page.
|
||||
|
||||
There is also a "Developer.pdf"_Developer.pdf document which gives
|
||||
a brief description of the basic code structure of LAMMPS.
|
||||
|
||||
:line
|
||||
|
||||
This manual is organized into the following sections.
|
||||
|
||||
Once you are familiar with LAMMPS, you may want to bookmark "this
|
||||
page"_Commands.html since it gives quick access to a doc page for
|
||||
every LAMMPS command.
|
||||
|
|