lammps icon indicating copy to clipboard operation
lammps copied to clipboard

Replicate periodic box

Open jrgissing opened this issue 3 years ago • 0 comments

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

  • [x] 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 avatar Feb 06 '22 21:02 jrgissing