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

Allow triclinic boxes in MPCD #1950

Merged
merged 2 commits into from
Nov 27, 2024
Merged

Allow triclinic boxes in MPCD #1950

merged 2 commits into from
Nov 27, 2024

Conversation

mphoward
Copy link
Collaborator

@mphoward mphoward commented Nov 25, 2024

Description

This PR generalizes the MPCD cell list code to allow triclinic simulation boxes. The cells are aligned to the lattice vectors rather than being a simple cubic lattice. This means that the MPCD cells can be skewed by a tilt factor as well as orthorhombic non-cubic.

Benchmark

SRD solvent with density 10, collision angle 130, and kT = 1 in cube with L = 120.

CPU: 2x Intel Xeon Gold 6248R = 48 cores (Auburn University Easley)

  • 4.8.2: 19.5 TPS
  • this branch: 19.0 TPS

GPU: 1x A100 (NCSA Delta GPU)

  • 4.9.1: 200.2 TPS
  • this branch: 200.5 TPS

No change on GPU (A100 is compute hungry), and only a small penalty on CPU. This performance is acceptable to me in order to enable more flexibility.

Motivation and context

This generalization of the code is necessary to enable simulation methods that deform the box, e.g., Lees-Edwards shear flow implemented using the Lagrangian rhomboid method. It also puts less restrictions on the user to make their cells exactly cubic.

Resolves #773

How has this been tested?

Existing C++ tests of the cell list have been generalized to triclinic boxes. There were some cases that no longer worked as originally written because of floating-point rounding. I am also planning a subsequent PR that will change the way MPCD does domain decomposition so that there will be no cells crossing boundaries anymore. Hence, these cases should become irrelevant.

Checklist:

  • I have reviewed the Contributor Guidelines.
  • I agree with the terms of the HOOMD-blue Contributor Agreement.
  • My name is on the list of contributors (sphinx-doc/credits.rst) in the pull request source branch.
  • I have summarized these changes in CHANGELOG.rst following the established format.

@mphoward mphoward linked an issue Nov 25, 2024 that may be closed by this pull request
@mphoward mphoward added the mpcd MPCD component label Nov 25, 2024
@mphoward
Copy link
Collaborator Author

This should be merged after PR #1951.

@mphoward mphoward force-pushed the feature-mpcd-triclinic branch 2 times, most recently from c3ada93 to 820f1b5 Compare November 26, 2024 16:07
@mphoward mphoward marked this pull request as ready for review November 27, 2024 01:36
@mphoward
Copy link
Collaborator Author

@joaander I finished my benchmarks for this PR, and they are acceptable to me. We have also run pretty long simulations with various skewed boxes on a single GPU without observing any errors. So, I think this PR is ready to be merged.

Copy link
Member

@joaander joaander left a comment

Choose a reason for hiding this comment

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

Thanks!

@joaander joaander merged commit e2642eb into trunk-major Nov 27, 2024
34 checks passed
@joaander joaander deleted the feature-mpcd-triclinic branch November 27, 2024 12:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mpcd MPCD component
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Relax MPCD restrictions on boxes
2 participants