Skip to content
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

Speed up six-dimensional entropy calculation in GIST #938

Merged
merged 2 commits into from
Jan 31, 2022

Conversation

fwaibl
Copy link
Contributor

@fwaibl fwaibl commented Jan 28, 2022

In GIST, the six-dimensional entropy calculation requires the translational and orientational distance to the nearest neighbor (NN). However, if the translational distance is larger than the 6D distance to the current NN, the orientational distance can be skipped safely. This is a significant speedup (about 2x in my test), since the orientational distance contains an arccos.

I benchmarked using 10000 frames from a simulation of water around benzene (2700 water molecules). The box size was 80x80x80, with 0.5A spacing. I get the same entropy results, and the time in "Action Post" (from the cpptraj output) reduces from 545 to 263 seconds. I used the OMP version of cpptraj (with CUDA for the energy, but that shouldn't matter).

In GIST, the six-dimensional entropy calculation requires the
translational and orientational distance to the nearest neighbor (NN).
However, if the translational distance is larger than the 6D distance to
the current NN, the orientational distance can be skipped safely.  This
is a significant speedup (about 2x in my test), since the orientational
distance contains an arccos.
@drroe
Copy link
Contributor

drroe commented Jan 28, 2022

Sorry for the delay, didn't realize workflows needs my approval for first time contributors, that's new to me. I just sent the tests through.

@drroe
Copy link
Contributor

drroe commented Jan 28, 2022

@fwaibl Just one small thing, could you please increment the revision field in src/Version.h by 1 to 6.2.2? E.g.

#define CPPTRAJ_INTERNAL_VERSION "V6.2.2"

Thanks again, this is great!

@drroe
Copy link
Contributor

drroe commented Jan 31, 2022

Perfect, thanks!

@drroe drroe merged commit f8514dc into Amber-MD:master Jan 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants