How to remove an atom coordinates in LAMMPS? Troubleshooting the vacancies created. The initial coordinates of the VMD S I got. Is this a software flaw was created? How to?
The Lammps command to remove an atom is called delete_atoms:
http://lammps.sandia.gov/doc/delete_atoms.html
You need to call this command either for a group or a region. If you know the ID of the atom (maybe, you can find it out using the inspect tool in vmd) you can define a group containing only this atom. Otherwise you have to define a region encompassing your atom and be careful not to remove any additional atoms.
Simplest thing, If you know that which atom has to be deleted , open your input file and delete those coordinates directly (i am assuming you don't have molecule).
You can also do this using vmd by making appropriate selection and then writing a lammps input file using that selection.
The Lammps command to remove an atom is called delete_atoms:
http://lammps.sandia.gov/doc/delete_atoms.html
You need to call this command either for a group or a region. If you know the ID of the atom (maybe, you can find it out using the inspect tool in vmd) you can define a group containing only this atom. Otherwise you have to define a region encompassing your atom and be careful not to remove any additional atoms.
Hi Amin, even its long time ago question but I just accidentally stopped by it, let me share some tips to do that as someone may find it useful in the future:
1- if you know your atom coordination and you have already the data file, you just simply delete it from the data file to be used with lammps
2- If you use lammps to generate the data file internally you could use these commands :
a- after generation of the data file by lammps, print it out and check it. Assume your atom of interest has the ID 2 and its coordination as (0.5a 0.5a 0.5a), as lammps command define :
group SIA id 2 # define a group
delete_atoms group SIA compress yes # delete atoms belong to SIA group
b- you could also delete atoms belong to a specific region, for example, this command will delete atoms located at 0,0,0 point for a spherical region of radius r:
variable r equal sqrt(${a}^2+${a}^2)/4
# variable defined as (r = radius , a= lattice constant of the element)
region select sphere 0 0 0 ${r} units box
delete_atoms region select compress yes
#region defined_all atoms within this region will be removed