How to keep a certain molecule types in specific region?

Hi All,

I am modelling water evaporation from a polymer/water system. the surface here is platinum. I have defined a region on top of the box called the evaporation region. When the water molecules reach here they will be deleted. However, sometimes the polymer molecules also coming to the Evaporation region. They will not be deleted, but the dynamic of the system shouldn’t be like this. It seems that the polymer molecules are in the gas phase. It there any way to keep polymers in the solvent box in lammps? Can I use fix constraint between Pt atoms and polymer atoms?

Thanks,
Atefeh