Gmx select for dispersed system

GROMACS version: 2022
GROMACS modification: No

Dear gmx-ers:

I have a system consisting of water as well as a number of lipid molecules, which are initially randomly dispersed in the solvent. As the simulation progresses, I want to use gmx select to select those molecules that have either i) started to aggregate or ii) still are in a dispered state.

I tried the following syntax with gmx select, but somehow I always end up with a selection that encompasses both kinds of molecules

gmx select -f traj.gro -s traj.gro -select “resname POPC and within 0.5 of resname POPC”

I have tried to vary the cutoff, and also visually confirmed with pymol that there are indeed individual POPC molecules that are not within a 0.5 nm distance from any other POPC molecule. What am i missing in the syntax?

Kind regards
/PK