Calculating minimum distance between two groups of atoms during MD run

Is there a way to calculate the minimum distance between two groups of atoms ?

No.

Thanks for the reply