Create a cavity

GROMACS version: 2020.6 released March 4th, 2021
GROMACS modification: No

Dear Gromacs Users,
I am a new user of Gromacs. I have system with around 100k atom which includes martini CG 20 protein chains, nonpolar Martini water and charged particles. The cubic box size is 400 x 400 x 400 Angstrom. I want to delete specific atoms from a sphere inside the box. Suppose the center of the box is 0,0,0. I want to delete only Martini water withing 5nm radius around that center (0,0,0). Is there any MDP options to do that?

This is not a process performed by mdrun, so it is not handled within .mdp settings. You can specify geometric criteria for selections with gmx select, to encompass the region of space you wish to eliminate. You would create an index group with gmx select for everything within that region and then take the complement of that to get the atoms you want to keep. Then pass that index group to gmx trjconv to save the subset of the system you want to retain.

@jalemkul, Thank you so much. How can I take a complement to my selection and make an index out of it? I have got the index of selected atoms from the following command:
gmx select -f step3_charmm2gmx.gro -s step3_charmm2gmx.gro -n index.ndx -on out.ndx -ofpdb out.pdb -select ‘group 13 and within 5 of [0,0,0]’

The Out index file contains the index of selected atoms.

Thank you!

Hi @jalemkul I have already solved the problem. Thank you so much for your help.