index mistakes in the output file of gmx hbond -hbn
I find mistakes in the output file of gmx hbond -hbn when I run a simulation where I want to know the hydrogen bonds between 2 kinds of moleculars, H2O and glycerol.
The command I use to analyze the hydrogen bonds is:
echo 0 1 | gmx hbond -f frame10.gro -s md_1.tpr -n traj0.ndx -a 20 -r 0.31 -hbn wg0.ndx
Here is part of the index content of [ hbonds_water_glycerol ] in wg0.ndx:
- 44533 44534 25652
- 44533 44534 29978
By comparing the indexes and the ones in the frame10.gro file, it is easy to know that the order of the indexes above corresponds the order of donor-Hydrogen atom-acceptor. Firstly, although it may occurs that the same donor-Hydrogen atom forms 2 different hydrogen bonds with 2 acceptors (sometimes 3 in the file) due to the geometric criterion, I find too many of them. Secondly by calculating the angles of Hydrogen atom-donor-acceptor which demand <20°, I find the second line above should be: 44533 44535 29978(see the figure attached).
I use gromacs2018.4 to run the md and analyze the H-bonds, and similar issues can be found using gromacs5.0.7. The relevant files and the figure showing the angles I calculate manually are attached. Angles frame10.gro md_1.tpr traj0.ndx wg0.ndx