H-bond calculation

Please define different groups in your index file (*.ndx) and make sure you’re using the latest GROMACS version, 2023.2. Here is a discussion that might be helpful to you: