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 and functionality improvements for 'hbond' command #485

Merged
merged 57 commits into from
Apr 19, 2017

Conversation

drroe
Copy link
Contributor

@drroe drroe commented Apr 18, 2017

This PR improves the single-threaded speed of hbond (particularly for solute-solvent hydrogen bonds), adds OpenMP support, fixes some minor bugs, and introduces several new options. This largely (maybe even completely) addresses #392.

The solute-solute hydrogen bond calculation speed has been improved by ~1.3x, and the solute-solvent calculation speed improved by > 3x. The single-threaded speed enhancement comes largely from refactoring the donor/acceptor loops. Previously there were a lot of duplicated distance calculations, particularly when it came to solute-solvent hydrogen bonds. Hints are now properly used in all maps which improves the find/insertion speed. OpenMP allows for even further speedup (have gotten 7.3x for 4 threads in a real-world test).

Solute-solvent bridges within the same molecule are now properly ignored when nointramol is specified. Bridging interactions can now be tracked by solute atom, which allows better resolution when determining solute-solvent bridges; this is activated by the new bridgebyatom keyword (a test has been added for this). The sorting of bridges has also been made more stable. The code has been re-written to make it easy to add bridge time series data in the future.

Results will now be consistent for solute-solute hydrogen bonds in parallel (MPI and OpenMP) due to the more robust way solute-solute indices are calculated (no longer dependent on loop order). Also, uuseries and uvseries should now work properly in parallel. More detailed timing info can be turned on with the TIMER compiler define.

This PR also introduces the sort keyword for writing data files; this will ensure that data sets are sorted before being written out which allows consistent results between parallel and non-parallel versions of the code.

Version numbers have been incremented. We are now different from the official AT17 release.

drroe added 30 commits April 11, 2017 12:02
…site to avoid doubled calculation and hopefully make parallelization simpler.
…to be decent speedup so far but requires much more testing.
…sing donor H atom - acceptor atom indices as key.
…ttle since it introduces an if statement in some inner loops but is still faster than original.
…rison between series data of the old and new versions of the hbond code since the order in which hbonds are searched for is slightly different
…operly added to file if specified during MPI
…hread under openmp; can calculate numHB from the thread arrays
@drroe drroe self-assigned this Apr 18, 2017
@drroe
Copy link
Contributor Author

drroe commented Apr 18, 2017

Travis seems slow today...

@hainm
Copy link
Contributor

hainm commented Apr 18, 2017

@drroe: Because of this: https://travis-ci.org/Amber-MD/ambertools-ci
I let that repo watch Amber new commits (every hour), so it will takes CPUs from cpptraj (in the same github organization).

May be I will change to every 6 hours.

@hainm
Copy link
Contributor

hainm commented Apr 18, 2017

Done. only run nightly build for now since we just release AT.

@drroe drroe merged commit d30e061 into Amber-MD:master Apr 19, 2017
@drroe drroe deleted the hbond_improve_speed branch April 19, 2017 00:37
@drroe
Copy link
Contributor Author

drroe commented Apr 19, 2017

Cool, thanks for the info Hai. Everything is passed now so no worries.

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