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

Replicate periodic box #3118

Merged
merged 26 commits into from
May 13, 2024
Merged

Conversation

jrgissing
Copy link
Collaborator

@jrgissing jrgissing commented Feb 6, 2022

Summary

implement generalized algorithm for replicate command, to correctly replicate molecules that are looped across periodic boundaries

Related Issue(s)

none

Author(s)

JG

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

yes

Implementation Notes

several tricky parts to this feature. first was issues in serial, including literal corner case when bonded interactions are looped in multiple dimensions. second was issues in parallel, used existing infrastructure from 'bbox' option to get system-wide info

does not actually walk bond list, instead utilizes self-consistent minimum image convention of replicated box. may not work for very small systems where bonded interaction is greater than half of original box length (which lammps already complains about).

tested with system that has pre-existing image flags

Post Submission Checklist

  • 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
  • Suitable tests have been added to the unittest tree.
  • A package specific README file has been included or updated
  • One or more example input decks are included

Further Information, Files, and Links

@jrgissing jrgissing marked this pull request as draft April 23, 2022 01:54
@jrgissing jrgissing marked this pull request as ready for review June 7, 2022 15:18
@sjplimp
Copy link
Contributor

sjplimp commented May 7, 2024

@jrgissing I pushed the folllowing minor changes:
(1) Altered doc page, please read it and see if anything looks amiss?
(2) Some code reorg in replicate.cpp to make the 2 algorithms more separate and readable
(3) Added some toy examples to example/replicate along with a README file

If all this looks good to you, I can approve the PR and it should be ready to merge.

@jrgissing
Copy link
Collaborator Author

@sjplimp this looks good to me!

@sjplimp sjplimp assigned stanmoore1 and unassigned sjplimp May 7, 2024
@sjplimp
Copy link
Contributor

sjplimp commented May 7, 2024

@stanmoore1 I think this should be ready for you to look at and merge.

@stanmoore1 stanmoore1 merged commit fd1aa73 into lammps:develop May 13, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

None yet

3 participants