How to define number of bounded water near N+ in Gromacs?

Hi,

I’d like to calculate number of bounded water(Non free water) near N+ group in my Polymer/Water system. Is there any way to calculate average number of water within a specific distance from N+ as a function of time? And, how can I define distance to consider just bounded water?

Thanks a lot

I doubt there is any, but you can try following Algo (pseudo-code)

rcut = first-solvation-shell

bound_na = [] 
times = [] 
for frame in trajectories: 

    n_bounds =0 
    for Na_IDs in All_Nas: 
        for OW_IDs in All_Waters: 
            dr = r_Na - r_OW
            applyPBC(dr,boxLen) 
            if dr**2 < rcut**2:
                n_bounds+=1 
   
    bound_na.append(n_bounds)
    times.append(frame.time) 

gmx select can do this and output the size of the selected group with -os. You just need to define a group of water O atoms that fall within a given radius of your desired atom(s).