Merge branch 'master' into next-patch-release

# Conflicts:
#	.github/PULL_REQUEST_TEMPLATE.md
This commit is contained in:
Axel Kohlmeyer 2019-02-08 15:34:40 -05:00
commit 77c24f1b79
51 changed files with 378 additions and 150 deletions

67
.github/CODE_OF_CONDUCT.md vendored Normal file
View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

1
doc/.gitignore vendored
View File

@ -1,4 +1,5 @@
/html
/latex
/spelling
/LAMMPS.epub
/LAMMPS.mobi

View File

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

View File

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

View File

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

View File

@ -219,7 +219,7 @@ latex_elements = {
# author, documentclass [howto, manual, or own class]).
latex_documents = [
('Manual', 'LAMMPS.tex', 'LAMMPS Documentation',
'Steve Plimpton', 'manual'),
'The LAMMPS Developers', 'manual'),
]
# The name of an image file (relative to this directory) to place at the top of

View File

@ -206,7 +206,7 @@ void FixWallBodyPolygon::setup(int vflag)
void FixWallBodyPolygon::post_force(int /*vflag*/)
{
double vwall[3],dx,dy,dz,del1,del2,delxy,delr,rsq,eradi,rradi,wall_pos;
double vwall[3],dx,dy,dz,del1,del2,delxy,delr,rsq,eradi,wall_pos;
int i,ni,npi,ifirst,nei,iefirst,side;
double facc[3];
@ -316,7 +316,6 @@ void FixWallBodyPolygon::post_force(int /*vflag*/)
nei = ednum[i];
iefirst = edfirst[i];
eradi = enclosing_radius[i];
rradi = rounded_radius[i];
// reset vertex and edge forces
@ -332,14 +331,14 @@ void FixWallBodyPolygon::post_force(int /*vflag*/)
edge[iefirst+ni][4] = 0;
}
int interact, num_contacts, done;
int num_contacts, done;
double delta_a, delta_ua, j_a;
Contact contact_list[MAX_CONTACTS];
num_contacts = 0;
facc[0] = facc[1] = facc[2] = 0;
interact = vertex_against_wall(i, wall_pos, x, f, torque, side,
contact_list, num_contacts, facc);
vertex_against_wall(i, wall_pos, x, f, torque, side,
contact_list, num_contacts, facc);
if (num_contacts >= 2) {
@ -475,12 +474,11 @@ int FixWallBodyPolygon::vertex_against_wall(int i, double wall_pos,
Contact* contact_list, int &num_contacts, double* /*facc*/)
{
int ni, npi, ifirst, interact;
double xpi[3], eradi, rradi;
double xpi[3], rradi;
double fx, fy, fz;
npi = dnum[i];
ifirst = dfirst[i];
eradi = enclosing_radius[i];
rradi = rounded_radius[i];
interact = 0;

View File

@ -213,8 +213,8 @@ void FixWallBodyPolyhedron::setup(int vflag)
void FixWallBodyPolyhedron::post_force(int /*vflag*/)
{
double vwall[3],dx,dy,dz,del1,del2,rsq,eradi,rradi,wall_pos;
int i,ni,npi,ifirst,nei,iefirst,nfi,iffirst,side;
double vwall[3],dx,dy,dz,del1,del2,rsq,wall_pos;
int i,ni,npi,ifirst,nei,iefirst,side;
double facc[3];
// set position of wall to initial settings and velocity to 0.0
@ -330,10 +330,6 @@ void FixWallBodyPolyhedron::post_force(int /*vflag*/)
ifirst = dfirst[i];
nei = ednum[i];
iefirst = edfirst[i];
nfi = facnum[i];
iffirst = facfirst[i];
eradi = enclosing_radius[i];
rradi = rounded_radius[i];
if (npi == 1) {
sphere_against_wall(i, wall_pos, side, vwall, x, v, f, angmom, torque);
@ -356,13 +352,13 @@ void FixWallBodyPolyhedron::post_force(int /*vflag*/)
edge[iefirst+ni][5] = 0;
}
int interact, num_contacts;
int num_contacts;
Contact contact_list[MAX_CONTACTS];
num_contacts = 0;
facc[0] = facc[1] = facc[2] = 0;
interact = edge_against_wall(i, wall_pos, side, vwall, x, f, torque,
contact_list, num_contacts, facc);
edge_against_wall(i, wall_pos, side, vwall, x, f, torque,
contact_list, num_contacts, facc);
} // group bit
}
@ -544,7 +540,7 @@ int FixWallBodyPolyhedron::edge_against_wall(int i, double wall_pos,
int side, double* vwall, double** x, double** /*f*/, double** /*torque*/,
Contact* /*contact_list*/, int &/*num_contacts*/, double* /*facc*/)
{
int ni, nei, mode, contact;
int ni, nei, contact;
double rradi;
nei = ednum[i];
@ -555,8 +551,7 @@ int FixWallBodyPolyhedron::edge_against_wall(int i, double wall_pos,
// loop through body i's edges
for (ni = 0; ni < nei; ni++)
mode = compute_distance_to_wall(i, ni, x[i], rradi, wall_pos, side, vwall,
contact);
compute_distance_to_wall(i, ni, x[i], rradi, wall_pos, side, vwall, contact);
return contact;
}

View File

@ -212,8 +212,8 @@ double PairBornCoulLongCSGPU::memory_usage()
/* ---------------------------------------------------------------------- */
void PairBornCoulLongCSGPU::cpu_compute(int start, int inum, int eflag,
int vflag, int *ilist, int *numneigh,
int **firstneigh)
int /* vflag */, int *ilist,
int *numneigh, int **firstneigh)
{
int i,j,ii,jj,jnum,itable,itype,jtype;
double qtmp,xtmp,ytmp,ztmp,delx,dely,delz,evdwl,ecoul,fpair;

View File

@ -207,8 +207,8 @@ double PairBornCoulLongGPU::memory_usage()
/* ---------------------------------------------------------------------- */
void PairBornCoulLongGPU::cpu_compute(int start, int inum, int eflag,
int vflag, int *ilist, int *numneigh,
int **firstneigh)
int /* vflag */, int *ilist,
int *numneigh, int **firstneigh)
{
int i,j,ii,jj,jnum,itype,jtype;
double qtmp,xtmp,ytmp,ztmp,delx,dely,delz,evdwl,ecoul,fpair;

View File

@ -193,9 +193,9 @@ double PairBornCoulWolfCSGPU::memory_usage()
/* ---------------------------------------------------------------------- */
void PairBornCoulWolfCSGPU::cpu_compute(int start, int inum, int eflag, int vflag,
int *ilist, int *numneigh,
int **firstneigh) {
void PairBornCoulWolfCSGPU::cpu_compute(int start, int inum, int eflag,
int /* vflag */, int *ilist,
int *numneigh, int **firstneigh) {
int i,j,ii,jj,jnum,itype,jtype;
double xtmp,ytmp,ztmp,qtmp,delx,dely,delz,evdwl,ecoul,fpair;
double rsq,r2inv,r6inv,forcecoul,forceborn,factor_coul,factor_lj;

View File

@ -201,8 +201,8 @@ double PairBuckCoulLongGPU::memory_usage()
/* ---------------------------------------------------------------------- */
void PairBuckCoulLongGPU::cpu_compute(int start, int inum, int eflag,
int vflag, int *ilist, int *numneigh,
int **firstneigh)
int /* vflag */, int *ilist,
int *numneigh, int **firstneigh)
{
int i,j,ii,jj,jnum,itype,jtype;
double qtmp,xtmp,ytmp,ztmp,delx,dely,delz,evdwl,ecoul,fpair;

View File

@ -184,8 +184,9 @@ double PairColloidGPU::memory_usage()
/* ---------------------------------------------------------------------- */
void PairColloidGPU::cpu_compute(int start, int inum, int eflag, int vflag,
int *ilist, int *numneigh, int **firstneigh)
void PairColloidGPU::cpu_compute(int start, int inum, int eflag,
int /* vflag */, int *ilist,
int *numneigh, int **firstneigh)
{
int i,j,ii,jj,jnum,itype,jtype;
double xtmp,ytmp,ztmp,delx,dely,delz,evdwl,fpair;

View File

@ -153,7 +153,7 @@ void PairCoulLongCSGPU::init_style()
for (int i = 1; i <= atom->ntypes; i++) {
for (int j = i; j <= atom->ntypes; j++) {
if (setflag[i][j] != 0 || (setflag[i][i] != 0 && setflag[j][j] != 0)) {
double cut = init_one(i,j);
init_one(i,j);
}
}
}
@ -208,8 +208,8 @@ double PairCoulLongCSGPU::memory_usage()
/* ---------------------------------------------------------------------- */
void PairCoulLongCSGPU::cpu_compute(int start, int inum, int eflag,
int vflag, int *ilist, int *numneigh,
int **firstneigh)
int /* vflag */, int *ilist,
int *numneigh, int **firstneigh)
{
int i,j,ii,jj,jnum,itable,itype,jtype;
double qtmp,xtmp,ytmp,ztmp,delx,dely,delz,ecoul,fpair;

View File

@ -148,7 +148,7 @@ void PairCoulLongGPU::init_style()
for (int i = 1; i <= atom->ntypes; i++) {
for (int j = i; j <= atom->ntypes; j++) {
if (setflag[i][j] != 0 || (setflag[i][i] != 0 && setflag[j][j] != 0)) {
double cut = init_one(i,j);
init_one(i,j);
}
}
}
@ -203,8 +203,8 @@ double PairCoulLongGPU::memory_usage()
/* ---------------------------------------------------------------------- */
void PairCoulLongGPU::cpu_compute(int start, int inum, int eflag,
int vflag, int *ilist, int *numneigh,
int **firstneigh)
int /* vflag */, int *ilist,
int *numneigh, int **firstneigh)
{
int i,j,ii,jj,jnum,itable;
double qtmp,xtmp,ytmp,ztmp,delx,dely,delz,ecoul,fpair;

View File

@ -192,8 +192,8 @@ void PairEAMAlloyGPU::init_style()
/* ---------------------------------------------------------------------- */
double PairEAMAlloyGPU::single(int i, int j, int itype, int jtype,
double rsq, double factor_coul, double factor_lj,
double &fforce)
double rsq, double /* factor_coul */,
double /* factor_lj */, double &fforce)
{
int m;
double r,p,rhoip,rhojp,z2,z2p,recip,phi,phip,psip;
@ -235,7 +235,7 @@ double PairEAMAlloyGPU::single(int i, int j, int itype, int jtype,
/* ---------------------------------------------------------------------- */
int PairEAMAlloyGPU::pack_forward_comm(int n, int *list, double *buf,
int pbc_flag,int *pbc)
int /* pbc_flag */, int * /* pbc */)
{
int i,j,m;

View File

@ -192,8 +192,8 @@ void PairEAMFSGPU::init_style()
/* ---------------------------------------------------------------------- */
double PairEAMFSGPU::single(int i, int j, int itype, int jtype,
double rsq, double factor_coul, double factor_lj,
double &fforce)
double rsq, double /* factor_coul */,
double /* factor_lj */, double &fforce)
{
int m;
double r,p,rhoip,rhojp,z2,z2p,recip,phi,phip,psip;
@ -235,7 +235,7 @@ double PairEAMFSGPU::single(int i, int j, int itype, int jtype,
/* ---------------------------------------------------------------------- */
int PairEAMFSGPU::pack_forward_comm(int n, int *list, double *buf,
int pbc_flag,int *pbc)
int /* pbc_flag */, int * /* pbc */)
{
int i,j,m;

View File

@ -195,8 +195,8 @@ void PairEAMGPU::init_style()
/* ---------------------------------------------------------------------- */
double PairEAMGPU::single(int i, int j, int itype, int jtype,
double rsq, double factor_coul, double factor_lj,
double &fforce)
double rsq, double /* factor_coul */,
double /* factor_lj */, double &fforce)
{
int m;
double r,p,rhoip,rhojp,z2,z2p,recip,phi,phip,psip;
@ -238,7 +238,7 @@ double PairEAMGPU::single(int i, int j, int itype, int jtype,
/* ---------------------------------------------------------------------- */
int PairEAMGPU::pack_forward_comm(int n, int *list, double *buf,
int pbc_flag,int *pbc)
int /* pbc_flag */, int * /* pbc */)
{
int i,j,m;

View File

@ -221,8 +221,9 @@ double PairGayBerneGPU::memory_usage()
/* ---------------------------------------------------------------------- */
void PairGayBerneGPU::cpu_compute(int start, int inum, int eflag, int vflag,
int *ilist, int *numneigh, int **firstneigh)
void PairGayBerneGPU::cpu_compute(int start, int inum, int eflag,
int /* vflag */, int *ilist,
int *numneigh, int **firstneigh)
{
int i,j,ii,jj,jnum,itype,jtype;
double evdwl,one_eng,rsq,r2inv,r6inv,forcelj,factor_lj;

View File

@ -151,11 +151,10 @@ void PairLJCharmmCoulLongGPU::init_style()
// Repeat cutsq calculation because done after call to init_style
double cut;
for (int i = 1; i <= atom->ntypes; i++) {
for (int j = i; j <= atom->ntypes; j++) {
if (setflag[i][j] != 0 || (setflag[i][i] != 0 && setflag[j][j] != 0))
cut = init_one(i,j);
init_one(i,j);
}
}
@ -219,7 +218,7 @@ double PairLJCharmmCoulLongGPU::memory_usage()
/* ---------------------------------------------------------------------- */
void PairLJCharmmCoulLongGPU::cpu_compute(int start, int inum, int eflag,
int vflag, int *ilist,
int /* vflag */, int *ilist,
int *numneigh, int **firstneigh)
{
int i,j,ii,jj,jnum,itype,jtype,itable;

View File

@ -197,8 +197,8 @@ double PairLJClass2CoulLongGPU::memory_usage()
/* ---------------------------------------------------------------------- */
void PairLJClass2CoulLongGPU::cpu_compute(int start, int inum, int eflag,
int vflag, int *ilist, int *numneigh,
int **firstneigh)
int /* vflag */, int *ilist,
int *numneigh, int **firstneigh)
{
int i,j,ii,jj,jnum,itype,jtype;
double qtmp,xtmp,ytmp,ztmp,delx,dely,delz,evdwl,ecoul,fpair;

View File

@ -215,8 +215,8 @@ double PairLJCutCoulLongGPU::memory_usage()
/* ---------------------------------------------------------------------- */
void PairLJCutCoulLongGPU::cpu_compute(int start, int inum, int eflag,
int vflag, int *ilist, int *numneigh,
int **firstneigh)
int /* vflag */, int *ilist,
int *numneigh, int **firstneigh)
{
int i,j,ii,jj,jnum,itype,jtype,itable;
double qtmp,xtmp,ytmp,ztmp,delx,dely,delz,evdwl,ecoul,fpair;

View File

@ -192,8 +192,9 @@ double PairLJCutCoulMSMGPU::memory_usage()
/* ---------------------------------------------------------------------- */
void PairLJCutCoulMSMGPU::cpu_compute(int start, int inum, int eflag, int vflag,
int *ilist, int *numneigh, int **firstneigh) {
void PairLJCutCoulMSMGPU::cpu_compute(int start, int inum, int eflag,
int /* vflag */, int *ilist,
int *numneigh, int **firstneigh) {
int i,j,ii,jj,jnum,itype,jtype,itable;
double qtmp,xtmp,ytmp,ztmp,delx,dely,delz,evdwl,ecoul,fpair;
double fraction,table;

View File

@ -216,7 +216,7 @@ void PairLJCutDipoleLongGPU::cpu_compute(int start, int inum, int eflag, int vfl
double qtmp,xtmp,ytmp,ztmp,delx,dely,delz;
double rsq,r,rinv,r2inv,r6inv;
double forcecoulx,forcecouly,forcecoulz,fforce;
double tixcoul,tiycoul,tizcoul,tjxcoul,tjycoul,tjzcoul;
double tixcoul,tiycoul,tizcoul;
double fx,fy,fz,fdx,fdy,fdz,fax,fay,faz;
double pdotp,pidotr,pjdotr,pre1,pre2,pre3;
double grij,expm2,t,erfc;
@ -378,14 +378,9 @@ void PairLJCutDipoleLongGPU::cpu_compute(int start, int inum, int eflag, int vfl
tixcoul = mu[i][1]*(zdiz + zaiz) - mu[i][2]*(zdiy + zaiy);
tiycoul = mu[i][2]*(zdix + zaix) - mu[i][0]*(zdiz + zaiz);
tizcoul = mu[i][0]*(zdiy + zaiy) - mu[i][1]*(zdix + zaix);
tjxcoul = mu[j][1]*(zdjz + zajz) - mu[j][2]*(zdjy + zajy);
tjycoul = mu[j][2]*(zdjx + zajx) - mu[j][0]*(zdjz + zajz);
tjzcoul = mu[j][0]*(zdjy + zajy) - mu[j][1]*(zdjx + zajx);
} else {
forcecoulx = forcecouly = forcecoulz = 0.0;
tixcoul = tiycoul = tizcoul = 0.0;
tjxcoul = tjycoul = tjzcoul = 0.0;
}
// LJ interaction

View File

@ -215,8 +215,8 @@ double PairLJExpandCoulLongGPU::memory_usage()
/* ---------------------------------------------------------------------- */
void PairLJExpandCoulLongGPU::cpu_compute(int start, int inum, int eflag,
int vflag, int *ilist, int *numneigh,
int **firstneigh)
int /* vflag */, int *ilist,
int *numneigh, int **firstneigh)
{
int i,j,ii,jj,jnum,itype,jtype,itable;
double qtmp,xtmp,ytmp,ztmp,delx,dely,delz,evdwl,ecoul,fpair;

View File

@ -172,8 +172,8 @@ double PairMIECutGPU::memory_usage()
/* ---------------------------------------------------------------------- */
void PairMIECutGPU::cpu_compute(int start, int inum, int eflag, int vflag,
int *ilist, int *numneigh, int **firstneigh) {
void PairMIECutGPU::cpu_compute(int start, int inum, int eflag, int /* vflag */,
int *ilist, int *numneigh, int **firstneigh) {
int i,j,ii,jj,jnum,itype,jtype;
double xtmp,ytmp,ztmp,delx,dely,delz,evdwl,fpair;
double rsq,r2inv,rgamR,rgamA,forcemie,factor_mie;

View File

@ -168,7 +168,7 @@ double PairMorseGPU::memory_usage()
/* ---------------------------------------------------------------------- */
void PairMorseGPU::cpu_compute(int start, int inum, int eflag, int vflag,
void PairMorseGPU::cpu_compute(int start, int inum, int eflag, int /* vflag */,
int *ilist, int *numneigh, int **firstneigh)
{
int i,j,ii,jj,jnum,itype,jtype;

View File

@ -219,8 +219,9 @@ double PairRESquaredGPU::memory_usage()
/* ---------------------------------------------------------------------- */
void PairRESquaredGPU::cpu_compute(int start, int inum, int eflag, int vflag,
int *ilist, int *numneigh, int **firstneigh)
void PairRESquaredGPU::cpu_compute(int start, int inum, int eflag,
int /* vflag */, int *ilist,
int *numneigh, int **firstneigh)
{
int i,j,ii,jj,jnum,itype,jtype;
double evdwl,one_eng,rsq,r2inv,r6inv,forcelj,factor_lj;

View File

@ -182,8 +182,8 @@ double PairSoftGPU::memory_usage()
/* ---------------------------------------------------------------------- */
void PairSoftGPU::cpu_compute(int start, int inum, int eflag, int vflag,
int *ilist, int *numneigh, int **firstneigh) {
void PairSoftGPU::cpu_compute(int start, int inum, int eflag, int /* vflag */,
int *ilist, int *numneigh, int **firstneigh) {
int i,j,ii,jj,jnum,itype,jtype;
double xtmp,ytmp,ztmp,delx,dely,delz,evdwl,fpair;
double r,rsq,arg,factor_lj;

View File

@ -246,7 +246,7 @@ double PairTableGPU::memory_usage()
/* ---------------------------------------------------------------------- */
void PairTableGPU::cpu_compute(int start, int inum, int eflag, int vflag,
void PairTableGPU::cpu_compute(int start, int inum, int eflag, int /* vflag */,
int *ilist, int *numneigh, int **firstneigh) {
int i,j,ii,jj,jnum,itype,jtype,itable;
double xtmp,ytmp,ztmp,delx,dely,delz,evdwl,fpair;

View File

@ -186,8 +186,8 @@ double PairUFMGPU::memory_usage()
/* ---------------------------------------------------------------------- */
void PairUFMGPU::cpu_compute(int start, int inum, int eflag, int vflag,
int *ilist, int *numneigh, int **firstneigh) {
void PairUFMGPU::cpu_compute(int start, int inum, int eflag, int /* vflag */,
int *ilist, int *numneigh, int **firstneigh) {
int i,j,ii,jj,jnum,itype,jtype;
double xtmp,ytmp,ztmp,delx,dely,delz,evdwl,fpair;
double rsq,expuf,factor_lj;

View File

@ -151,7 +151,7 @@ void PairVashishtaGPU::init_style()
if (force->newton_pair != 0)
error->all(FLERR,"Pair style vashishta/gpu requires newton pair off");
double *cutsq, *r0, *r0eps, *gamma, *eta;
double *cutsq, *r0, *gamma, *eta;
double *lam1inv, *lam4inv, *zizj, *mbigd;
double *dvrc, *big6w, *heta, *bigh;
double *bigw, *c0, *costheta, *bigb;

View File

@ -179,8 +179,8 @@ double PairYukawaColloidGPU::memory_usage()
/* ---------------------------------------------------------------------- */
void PairYukawaColloidGPU::cpu_compute(int start, int inum, int eflag,
int vflag, int *ilist, int *numneigh,
int **firstneigh) {
int /* vflag */, int *ilist,
int *numneigh, int **firstneigh) {
int i,j,ii,jj,jnum,itype,jtype;
double xtmp,ytmp,ztmp,delx,dely,delz,evdwl,fpair,radi,radj;
double r,rsq,rinv,screening,forceyukawa,factor;

View File

@ -170,8 +170,8 @@ double PairYukawaGPU::memory_usage()
/* ---------------------------------------------------------------------- */
void PairYukawaGPU::cpu_compute(int start, int inum, int eflag, int vflag,
int *ilist, int *numneigh, int **firstneigh) {
void PairYukawaGPU::cpu_compute(int start, int inum, int eflag, int /* vflag */,
int *ilist, int *numneigh, int **firstneigh) {
int i,j,ii,jj,jnum,itype,jtype;
double xtmp,ytmp,ztmp,delx,dely,delz,evdwl,fpair;
double rsq,r2inv,r,rinv,screening,forceyukawa,factor;

View File

@ -177,7 +177,7 @@ double PairZBLGPU::memory_usage()
/* ---------------------------------------------------------------------- */
void PairZBLGPU::cpu_compute(int start, int inum, int eflag, int vflag,
void PairZBLGPU::cpu_compute(int start, int inum, int eflag, int /* vflag */,
int *ilist, int *numneigh, int **firstneigh) {
int i,j,ii,jj,jnum,itype,jtype;
double xtmp,ytmp,ztmp,delx,dely,delz,evdwl,fpair;

View File

@ -4988,7 +4988,7 @@ void PairBOP::read_table(char *filename)
fgets(s,MAXLINE,fp);
nws=0;
ws=1;
for(j=0;j<strlen(s);j++) {
for(j=0;j<(int)strlen(s);j++) {
if(ws==1) {
if(isspace(s[j])) {
ws=1;
@ -5015,7 +5015,7 @@ void PairBOP::read_table(char *filename)
nws=0;
ws=1;
fgets(s,MAXLINE,fp);
for(j=0;j<strlen(s);j++) {
for(j=0;j<(int)strlen(s);j++) {
if(ws==1) {
if(isspace(s[j])) {
ws=1;

View File

@ -401,9 +401,9 @@ double PairPython::init_one(int, int)
/* ---------------------------------------------------------------------- */
double PairPython::single(int i, int j, int itype, int jtype, double rsq,
double factor_coul, double factor_lj,
double &fforce)
double PairPython::single(int /* i */, int /* j */, int itype, int jtype,
double rsq, double /* factor_coul */,
double factor_lj, double &fforce)
{
// with hybrid/overlay we might get called for skipped types
if (skip_types[itype] || skip_types[jtype]) {

26
src/USER-PTM/README Normal file
View File

@ -0,0 +1,26 @@
This package provides the compute ptm/atom command for LAMMPS which implements the
Polyhedral Template Matching algorithm for analysis of molecular dynamics simulation data
The method is currently (Fall 2018) included in OVITO, LAMMPS, and ASAP.
OVITO PTM documentation: http://www.ovito.org/manual/particles.modifiers.polyhedral_template_matching.html
LAMMPS PTM documentation: http://lammps.sandia.gov/doc/compute_ptm_atom.html
ASAP PTM documentation: http://wiki.fysik.dtu.dk/asap/Local%20crystalline%20order
If you use PTM in a publication, please reference:
Peter Mahler Larsen and Søren Schmidt and Jakob Schiøtz
Robust structural identification via polyhedral template matching
Modelling Simul. Mater. Sci. Eng. 24 (2016) 055007
Article available at:
http://stacks.iop.org/0965-0393/24/i=5/a=055007
Preprint available at:
http://arxiv.org/abs/1603.05143

View File

@ -126,14 +126,12 @@ FixQEqReax::FixQEqReax(LAMMPS *lmp, int narg, char **arg) :
reaxc = NULL;
reaxc = (PairReaxC *) force->pair_match("reax/c",0);
if (reaxc) {
s_hist = t_hist = NULL;
grow_arrays(atom->nmax);
atom->add_callback(0);
for (int i = 0; i < atom->nmax; i++)
for (int j = 0; j < nprev; ++j)
s_hist[i][j] = t_hist[i][j] = 0;
}
s_hist = t_hist = NULL;
grow_arrays(atom->nmax);
atom->add_callback(0);
for (int i = 0; i < atom->nmax; i++)
for (int j = 0; j < nprev; ++j)
s_hist[i][j] = t_hist[i][j] = 0;
}
/* ---------------------------------------------------------------------- */
@ -557,17 +555,11 @@ void FixQEqReax::init_matvec()
b_s[i] = -chi[ atom->type[i] ];
b_t[i] = -1.0;
/* linear extrapolation for s & t from previous solutions */
//s[i] = 2 * s_hist[i][0] - s_hist[i][1];
//t[i] = 2 * t_hist[i][0] - t_hist[i][1];
/* quadratic extrapolation for s & t from previous solutions */
//s[i] = s_hist[i][2] + 3 * ( s_hist[i][0] - s_hist[i][1] );
t[i] = t_hist[i][2] + 3 * ( t_hist[i][0] - t_hist[i][1]);
/* cubic extrapolation for s & t from previous solutions */
s[i] = 4*(s_hist[i][0]+s_hist[i][2])-(6*s_hist[i][1]+s_hist[i][3]);
//t[i] = 4*(t_hist[i][0]+t_hist[i][2])-(6*t_hist[i][1]+t_hist[i][3]);
}
}
@ -615,6 +607,7 @@ void FixQEqReax::compute_H()
for (jj = 0; jj < jnum; jj++) {
j = jlist[jj];
j &= NEIGHMASK;
dx = x[j][0] - x[i][0];
dy = x[j][1] - x[i][1];

View File

@ -2290,7 +2290,7 @@ int Atom::memcheck(const char *str)
return 0;
}
if (strlen(memstr) + n >= memlength) {
if ((int)strlen(memstr) + n >= memlength) {
memlength += DELTA_MEMSTR;
memory->grow(memstr,memlength,"atom:memstr");
}

View File

@ -78,7 +78,6 @@ double ComputeReduceRegion::compute_one(int m, int flag)
n = value2index[m];
}
int aidx = argindex[m];
int j = argindex[m];
double one = 0.0;

View File

@ -727,26 +727,6 @@ void CreateAtoms::add_lattice()
domain->lattice->bbox(1,bboxhi[0],bboxhi[1],bboxhi[2],
xmin,ymin,zmin,xmax,ymax,zmax);
// narrow down min/max further by extent of the region, if possible
if ((style == REGION) && domain->regions[nregion]->bboxflag) {
double rxmin = domain->regions[nregion]->extent_xlo;
double rxmax = domain->regions[nregion]->extent_xhi;
double rymin = domain->regions[nregion]->extent_ylo;
double rymax = domain->regions[nregion]->extent_yhi;
double rzmin = domain->regions[nregion]->extent_zlo;
double rzmax = domain->regions[nregion]->extent_zhi;
domain->lattice->box2lattice(rxmin,rymin,rzmin);
domain->lattice->box2lattice(rxmax,rymax,rzmax);
if (rxmin > xmin) xmin = (rxmin > xmax) ? xmax : rxmin;
if (rxmax < xmax) xmax = (rxmax < xmin) ? xmin : rxmax;
if (rymin > ymin) ymin = (rymin > ymax) ? ymax : rymin;
if (rymax < ymax) ymax = (rymax < ymin) ? ymin : rymax;
if (rzmin > zmin) zmin = (rzmin > zmax) ? zmax : rzmin;
if (rzmax < zmax) zmax = (rzmax < zmin) ? zmin : rzmax;
}
// ilo:ihi,jlo:jhi,klo:khi = loop bounds for lattice overlap of my subbox
// overlap = any part of a unit cell (face,edge,pt) in common with my subbox
// in lattice space, subbox is a tilted box

View File

@ -4,6 +4,7 @@
#endif
#include <direct.h>
#include <cmath>
#include <cstring>
// LAMMPS uses usleep with 100 ms arguments, no microsecond precision needed
#if !defined(__MINGW32__)
#include "sleep.h"
@ -15,6 +16,7 @@
#define ATOBIGINT _atoi64
#define pclose _pclose
#define strdup _strdup
// the following functions ared defined to get rid of
// 'ambiguous call to overloaded function' error in VSS for mismathched type arguments

View File

@ -151,13 +151,13 @@ void Pair::modify_params(int narg, char **arg)
} else if (strcmp(arg[iarg],"table") == 0) {
if (iarg+2 > narg) error->all(FLERR,"Illegal pair_modify command");
ncoultablebits = force->inumeric(FLERR,arg[iarg+1]);
if (ncoultablebits > sizeof(float)*CHAR_BIT)
if (ncoultablebits > (int)sizeof(float)*CHAR_BIT)
error->all(FLERR,"Too many total bits for bitmapped lookup table");
iarg += 2;
} else if (strcmp(arg[iarg],"table/disp") == 0) {
if (iarg+2 > narg) error->all(FLERR,"Illegal pair_modify command");
ndisptablebits = force->inumeric(FLERR,arg[iarg+1]);
if (ndisptablebits > sizeof(float)*CHAR_BIT)
if (ndisptablebits > (int)sizeof(float)*CHAR_BIT)
error->all(FLERR,"Too many total bits for bitmapped lookup table");
iarg += 2;
} else if (strcmp(arg[iarg],"tabinner") == 0) {
@ -1695,7 +1695,7 @@ void Pair::init_bitmap(double inner, double outer, int ntablebits,
if (sizeof(int) != sizeof(float))
error->all(FLERR,"Bitmapped lookup tables require int/float be same size");
if (ntablebits > sizeof(float)*CHAR_BIT)
if (ntablebits > (int)sizeof(float)*CHAR_BIT)
error->all(FLERR,"Too many total bits for bitmapped lookup table");
if (inner >= outer)
@ -1719,7 +1719,7 @@ void Pair::init_bitmap(double inner, double outer, int ntablebits,
int nmantbits = ntablebits - nexpbits;
if (nexpbits > sizeof(float)*CHAR_BIT - FLT_MANT_DIG)
if (nexpbits > (int)sizeof(float)*CHAR_BIT - FLT_MANT_DIG)
error->all(FLERR,"Too many exponent bits for lookup table");
if (nmantbits+1 > FLT_MANT_DIG)
error->all(FLERR,"Too many mantissa bits for lookup table");

View File

@ -1963,7 +1963,7 @@ void ReadData::parse_keyword(int first)
}
while (eof == 0 && done == 0) {
int blank = strspn(line," \t\n\r");
if ((blank == strlen(line)) || (line[blank] == '#')) {
if ((blank == (int)strlen(line)) || (line[blank] == '#')) {
if (fgets(line,MAXLINE,fp) == NULL) eof = 1;
} else done = 1;
}

View File

@ -627,7 +627,7 @@ void ReadRestart::file_search(char *infile, char *outfile)
if ((ptr = strstr(&ep->d_name[nbegin],end)) == NULL) continue;
if (strlen(end) == 0) ptr = ep->d_name + strlen(ep->d_name);
*ptr = '\0';
if (strlen(&ep->d_name[nbegin]) < n) {
if ((int)strlen(&ep->d_name[nbegin]) < n) {
strcpy(middle,&ep->d_name[nbegin]);
if (ATOBIGINT(middle) > maxnum) maxnum = ATOBIGINT(middle);
}