Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

apply PBC before neighbor list update, not after #190

Merged
merged 1 commit into from
May 15, 2022

Conversation

brucefan1983
Copy link
Owner

@brucefan1983 brucefan1983 commented May 15, 2022

This is a bug in GPUMD that can potentially affect a simulation with the following conditions:

  • The neighbor list is requested to be updated
  • The box length in some direction is slightly smaller than the product of the cutoff distance (force cutoff + skin) and an integer. For example, the cutoff is 9 Angstrom and the box length in some direction is 80.9 Angstrom, which is delta = 0.1 A smaller than 81 Angstrom. In principle, if delta < half of the skin distance (usually 1 A), it is potential to cause problems.
  • The box is large enough such that GPUMD chooses to use the O(N) algorithm instead of the O(N^2) algorithm.

When this happens, atoms around x = 0 (if this is the problematic direction) will have chance to get fewer number of neighbors than the true value.

To all users: if you think some of your simulations meet the conditions above, we suggest you check the results using the code after this PR.

Copy link
Collaborator

@hityingph hityingph left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, it can be merged into the master verison.

@brucefan1983 brucefan1983 merged commit 416d4d2 into master May 15, 2022
@brucefan1983 brucefan1983 deleted the fix_bug_for_neighbor branch May 15, 2022 16:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants