Delete fraction of a group of water molecules in LAMMPS

Hello everyone,

I am using LAMMPS 22nd August, 2018 version.

I have built a system which consists of solid and liquid part in the unit cell using MOLTEMPLATE and LAMMPS. The liquid part has two types of water, (1) 8 water molecules have occupancy of 1, and (2) 12 water molecules have occupancy of 0.5, i.e., these water molecules will be present in 50% of the sites in the supercell. So, I built the system in MOLTEMPLATE designating two different water systems, and then replicated it to build a supercell of 1984 atoms.

Now, I want to delete 50% of the water molecules of the (2) category. In LAMMPS, I am able to delete using delete_atoms command which has group or porosity option. If I use the command, delete_atoms group water bond yes mol yes, then it deletes the whole water molecules of (2) category. I want to delete a fraction of the group. I can delete a fraction of a group by set type/fraction command for atoms, but cannot use that for water molecules.

Is there any way I can delete fraction of the water molecules I am referring to?

Best regards,
Baig Abdullah Al-Muhit
Department of Civil Engineering

PhD student/Graduate Research Assistant
Vanderbilt University, Nashville, TN, USA

Not following exactly, but the group you give to delete_atoms
can be defined by you. You can create a group with less than
all the molecules if you wish. See the group command for
various options, including “variable” which would allow
you to define a variable that selected some random fraction
of molecules.