The probability of hydrogen bond formation and hydrogen bond angle

Hi, I understand the probability of hydrogen bond formation is defined as ([Linse, 1987][Liu et al., 2005]).
060e22243c3e5d3603abd5a6aeffd827
where NHB is the average number of hydrogen bond at a local aqueous phase region, and NC represents the coordinate water molecules number around single water molecules in that region. I want to know how to calculate NHB and NC.

Secondly ,When I did the hydrogen bond angle distribution, I found that there was very little difference between the results. I want to know how to divide the region and then calculate the angular distribution within the region. Thank you.

gmx hbond allows using geometric definition of hydrogen bonds to define them throughout the structure.
More information: https://manual.gromacs.org/current/onlinehelp/gmx-hbond.html

I’m sorry, I don’t think I understand you. You Didn’t answer my question. I have browsed the pages you provide many times before. But in GMX HBOND I don’t see how to divide the region and calculate the hydrogen bond angle, or how to calculate NHB and NC