Repository navigation
Conversation
This branch has not been 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.
Summary
Use the existing
Cpptraj::Dcalcclass inAction_PairDistto avoid redundant calculations when evaluating atom-pair distances.
The change:
Dcalconce per frame.SetXYZ1()once per outer-loop atom.Dist2()in the inner loop.This builds on the distance-calculation improvements
introduced in #1198.
Validation
identical benchmark output.
Performance
Benchmarks were run on an Intel i5-6600, pinned to CPU 2,
using single-threaded execution and five repetitions
with
perf stat.Independent MDAnalysis adenylate kinase trajectory:
47,681 atoms, 4 million atom pairs per frame.
The orthogonal benchmark repeats 10 distinct trajectory
frames ten times. Its box angles were changed to 90 degrees
for a controlled orthogonal imaging comparison.
A separate CPPTRAJ truncated-octahedral benchmark showed
a 32.8% reduction in elapsed time.
Maintainer note
Thank you for reviewing and merging our earlier related
optimizations. I particularly appreciate the subsequent
work on distance calculations in #1198, which provided
the basis for this change.
I hope this is a useful extension of that work. If it
overlaps with anything already underway or planned,
please feel entirely free to close the PR. I certainly
don't want to duplicate effort or interfere with your
development plans.
Thanks again for your time and for maintaining CPPTRAJ.