while loop simulation

Hi there,

I've been trying to simulate a while loop using a PP protocol (not a while loop in pilot script). Here is an example of what I mean:
1) Read a datafile and do a similarity searching
2) Take the most similar compound
3) While the pIC50 of this compound is lower than a threshold then run the similarity search again using this compound as reference.
4) If pIC50>threshold then exit the loop and stop

Any ideas?

Thank you,

George