Clay-organic-water H-bonding

Hi,
I'm a relatively new MS user working in a montmorillonite periodic structure with organic molecules and water sorbed in the interlayer space. Following a dynamics equilibration of 10 ns I want to analyse the H-bonds between the different species, e.g. water-water, water-organic, water-clay, etc.
Is there anyone out there who can help me do this? I've been going through some of the available scripts but can't access one that seems the most relevant (404).

I also looked at this https://r1132100503382-eu1-3dswym.3dexperience.3ds.com/#community:PicGX_96TjmPwe9tdYLC4w/iquestion:O_0ftFMoQ6KItJ6Qb18GYA

 

This works, but unfortunately just gives me a total number of H-bonds and I don't really know how to modify the script to make it more selective.

Cheers!