-
Notifications
You must be signed in to change notification settings - Fork 67
Rewrite pair list class; large speedup for 'checkstructure' #530
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
Merged
Conversation
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
…x in a 5827 atom system
…ical pragma in the middle of the loop and will eventually allow for consistent output between serial/openmp.
…e functionality into its own subroutine.
…the same structure.
…used, adjust the pairlist accordingly.
…ames because its way faster now.
…ots of validation still.
…tructureCheck; will suppress non-warning/error setup messages in permutedihedrals.
Jenkins failure looks like an issue with the build system - safe to merge. |
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 consists of two major changes/improvements to cpptraj:
checkstructure
Action to speed up systems with box info, which tend to be large.The PairList class was originally written for the Ewald class and was based on how SANDER employed a pair list. While it worked, it was not written in a very user-friendly or object-oriented way. It has now been written to be much more object oriented: the pair list consists of cells (
CellType
), to which atoms are added (AtmType
). Cells contain information on all neighboring cells. The performance is unchanged from the previous implementation (based on tests of theenergy ewald
command) and it is now easier to iterate over cells and atoms in cells.With the PairList class now being easier to use it has been incorporated into the
checkstructure
Action as a proof-of-concept and performs extremely well. In tests of some large systems (thousands to tens of thousands of atoms) the version ofcheckstructure
with a pair list shows a speedup of over 100x compared to the non-pair list version.The structure checking aspect of Action_CheckStructure has now been properly separated into the new
StructureCheck
class so that other parts of the code (e.g.Exec_PermuteDihedrals
) get access to only the functionality they need. Thecheckstructure
command now also works properly with MPI and gives consistent results when used with MPI and/or OpenMP (i.e. order of problems found is the same no matter what). The OpenMP version scales slightly better now due to the removal ofcritical
pragmas.This PR also adds more tests for
checkstructure
, including for the new pair list functionality.