Something like this snippet should do what you are asking about (but I am not sure that your criterion for lipids being under the protein is optimal):

label loop
traj read
coor stat sele segid prot end
define lipunder sele segi lipi .and. point ?XAVE ?YAVE ?ZAVE CUT 15 end
goto loop

Lennart Nilsson
Karolinska Institutet
Stockholm, Sweden