How to insert systematically an specific number of molecules of solvent in periodic box with solute?

GROMACS version: 2020.01
GROMACS modification: Yes/No
Dear Gromacs users,

I wish to insert an specific number of water molecules in a pbc box with the solute centered in the box. Is there any systematic way of doing this? I have used solvate with the -maxsol keyword to specify the number of water molecules. My concern is that my default pbc box can accommodate to a maximum of 800 water molecules, so if I insert less water molecules, would it be a problem with this?
Another way to ask this question is: how can I create a pbc box with a solute centered and add an specific number of molecules solvent systematically?

Kind regards,

Lazaro

gmx insert molecule -nmol please check if this can help

Yes, either your box will compress (when a barostat is applied under an NPT ensemble), or you will develop voids (bubbles) in the simulation box if you are simulating under an NVT ensemble, which will then lead to surface-tension effects around those voids.

Thank you Dr. Jalemkul for your answer.
How could I do this avoiding the previous mentioned problems?
Kind regards,
Lazaro

You can’t. Those are the two inevitable outcomes under those two ensembles. The question is, why do you need to restrict the number of waters in your unit cell to some value that does not completely fill the volume?

I had to run multiple simulations and was thinking that reducing the system size to safe time

This is not the way to do that. The best way to save on computational time is to use a non-cubic box for your solute, e.g. rhombic dodecahedron or truncated octahedron. You’ll save something like 23% of the volume for the same periodic distance. If you just use fewer waters, you’ll have problems like I mentioned, and if you’re running NPT simulations, the box will compress down some and you may violate the minimum image convention, rendering your “fast” simulations very wrong.

Oh I see. Thank you very much for the advice. I will try that. Thanks again for your help