def close_contacts(x, y, cutoff, x_column = 'coords', y_column = 'coords'):
    if len(x[x_column]) > 0 and len(x[x_column]) > 0:
        d = distance(x[x_column], y[y_column])
        index = np.argwhere((d > 0) & (d <= cutoff))
        return x[index[:,0]], y[index[:,1]]
    else:
        return x[[]], y[[]]
Returns pairs of atoms which are within close contac distance cutoff.
dataset/ETHPy150Open oddt/oddt/oddt/interactions.py/close_contacts