You'll need to create an index of triplets (Hydrogen-Donor-Acceptor) for all the catalytic residues and the ligand. Then you can use gmx hbond which which will use the angle and distance to compute the number of hydrogen bonds.
MDTraj also has several different ways of computing hydrogen bonds. For that you'd use the MDTraj Python module to load the trajectory. You'd also have to create an index of the catalytic residues and ligand, but I find indexing in MDTraj more intuitive.