Thanks for helping me.
COR2 is a graphene molecule and flat.
Before the selection, I issue the command coor orient select resname COR2 end which ensures that it is in the xy-plane. It has a large radius so that a large .around. value allows molecules
interacting with it to be selected. Also, using prop Z is a way to select molecules above the xy-plane of the graphene.
The box size is x by y by z is 50 x 50 x 115 and has a complicated mix of molecules
How about this after the above selection:
calc ntest = ?nsel / 4
Now I have the number of molecules.
Can I somehow use .subset. to get the molecules I want? I am not sure.
I will try the following
set newnearby select nearby .subset 1:@ntest end