Regarding to select all real molecules in the periodic box

I want to do some interaction analysis with trajectory file obtained from the simulation result. To do these kind of analysis attached perl script named as "InteractionEnergies.pl" is used.

In the model drug, polymer and clay molecules and particles are located together with water molecules.

It does not get analysis error in the models since the whole molecules have been selected except for water.

But I get errors when choosing the water with or without other molecules in the model. I get errors such as "overlap and non empty" while the display style default and for "original style" is "the index value 2 or 3 is out of range".

Later I noticed that while the display style is default, virtual waters can be included in the system. Because the number of real water molecules is 13197 in my model but is counted as 13198.

Could you please inform me about how to get rid of from this water which is not desirable and excessive.

It is hard to say anything without more concrete description and sample structure. What precisely is the error message and on which line? Often it is a matter of deleting all the sets and redefining them, probably with the lattice style = Default.