LAMMPS WWW Site - LAMMPS Documentation - LAMMPS Commands

### delete_atoms command

Syntax:

    delete_atoms style args

- style = group or region or overlap

        group args = group-ID
        region args = region-ID
        overlap args = distance type1 type2
          distance = delete atoms with neighbors within this cutoff (distance units)
          type1 = type of first atom in pair (optional)
          type2 = type of other atom in pair (optional)

Examples:

    delete_atoms group edge
    delete_atoms region sphere
    delete_atoms overlap 0.3
    delete_atoms overlap 0.3 1 1

Description:

Delete the specified atoms. This command can be used to carve out voids from a block of material or to delete created atoms that are too close to each other (e.g. at a grain boundary).

For style group, all atoms belonging to the group are deleted.

For style region, all atoms in the region volume are deleted.

For style overlap, pairs of atoms within the specified cutoff distance are searched for, and one of the 2 atoms is deleted. If no atom types are specified, an atom will always be deleted if the cutoff criterion is met. If a single atom type is specified, then one or both of the atoms in the pair must be of the specified type for a deletion to occur. If two atom types are specified, the two atoms in the pair must be of the specified types for a deletion to occur. For a given configuration of atoms, the only guarantee is that at the end of the deletion operation, enough deletions will have occurred that no atom pairs within the cutoff (and with the specified types) will remain. There is no guarantee that the minimum number of atoms will be deleted, or that the same atoms will be deleted when running on different numbers of processors.

After atoms are deleted, if the system is not molecular (no bonds), then atom IDs are re-assigned so that they run from 1 to the number of atoms in the system. This is not done for molecular systems, since it would foul up the bond connectivity that has already been assigned.

Restrictions:

The overlap style requires inter-processor communication to acquire ghost atoms and setup a neighbor list. This means that your system must be ready to perform a simulation before using this command (force fields setup, atom masses set, etc).

If the special_bonds command is used with a setting of 0, then a pair of bonded atoms (1-2, 1-3, or 1-4) will not appear in the neighbor list, and thus will not be considered for deletion by the overlap style. You probably don't want to be deleting one atom in a bonded pair anyway.

Related commands:

create_atoms

Default: none