Beruflich Dokumente
Kultur Dokumente
article
info
Article history:
Received 10 June 2015
Received in revised form
17 July 2015
Accepted 24 July 2015
Available online xxxx
Keywords:
Atomistic simulations
File conversion
Dislocation
Polycrystal
Nye tensor
abstract
We present a libre, Open Source command-line program named Atomsk, that aims at creating and
manipulating atomic systems for the purposes of ab initio calculations, classical atomistic calculations, and
visualization, in the areas of computational physics and chemistry. The program can run on GNU/Linux,
Apple Mac OS X, and Microsoft Windows platforms. Many file formats are supported, allowing for easy
conversion of atomic configuration files. The command-line options allow to construct supercells, insert
point defects (vacancies, interstitials), line defects (dislocations, cracks), plane defects (stacking faults), as
well as other transformations. Several options can be applied consecutively, allowing for a comprehensive
workflow from a unit cell to the final atomic system. Some modes allow to construct complex structures,
or to perform specific analysis of atomic systems.
Program summary
Program title: Atomsk
Catalogue identifier: AEXM_v1_0
Program summary URL: http://cpc.cs.qub.ac.uk/summaries/AEXM_v1_0.html
Program obtainable from: CPC Program Library, Queens University, Belfast, N. Ireland
Licensing provisions: GNU/GPL version 3 or any later version
No. of lines in distributed program, including test data, etc.: 61,450
No. of bytes in distributed program, including test data, etc.: 539,898
Distribution format: tar.gz
Programming language: Fortran 90.
Computer: All computers with a Fortran compiler supporting at least Fortran 90.
Operating system: All operating systems with such a compiler. Some of the Makefiles and scripts depend
on a Unix-like system and need modification under Windows.
RAM: Typically 32 bytes N, where N is the number of particles.
Classification: 4.14, 7.1.
External routines: LAPACK
Nature of problem: Atomistic simulations require the generation of atomic data files. Few software are
available to construct atomic systems containing dislocations, especially in anisotropic media.
Solution method: Atomsk is a unified program that allows to generate, convert and transform atomic
systems for the purposes of ab initio calculations, classical atomistic simulations, or visualization. It
supports many lattice types, all atom chemical species, and supports systems described with the ionic
coreshell model. It allows to construct dislocations and analyze them, and perform post-treatment of
simulation output files.
Restrictions: no support for molecular bonds; limit of 2 billions particles.
Unusual features: dislocations in anisotropic media; computation of the Nye tensor; generation of polycrystal from any type of lattice; support for ionic coreshell models and analysis of electric polarization.
This paper and its associated computer program are available via the Computer Physics Communication homepage on ScienceDirect (http://www.sciencedirect.com/
science/journal/00104655).
E-mail address: pierre.hirel@univ-lille1.fr.
http://dx.doi.org/10.1016/j.cpc.2015.07.012
0010-4655/ 2015 Elsevier B.V. All rights reserved.
Additional comments: the program and its documentation are available at: http://atomsk.univ-lille1.fr
Running time: spans from a fraction of a second to several minutes depending on the number of particles
in the atomic system, the mode, and the machine performance.
2015 Elsevier B.V. All rights reserved.
Introduction
A mandatory aspect of atomic-scale numerical simulations is
the generation of atomic data file(s) that are necessary to any
simulation or visualization software. This step usually requires
to perform some generic operations like generating a unit cell, a
supercell, applying a translation or rotation, wrapping atoms in the
simulation box, inserting defects, or writing a file with a specific
format for the target simulation package. Often scientists develop
their own scripts to perform these tasks, and for reasons of time
limitations such scripts are designed only for the specific needs of
the developer, i.e. for a specific type of system, and for a specific
simulation software. As a result such scripts are not transferable,
and any change in the type of lattice, system geometry, or
simulation or visualization software, requires to re-write large
portions of code, with the risks it implies: copy-pasting of existing
code, the introduction of new bugs, and the waste of time solving
problems that were already solved by others several times and in a
more efficient way. This situation has motivated the development
of various programs to generate or visualize atomic data files, like
ASE [1], Aten [2], Open Babel [3], the LAMMPS Pizza.py toolkit,
however none of these codes provide together the conversion of
atomic data files for simulation softwares at different scales as well
as for visualization softwares, the introduction of dislocations and
their analysis, and the support for ionic coreshell models.
The purpose of Atomsk is to provide a unified and Open Source
command-line tool to manipulate atomic systems, and produce
atomic data files for the purposes of ab inito calculations, classical
atomistic simulations, and visualization, with the focus on materials physics and extended defects. The implementation is meant
to be as general as possible, for any types of lattice or chemical
compositions. Atomsk can work seemlessly with metallic, covalent
or ionic systems. Although this program may not eliminate all necessities to develop scripts for specific applications, Atomsk can
be useful to perform the most simple and routine tasks, as well
as construct complex structures like dislocations in isotropic or
anisotropic media, the design of polycrystals, or the study of ferroelectric materials.
1. Implementation
Atomsk stands for Atom, Molecule, Material Software Kit. The
source code is written in Fortran 90, and developed under the GNU
General Public License version 3 or any later version [4]. The code
was written with two principles in mind. First, the tasks that are
simple (e.g. converting a file, generating a supercell. . . ) should also
be simple to perform with the program, and should not involve
complicated command-line parameters. Second, the commandline parameters should be explicit and easy to understand, with
little or no pre-requisite. For instance, even with no or little
knowledge of Atomsk a user who is familiar with atomistic
simulations should understand what the following commandline will do (the antislash symbol marks the continuation of the
command-line and is not part of the actual command):
.pw
.xv
POSCAR
.gin
CONFIG
.imd
.lmp
.mol
.xmd
Visualization software
Atomeye [15]
ddplot
xCrySDen [16]
XYZ (general purpose format)
.cfg
.dd
.xsf
.xyz
.cif
.pdb
elastic Voigt
243.30 243.30 243.30
145.00 145.00 145.00
116.10 116.10 116.10
orientation
[121]
[ -101]
[1 -11]
Defining the elastic tensor of the material is useful for some
options, in particular the construction of dislocations in anisotropic
medium.
3.2. Constructing dislocations
The option -dislocation allows to insert a linear lattice
defect called a dislocation. A dislocation is characterized by its
displacement field, which is defined by the elastic properties of the
material and the Burgers vector b of the dislocation [17]. Because of
this complexity, this option requires many parameters, for instance
for a screw dislocation of Burgers vector bz = 3.8 lying along Z
in the middle of the cell the syntax would be:
Fig. 1. Workflow of the default operating mode of Atomsk. The data from an input
file is read and stored into the memory. Options can transform the data directly
into memory. The final data can be saved to an output file, or to several files with
different formats, on the disk.
uy =
b
2
arctan
y
x
xy
2(1 ) x2 + y2
b
x2 + y2
x2 y2
(1 2) ln
+
.
2
4(1 )
4(1 )(x2 + y2 )
(1)
b
2
arctan
y
x
(2)
2 uk
= 0,
x x
i = 1, 3
(3)
(4)
Fig. 2. A 1/2[111] screw dislocation in bcc iron. The atom displacements and theoretical stresses were computed by Atomsk according to the theory of anisotropic elasticity.
Atoms are colored according to the value of the theoretical stress tensor component: (a) xx ; (b) yy ; (c) zz ; (d) xy ; (e) xz ; (f) yz . The dislocation line and the Burgers
vector are normal to the plane of the figure. The visualization is performed with Atomeye [15]. (For interpretation of the references to color in this figure legend, the reader
is referred to the web version of this article.)
Fig. 3. Some examples of lattices that can be generated with Atomsk, as visualized with VESTA [19]. The unit cells appear as thick black lines. (a) Simple cubic. (b) Bodycentered cubic. (c) Face-centered cubic lattice. (d) The L12 structure of Ni3 Al. (e) The carbon diamond lattice. (f) The rocksalt lattice of NaCl, MgO, or LiF. (g) The cubic
perovskite lattice of SrTiO3 . TiO6 octahedra are shown in transparent blue. (h) The hexagonal close-packed lattice. (i) The carbon graphite lattice. (j) A (10,0) carbon nanotube.
(For interpretation of the references to color in this figure legend, the reader is referred to the web version of this article.)
4. Modes
Ak = 0.
(5)
A mode alters the default work flow of Atomsk (Fig. 1). A mode
can either construct an atomic system (like the modes --create,
--merge and --polycrystal described below), or perform a
particular analysis on one or several input files (like the modes
--nye and --edm described below).
Ak (n)D(n) = bk ,
k = 1, 3.
(6)
4.1. Create
n=1
3
1
Ak (n)D(n) ln (x + py) ,
uk =
2 i n=1
k = 1, 3.
(7)
3
1
Bijk Ak (n)D(n)
ij =
.
2 i n=1
x + py
(8)
Fig. 4. Examples of systems constructed with the mode --merge. (a) An atomic system of bcc iron, in which a sphere was carved, and a sphere of fcc copper, are merged
together in the same box to produce an inclusion of Cu in the iron matrix. (b) Configurations containing a dislocation at various positions can be aligned along the direction
of the dislocation line and merged to produce a pair of kinks, or a curved dislocation.
4.2. Merge
The mode --merge allows to merge two or more atomic
systems into one. The different systems can share the same box,
or be placed side by side along a Cartesian axis. With this mode
several atomic systems can be combined to generate complex
structures like homo- or heterophase interfaces, grain boundaries,
inclusions, or curved dislocation lines, as illustrated in Fig. 4.
Note that after the merging process, some atoms may overlap.
This can be corrected for by calling the option -remove-doubles
in conjunction with this mode.
4.3. Polycrystal
The mode --polycrystal allows to generate a polycrystalline
system, using the Voronoi tessellation method [20,21]. In this
method, seeds of a material are placed inside a simulation box, and
each seed is expanded so as to fill its Voronoi polyhedron.
The initial seed is usually a unit cell of a material (e.g. a fcc or bcc
metal), but Atomsk can work with any atomic system, including
a supercell, a large system containing defects, a polycrystal, a
molecule, or any arbitrary atomic system. The seed may have
smaller or larger dimensions than the final supercell. In addition,
the user must provide a text file containing information about the
polycrystal to generate. The syntax for this mode is:
its orientation will be set according to the given angles (the seed
will be rotated by 56 around X , then 83 around Y , and then 45
around Z ); and so on. The two last grains will have random crystal
orientations.
After generation of the polycrystal, the index of the grain each
atom belongs to is saved as an auxiliary property. This allows for an
easy visualization of the grain structure, even with complex lattice
types, as illustrated in Fig. 5.
(9)
jk = imk Tijm
(10)
where Tijm = m Gij is the tensor of derivatives of the local
deformation.
Atomsk saves the nine components of the Nye tensor as auxiliary properties for each atom, which can be visualized e.g. with
Atomeye [15]. Fig. 6 shows two examples of visualization of the
Nye tensor in systems containing dislocations.
Note that this mode requires a reference system with exactly
the same number of atoms as the system studied. As a consequence
it cannot be used with edge dislocations if atoms were inserted or
removed from the system. A workaround is currently being worked
on to lift this limitation.
Fig. 5. Some examples of polycrystalline systems built with Atomsk, and visualized
with Atomeye [15] using the Von Mises criterion (left) and the grain ID (right). (a)
A 2-D polycrystal of fcc aluminum. The crystal orientation normal to the plane of
the figure is the same for all grains. (b) A 3-D polycrystal of bcc iron. All grains
have random orientations in the three directions of space. (c) A 3-D polycrystal of
SrTiO3 perovskite. In the latter, the Von Mises criterion does not allow to distinguish
individual grains as clearly as in fcc and bcc structures, but the grain ID does.
p(rcm ) =
qi (ri rcm )
(11)
i=1
Fig. 6. Visualization of the Nye tensor computed by Atomsk. (a) The component 33 of the Nye tensor in a supercell of bcc iron containing a quadrupole of 1/2[111]
screw dislocations. Positive values are in red, negative ones in blue. (b) The component 33 of the Nye tensor in a 1/2110 screw dislocation in magnesium oxide, as
described in [23]. (c) The component 23 of the Nye tensor for the same dislocation as (b). This component arises from the expansion of the lattice due to the dislocation.
(For interpretation of the references to color in this figure legend, the reader is referred to the web version of this article.)
Fig. 7. An atomic description of a ferroelectric domain wall in BaTiO3 perovskite. (a) Visualization of the atom positions with VESTA [19]. Ba ions are displayed as large
green spheres, Ti ions as medium blue spheres, and oxygen ions as small red spheres. TiO bonds are drawn to emphasize the fact that Ti ions are shifted downwards (on
the left-hand side) or upwards (on the right-hand side) with respect to their oxygen neighbors. Determining the value of the polarization and the position of the domain
wall with the naked eye is challenging. (b) The same atomic system, where Ba and Ti ions are colored according to the magnitude of the component py of their polarization
vector, as computed with Atomsk (Eq. (11)). Shades of blue indicate negative values, shades of red positive ones. The ferroelectric domains and the domain wall are more
clearly visible. (For interpretation of the references to color in this figure legend, the reader is referred to the web version of this article.)
where rcm is the position of the center of mass of the cation and its
surrounding anions. The electric charges qi of the ions can be read
from some input files, or defined with the option -properties.
Note that when the sum of the charges is non-zero the definition of
the polarization vector is ambiguous, therefore the center of mass
of the ions is taken as the reference.
The computation of the polarization can be useful when modeling ferroelectric materials, since it allows to visualize the ferroelectric domains and the polarization vectors of individual cells as
illustrated in Fig. 7. The method is quite robust and works in static
as well as dynamic simulations, which allows e.g. to visualize domain walls moving under an applied electric field, nucleation of
new domains, and so on.
5. Further capabilities
References
Fig. 8. Dependency tree of Atomsk. Each box represents a separate folder in the
source code.
to design new modes, new options, or the support for new file
formats, taking full advantage of the existing routines.
The code is meant to be architecture-independent so that it
can be compiled and run on 32-bits and 64-bits variants of the
GNU/Linux, Apple Mac OS X, and Microsoft Windows platforms.
Static binary versions for GNU/Linux and Windows platforms can
be downloaded, and run out-of-the-box without further requirements. The source code is distributed under the GNU General Public License version 3 or any later version [4]. It can be downloaded,
edited, studied, or distributed by the user, within the limits permitted by the license.
Finally, the full documentation in html format is provided
with the program, and is also available online (http://atomsk.univlille1.fr/). It provides a thorough and updated description of each
mode, option and parameter, illustrated with some meaningful
examples.
Summary
Atomsk is a versatile command-line program designed for the
manipulation and conversion of atomic data files. Its user-friendly
interface allows to navigate easily between the file formats of
common simulation packages and visualization softwares. The
combination of options allows to construct atomic systems with
a comprehensive workflow, from the unitcell up to complex,
million-atoms systems. Atomsk runs on local computers as well as
on remote clusters to produce the initial input files or convert data
files produced by a simulation. The many file formats supported
and the many transformations that are implemented make it a
good companion for the material physicist or chemist.
Acknowledgments
I would like to acknowledge Dr. Matous Mrovec, FraunhoferInstitute fr Werkstoffmechanik, Freiburg, Germany, for his great
help in the implementation of the resolution of equations for
inserting dislocations in an anisotropic medium. I also greatly
acknowledge Professor Philippe Carrez, University of Lille, France,
for implementing the calculation of the Nye tensor. I also thank
various researchers around the world for reporting bugs and
suggesting features, which have lead to significant improvements
in the accuracy and robustness of the code.