Repository navigation
Conversation
This branch was previously deployed
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.
Closes #270.
When
perturbed_systemis used to seed replicas, its box is copied to the replicas closest to the perturbed end state. Until now the only check against the reference system was the atom count. If the two end states were equilibrated with NPT, their boxes differ, so for GCMC in the NVT ensemble the replicas would start with different volumes.This PR raises an error in
_check_inputswhen all of the following hold:perturbed_systemis givengcmcis enabledpressureisNoneBoxes are compared by type and by their vectors (
dimensions()forPeriodicBox,vector0/1/2()forTriclinicBox) with a relative tolerance of 1e-5, so a box with the same volume but a different shape is also caught. The error message suggests rescaling the perturbed system to the reference box, or setting a pressure to run in the osmotic ensemble.GCMC in the osmotic ensemble (with a pressure set) is unaffected.
Tests
test_perturbed_system_box_gcmccovers four cases:The check runs before any GPU setup, so the test runs on CPU. It's skipped on macOS, where GCMC isn't supported.