Handle boundary conditions internally#919
Draft
giacomofiorin wants to merge 15 commits into
Draft
Conversation
642b47c to
9d5c2ca
Compare
07b3f71 to
9722e54
Compare
Member
Author
|
Note: I have confirmed by manually changing the unit cell vectors in the GROMACS input files, that the https://manual.gromacs.org/current/reference-manual/algorithms/periodic-boundary-conditions.html |
dbf7279 to
8f4b4fd
Compare
109617b to
7cc62b1
Compare
4d1fed3 to
c214448
Compare
…GROMACS) The LAMMPS interface was not importing tilt factors before this fix
(Leftover from a previous version of this branch but useful in general)
c214448 to
815dfd4
Compare
HanatoK
reviewed
Jun 25, 2026
| { | ||
| if (!is_enabled(f_cvc_pbc_minimum_image)) { | ||
| // Copy boundary conditions from the proxy | ||
| boundary_conditions = cvm::main()->proxy->get_system_boundaries(); |
Member
There was a problem hiding this comment.
Maybe it is better to use cvmodule->proxy?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR removes all calls to MD engines' codes for computing distances using the minimum-image convention. Now, the periodic boundary conditions are copied by the respective proxy class into a single object of type
colvarmodule::system_boundary_conditions.This class should be trivially copyable, and it is implemented in a single header file that uses the
COLVARS_HOST_DEVICEmacro. Therefore, the same code should work in both host and device, and could assist in computing PBC-aware distances on the device without duplicating existing code.TODO: more tests are required with triclinic cells, or mixed periodicity as allowed by the engines.