Sie sind auf Seite 1von 8

Computer Physics Communications (

Contents lists available at ScienceDirect

Computer Physics Communications


journal homepage: www.elsevier.com/locate/cpc

Atomsk: A tool for manipulating and converting atomic data files


Pierre Hirel
Unit Matriaux Et Transformations, Bt. C6, Univ. Lille 1, 59655 Villeneuve dAscq, France

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.

P. Hirel / Computer Physics Communications (

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):

atomsk unitcell .xsf -duplicate 2 2 6 \


final_cell .cfg

The default workflow of Atomsk is presented in Fig. 1. First an


initial input file, containing the data about an atomic system, is
read and loaded into the memory. In the example above it is the file
unitcell.xsf. Second the atomic system is modified by options,
like the option -duplicate above. Finally the atomic data is saved
into an output file to the disk (the file final_cell.cfg above).
Note that the formats of the input and output files are different,
and will be handled automatically by Atomsk.
The following section introduces the type of atomic data that is
supported by Atomsk, and how to use it as a simple file converter.
Section 3 introduces some options and shows how to manipulate
and transform atomic systems. Section 4 shows that the default
work flow can be altered if the program is run in a different mode.
2. Reading and converting files
One of the prominent features of Atomsk is the conversion of
atomic data files. Atomsk can read from and write into the file
formats used by the most popular software in materials sciences,
including ab initio calculation packages like Quantum Espresso,
SIESTA and VASP; classical force-field simulation software like
DL_POLY, LAMMPS, IMD, GULP; and visualization software like
Atomeye, VESTA, and xCrySDen (see Table 1). Converting a file is
very user-friendly, and only requires the name of the input file and
the target output file format(s). For instance to convert file.xsf
into Atomeye CFG format and to a LAMMPS data file the command
is:

atomsk file.xsf cfg lammps


When an atomic configuration file is read, atomic data is
dynamically stored into the main memory (RAM) (see Fig. 1).
The atomic data always includes the positions of atoms and their
chemical species (atomic number). If additional atomic data is
present, like atom velocities, forces, or other properties, they are
also read and loaded into the memory. If the system consists of an
ionic coreshell model, then the positions of shells are also stored.
When the final atomic data is written to an output file, only
the data supported by the target format is written. For instance
if the final data includes atom velocities, they will be written to
files in the Atomeye CFG or LAMMPS formats. However if the target
output format is XCrysDen XSF, then the atom velocities will not be
written into it because this format does not support it. As a result,
depending on the format of the output file, some atomic data may
be lost. It is up to the user to choose a format that is appropriate to
store the atomic data of relevance.
3. Options
An option in Atomsk applies a transformation to an atomic
system. Several options can be called in the same command-line,
and they will be applied to the atomic system sequentially, in their
order of appearance. Options apply to a system on-the-fly when
it is in memory, as illustrated in Fig. 1, before the final result is
written to an output file.
Many options are quite basic, for instance the option -duplicate allows to duplicate the atomic system in the three directions

P. Hirel / Computer Physics Communications (


Table 1
List of the atomic data file formats supported by Atomsk.
Software

File name or extension

Ab initio software packages


Quantum Espresso [5]
SIESTA [6]
VASP [79]

.pw
.xv
POSCAR

Classical force-field software packages


GULP [10]
DL_POLY [11]
IMD [12]
LAMMPS [13]
MOLDY [14]
XMD

.gin
CONFIG
.imd
.lmp
.mol
.xmd

Visualization software
Atomeye [15]
ddplot
xCrySDen [16]
XYZ (general purpose format)

.cfg
.dd
.xsf
.xyz

Other data types


Crystallographic Information File
Protein Data Bank

.cif
.pdb

of space; the option -mirror allows to apply a mirror plane; the


option -deform allows to deform the system, and so on. Such
options are self-explanatory and will not be thoroughly described
here. In the following section, some options of particular interest
are presented.
3.1. Defining material properties
A number of properties of the system modeled can be defined
thanks to the option -properties. Two types of properties are distinguished: those that have a value defined for each atom, referred
to as auxiliary properties, like the mass, the electric charge, the potential energy, the force, or the velocity of atoms; and the global
properties that apply to the system as a whole, like the box dimensions or the elastic tensor. This option takes only one parameter:
the name of the text file containing the properties. The text file
must contain keywords followed by appropriate values.
The elastic tensor of the material can be defined thanks to this
option, either by providing the complete 6 6 elastic tensor,
or by providing the six independent Voigt stress components. If
the system has a specific crystallographic orientation then it can
be given in that file, and Atomsk will immediately rotate the
elastic tensor accordingly. For instance the following file defines
the elastic tensor for iron (in Voigt notation), and then specifies
the orientation of the system modeled.

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:

-dislocation 0.5* BOX 0.5* BOX screw Z Y 3.8


0.33
where 0.5*BOX refers to the middle of the box, Y is the glide plane
of the dislocation, and 0.33 is the Poisson ratio of the material
(commonly noted ). Atomsk allows to construct a dislocation
aligned with any Cartesian axis.
In Atomsk, by default the atoms are displaced assuming
isotropic elasticity. If the dislocation lies along the cartesian Z
direction the atom displacements are, for an edge dislocation:
ux =

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)

And for a screw dislocation:


uz =

b
2

arctan

y
x

(2)

In addition to these displacements, the theory of elasticity is


also used to compute the stress field ij due to the dislocation.
Because of the symmetry of the stress tensor there exist only
nine independent components, which Atomsk saves as auxiliary
properties for each atom, and which can be visualized e.g. with
Atomeye. One must bear in mind that this is the stress field
predicted by the theory of elasticity and may not correspond to the
actual stress field.
A particular feature of Atomsk is to compute the displacement
field due to a dislocation in an anisotropic medium. In order to
do so, the elastic tensor of the material must be provided, with
the appropriate orientation, thanks to the option -properties
as explained earlier. After reading the elastic tensor Atomsk will
compute the solutions to the equations of anisotropic elasticity, as
described in [17]. In this case, the dislocation can be of edge, screw
or mixed character, and in the case of a mixed dislocation the three
components of the Burgers vector must be provided.
Knowing the full elastic tensor of the material cijkl , Hookes law
imposes that the displacements uk due to a dislocation of Burgers
vector bk are constrained by the set of three partial-differential
equations:
ci k

2 uk
= 0,
x x

i = 1, 3

(3)

which have solutions of the form:


uk = Ak f (x + py)

(4)

P. Hirel / Computer Physics Communications (

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

where Ak and p are constants that must satisfy the relation:


ci1k1 + (ci2k2 + ci2k1 )p + ci2k2 p

Ak = 0.

(5)

This set of linear equations is solved to obtain the parameters


Ak and p. Knowing the Ak , the components bk of the Burgers vector
must satisfy the following relation:

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

The solutions Ak (n), p and D(n) to these equations can be


injected in Eq. (4) to define the displacement field uk to apply to
atoms:

3
1
Ak (n)D(n) ln (x + py) ,
uk =
2 i n=1

k = 1, 3.

(7)

Atomsk applies this displacement to each atom in the system,


according to its position (x, y). The solutions to the previous
equations are also used to compute the theoretical stress tensor:

3
1
Bijk Ak (n)D(n)
ij =
.
2 i n=1
x + py

(8)

This stress tensor is saved as an auxiliary property for each


atom, and can also be visualized e.g. in Atomeye. As an example
Fig. 2 shows a 1/2[111] screw dislocation in bcc iron, constructed
with Atomsk using the anisotropic theory of elasticity. The stress
component zz has the six-arms shape characteristic of this
dislocation [18].

The mode --create allows to generate a number of common


lattice types, like face-centered cubic (fcc), body-centered cubic
(bcc), diamond or zincblende, L12 , rocksalt, perovskite, hexagonal
(hcp) lattices, as well as nanotubes (NT), as summarized in Fig. 3.
For each supported lattice type, any combination of atoms can be
specified. The syntax is intended to be as simple as possible. For
instance, to generate a unit cell of fcc aluminum of lattice constant
4.1 and export it in xCrySDen XSF format:

atomsk --create fcc 4.1 Al xsf


The lattices that are cubic (fcc, bcc, diamond, L12 , rocksalt,
perovskite) can be created with a specific crystallographic
orientation. The syntax is e.g.:

atomsk --create fcc 4.1 Al \


orient [110] [1 -10] [001] xsf
In Atomsk the choice was made to support only the most
common lattice types to preserve easiness of usage. For other
lattice types one has to rely on another code to generate the atom
positions.

P. Hirel / Computer Physics Communications (

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:

one can use the keyword random followed by the number of


grains to be constructed. In this case Atomsk will generate the
positions and crystal orientations of the grains randomly. The
<param_file> is then very simple:

box 200 200 200


random 12
As a second possibility, the user can also specify the positions
and/or the crystal orientations of the grains. Each grain must be
defined with the keyword node followed by the position (x, y, z ),
and the crystal orientation of the grain. The crystal orientation can
be specified using one of three conventions: first, one can simply
define it as random, in which case Atomsk will generate a random
orientation for that grain; second, it can be defined with Miller
indices; and third, it can be defined as rotation angles around the
Cartesian X , Y and Z axes. Each grain orientation can be defined
in only one convention, but different grains can use different
conventions. The <param_file> then looks like the following:

box 200 200 200


node 0 0 0 [100] [010] [001]
node 40 80 60 56 -83 45
node 80 60 90 [11 -1] [112] [1 -10]
node 50 5 60 [110] [1 -10] [001]
node 0.75* box 0.75* box 0.95* box random
node 60 100 80 random
In the example above the first grain will be positioned at

atomsk --polycrystal <seed > <param_file > \


<outputfile > [ options ]

(0, 0, 0) and have crystal orientations X = [100], Y = [010],


Z = [001]; the second grain will be positioned at (40, 80, 60), and

The file <param_file> is a text file. It should start with the


keyword box, followed by the dimensions of the final supercell (in
). The final box can be pseudo 2-D as illustrated in Fig. 5a, in which
case all grains will have the same crystallographic orientation
along the small dimension, or it can be 3-D as illustrated in Fig. 5b
and c.
Then, the <param_file> should contain information about the
positions and crystal orientations of the seeds. As a first possibility,

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.

P. Hirel / Computer Physics Communications (

Nye tensor must be computed. For each atom, the positions Q of


its neighbors are considered as a transformation of the positions in
the perfect lattice P:
P = QG.

(9)

The transformation matrix G is computed for each atom in the


system. Then the Nye tensor can be defined as:

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.

4.5. Electric polarization


Atomsk can work with ionic systems, and contains built-in
facilities to quantify the electric polarization, which arises when
the centers of positive and negative charges do not coincide. Two
physical phenomena have to be separated.
On one hand, an ion can have an electric polarization of its
own, if the electronic orbitals are shifted with respect to the atom
nucleus. In atomistic simulations this effect can be accounted for
by ionic coreshell models, as described e.g. in [24,25], where
each ion is described as an ionic core and an electronic shell. The
polarization of the ion is then mimicked by the displacement of
the shell with respect to its associated core. Atomsk can compute
this electronic polarization from the positions of cores and shells,
thanks to the mode --electronic-polarization.
On the other hand, the relative positions of cations and anions
can give rise to an ionic polarization. This effect is often stronger
than the electronic polarization. A material is ferroelectric if it
can have a permanent spontaneous ionic polarization. Atomsk can
compute the ionic polarization from the electric charges qi and the
positions ri of anions surrounding a cation, thanks to the mode
--edm :

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.

4.4. Nye tensor


Atomsk provides an implementation for the computation of the
Nye tensor. The Nye tensor is a measure of the local deformation of
the lattice around a particular point, and can be particularly useful
to visualize dislocations in crystalline systems. Atomsk follows the
algorithm proposed by Hartley and Mishin to compute the Nye
tensor from atom positions [22]. Two atomic systems are required:
one reference system with no defect, and the system where the

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.)

P. Hirel / Computer Physics Communications (

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.

information about space group or crystallography (sometimes


present in files in GULP, CIF, or PDB formats), nor any additional
simulation parameters such as the force field. Since particles are
indexed using 32-bits unsigned integers, the size of the systems
that can be handled is limited to 231 2 109 particles. The
speed for reading and writing files largely depends on the disks
I/O bandwidth, and typically scales linearly with the number of
particles N.
For the moment Atomsk is best suited for crystalline compounds, and offers no support for molecular data such as bonds
or molecule definition, neither does it offer options to manipulate
molecules (e.g. solvation). Such features may be added in the future.

5. Further capabilities

7. Dependencies and availability

Atomsk was designed as a light-weight command-line program.


As such it can advantageously be part of bash scripts, taking full
advantage of bash capabilities (variables, loops, conditions. . . ) to
automate the construction of various types of atomic systems. Such
scripts are also a good way of keeping track of the way a system
was constructed. Atomsk can also be run on remote machines,
including clusters where it can be part of PBS scripts to convert
input and output files during a simulation.
6. Limitations and future work
Atomsk only deals with the atomic data mentioned in Section 2,
and does not support for instance electronic data (sometimes
present in SIESTA or XCrySDen XSF files), volumetric data,

The source code, written in Fortran 90, is organized in several


individual source files, dispatched in separate folders to achieve
a good modularity. For instance the source code for options is
located in the folder options, and each option is written in its own
separate source file. The dependency tree of Atomsk is reported
in Fig. 8. The source code is constructed so that no dependency
exists between input, output, and options modules. Atomsk relies
on the LAPACK library [26] for the resolution of some equations,
e.g. to solve equations of elasticity to construct a dislocation in an
anisotropic medium, or to compute the Nye tensor.
The structure of the code facilitates its maintenance: when a
bug happens at runtime, e.g. a file is not read properly or an option
is not applied correctly, it is easy to know which file of the source
code is responsible for the bug. In addition it is relatively easy

P. Hirel / Computer Physics Communications (

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.

[1] S. Bahn, K. Jacobsen, An object-oriented scripting interface to a legacy


electronic structure code, Comput. Sci. Eng. 4 (2002) 5666.
[2] T. Youngs, AtenAn application for the creation, editing, and visualization of
coordinates for glasses, liquids, crystals, and molecules, J. Comput. Chem. 31
(2010) 639648.
[3] Noel M. OBoyle, Michael Banck, Craig A. James, Morley Chris, Tim
Vandermeersch, Geoffrey R. Hutchison, Open Babel, An open chemical toolbox,
J. Cheminf. 3 (2011) 33.
[4] GNU General Public Licence, version 3. http://www.gnu.org/licenses/gpl.html
(June 2007).
[5] P. Giannozzi, S. Baroni, N. Bonini, M. Calandra, R. Car, C. Cavazzoni, D. Ceresoli,
G.L. Chiarotti, M. Cococcioni, I. Dabo, A. Dal Corso, S. Fabris, G. Fratesi,
S. de Gironcoli, R. Gebauer, U. Gerstmann, C. Gougoussis, A. Kokalj, M. Lazzeri,
L. Martin Samos, N. Marzari, F. Mauri, R. Mazzarello, S. Paolini, A. Pasquarello,
L. Paulatto, C. Sbraccia, S. Scandolo, G. Sclauzero, A.P. Seitsonen, A. Smogunov,
P. Umari, R.M. Wentzcovitch, QUANTUM ESPRESSO: a modular and opensource software project for quantum simulations of materials, J. Phys.:
Condens. Matter. 21 (2009).
[6] Jos M. Soler, Emilio Artacho, Julian D. Gale, Alberto Garca, Javier Junquera,
Pablo Ordejn, Daniel Snchez, Portal, The Siesta method for ab initio order-N
materials simulation, J. Phys.: Condens. Matter. 14 (2002) 27452779.
[7] G. Kresse, J. Hafner, Ab initio molecular dynamics for liquid metals, Phys. Rev.
B 47 (1993) 558561.
[8] G. Kresse, J. Hafner, Ab initio molecular-dynamics simulation of the liquidmetal-amorphous-semiconductor transition in germanium, Phys. Rev. B 49
(1994) 1425114269.
[9] G. Kresse, J. Furthmller, Efficiency of ab-initio total energy calculations for
metals and semiconductors using a plane-wave basis set, Comput. Mater. Sci.
6 (1996) 1550.
[10] J. Gale, GULP: A computer program for the symmetry-adapted simulation of
solids, J. Chem. Soc., Faraday Trans. 93 (1997) 629637.
[11] I. Todorov, W. Smith, K. Trachenko, M. Dove, DL_POLY_3: new dimensions in
molecular dynamics simulations via massive parallelism, J. Mater. Chem. 16
(2006) 19111918.
[12] J. Stadler, R. Mikulla, H.-R. Trebin, IMD: a software package for molecular
dynamics studies on parallel computers, Int. J. Mod. Phys. C 8 (1997)
11311140.
[13] S. Plimpton, Fast parallel algorithms for short-range molecular dynamics,
J. Comput. Phys. 117 (1995) 119. http://lammps.sandia.gov.
[14] G. Ackland, K. DMellow, S. Daraszewicz, D. Hepburn, M. Uhrin, K. Stratford, The
MOLDY short-range molecular dynamics package, Comput. Phys. Comm. 182
(2011) 25872604.
[15] J. Li, Atomeye: an efficient atomistic configuration viewer, Modelling Simul.
Mater. Sci. Eng. 11 (2003) 173.
[16] A. Kokalj, Computer graphics and graphical user interfaces as tools in
simulations of matter at the atomic scale, Comput. Mater. Sci. 28 (2003) 155.
[17] J. Hirth, J. Lothe, Theory of Dislocations, second ed., McGraw-Hill Publ. Co., New
York, 1982.
[18] V. Vitek, Intrinsic stacking faults in body-centered cubic crystals, Phil. Mag. 18
(1968) 773786.
[19] K. Momma, F. Izumi, VESTA: a three-dimensional visualization system for
electronic and structural analysis, J. Appl. Crystallogr. 41 (2008) 653658.
[20] W. Brostow, J.-P. Dussault, Construction of Voronoi polyhedra, J. Comput. Phys.
29 (1978) 8192.
[21] J. Finney, A procedure for the construction of Voronoi polyhedra, J. Comput.
Phys. 32 (1979) 137143.
[22] C. Hartley, Y. Mishin, Characterization and visualization of the lattice misfit
associated with dislocation cores, Acta Mater. 53 (2005) 13131321.
[23] P. Carrez, J. Godet, P. Cordier, Atomistic simulations of 1/2 110 screw
dislocation core in magnesium oxide, Comput. Mater. Sci. 103 (2015) 250255.
[24] G. Lewis, C. Catlow, Potential models for ionic oxides, J. Phys. C: Solid State
Phys. 18 (1985) 11491161.
[25] M. Sepliarsky, A. Asthagiri, S. Phillpot, M. Stachiotti, R. Migoni, Atomic-level
simulation of ferroelectricity in oxide materials, Curr. Opin. Solid State Mater.
Sci. 9 (2005) 107113.
[26] E. Anderson, Z. Bai, C. Bischof, S. Blackford, J. Demmel, J. Dongarra, J. Du Croz, A.
Greenbaum, S. Hammarling, A. McKenney, D. Sorensen, LAPACK Users Guide,
third ed., Society for Industrial and Applied Mathematics, Philadelphia, PA,
1999.

Das könnte Ihnen auch gefallen