![]() It is also possible to select a range of indices by using a semicolon:Ītomsk NaCl_supercell.xsf -select 210,417,600:670,18,90 -remove-atoms select final.cfg Again, understand that the option "-select" only selects atoms, and then the option "-remove-atoms select" removes all atoms that are selected, no matter if they are Na or Cl atoms. This can be practical when one wants to select several atoms at a time. Contrary to the option "-remove-atoms" that accepts only one index, the option "-select" can be used to select several atoms, by giving their index separated by a comma (and with no white space):Ītomsk NaCl_supercell.xsf -select 210,417,618 -remove-atoms select final.cfg ![]() The option "-select" can be used to select atoms according to their index. However it becomes useful when the selection is a bit more complicated. Of course, so far this has little interest since it has the same effect as just using "-remove-atoms Cl". The latter option can also be used to remove the selected atoms, by using "select" instead of an atom symbol:Ītomsk NaCl_supercell.xsf -select Cl -remove-atoms select final.cfg For instance, if you use "-select Cl" and then use the option "-remove-atoms Cl", then only the selected Cl atoms are deleted:Ītomsk NaCl_supercell.xsf -select Cl -remove-atoms Cl final.cfg Instead of applying to all atoms, options will apply only to the selected atoms. ![]() The selection however, modifies the behavior of options within Atomsk. So, when comes the time to write the final file "final.cfg", Atomsk writes all atom positions in the file, no matter if they are selected or not. ![]() In this command, Cl atoms were selected, but nothing was done to them -they were not removed nor anything. Now, understand that this "selection" is internal to Atomsk, and does not actually do anything to the system. For instance, to select all Cl atoms:Ītomsk NaCl_supercell.xsf -select Cl final.cfg Let us review the various possibilities.įirst, you may use the option "-select" to select all atoms that belong to the same species. The option "-select" allows to select atoms according to various criteria in a flexible way. If you wish to remove 20 or 300 atoms in the system, you may find it impractical to use the option "-remove-atoms" that many times. Of course, when the purpose is to create several vacancies, the usage of the option "-remove-atoms" can become very tedious. So, after that when Atomsk removes the atom number 417, it actually removes the atom that formerly had the index number 418, which is not what you wanted. As a result, all atoms of higher index will have an index that is different from the original system: atom number 211 becomes number 210, 212 becomes 211, and so on. Why is that? Atomsk will start by removing the atom number 210. However the following will not remove the correct atom:Ītomsk NaCl_supercell.xsf -remove-atoms 210 -remove-atoms 417 final.cfg For instance if you wish to remove atoms numbers 210 and 417, the following will achieve what you want:Ītomsk NaCl_supercell.xsf -remove-atoms 417 -remove-atoms 210 final.cfg Always remove the atom with the highest index first. So, if you wish to remove two atoms, the ordering of the options is important. if there are only 400 atoms in the system and you ask to remove number 417), then a warning will be displayed and no atom will be removed.Īn important thing to note: as always, Atomsk applies options sequencially, in the order in which they appear. Note that is the given number is out of bounds (e.g. When visualizing the coordination within Atomeye (press K), the neighbors of the vacancy have a different color: For instance, to remove the atom number 417 from the system:Ītomsk NaCl_supercell.xsf -remove-atoms 417 final.cfg This can be used to introduce a vacancy in the system. Second, it can be used to remove a single atom, corresponding to the given index. For instance, if you wish to remove all Cl ions from the system:Ītomsk NaCl_supercell.xsf -remove-atoms Cl final.cfg First, it can be used to remove all atoms belonging to a given species. The option "-remove-atoms", as its name indicates, allows to remove atoms from the system. ▶ For more information, refer to the corresponding documentation page.įor the sake of the exercise, let us create a supercell of rocksalt NaCl:Ītomsk -create rocksalt 5.64 Na Cl -duplicate 10 10 10 NaCl_supercell.xsf 1. This tutorial explains how to remove atoms based on various criteria.
0 Comments
Leave a Reply. |