Gmx hbond doesn't work?

GROMACS version: 2024
GROMACS modification: No

Hi everyone,

I have systems containing polyol molecules and water. Whenever I try to use gmx hbond, it doesn’t work. It does, however, work if I do gmx hbond-legacy. I just wanted to understand why legacy does the job and the newest version doesn’t.

The errors I get are like:

  1. When I try to compute the number of HBs with gmx hbond -f file.xtc -s file.tpr -num hbnum.xvg
    Inconsistency in user input:
    Selection ‘B00’ has no donors AND has no acceptors! Nothing to be done.

  2. When I try to compute angle distribution with gmx hbond -f file.xtc -s file.tpr -ang ang.xvg
    Can’t combine merging hbonds and writing angle distribution
    In this case I used gmx hbond-legacy with -merge no and it worked.

Do you have any idea why gmx hbond doesn’t work?
Thanks!

The old hbond tool (now gmx hbond-legacy) was broken in several ways and difficult to maintain in the long run. The new gmx hbond is better in many ways (that may not be directly noticeable for the user), but does not have exactly the same set of features. That is the reason why the old gmx hbond-legacy tool is still there.

At least some of the features that you request are being implemented, see gmx hbond: add extra features (!4361) · Merge requests · GROMACS / GROMACS · GitLab. Hopefully they will work in GROMACS 2025. Feel free to use gmx hbond-legacy for everything you cannot do in the newer version.

Thank you for your answer. I understand the new version is better, but why can’t I use it properly? Also, I don’t think it is possible to compute autocorrelation functions with the new version.

As I said, some features are not implemented (yet?). Autocorrelations have been discussed but is not yet added. Please, open an issue on Issues · GROMACS / GROMACS · GitLab describing what features you would need. It is good to know what options are useful.