`-dislocation <p`

_{1}> <p_{2}> screw <ξ> <n> <b>

`-dislocation <p`

_{1}> <p_{2}> <edge|edge_add|edge_rm> <ξ> <n> <b> <ν>

`-dislocation <p`

_{1}> <p_{2}> mixed <ξ> <n> <b_{1}> <b_{2}> <b_{3}>

`-dislocation loop <x> <y> <z> <n> <radius> <b`

_{x}> <b_{y}> <b_{z}> <ν>

`-dislocation file <file> <ν>`

This option allows to insert a straight dislocation line or a dislocation loop into the system, using the displacements predicted by the theory of dislocations. Either isotropic or anisotropic solutions can be used (see below). The equations used by this option can be found e.g. in J.P. Hirth and J. Lothe, *Theory of dislocations*.

The user must provide the following parameters (see **Fig. 1**):

**p**: coordinates of the dislocation in the plane normal to the dislocation line (see ξ below), by order of permutation X, Y, Z: if ξ=Z then p_{1}, p_{2}_{1}is the position along X, and p_{2}the position along Y; if ξ=Y then p_{1}is along Z and p_{2}along X; if ξ=X then p_{1}is along Y and p_{2}along Z. The positions <p_{1}> and <p_{2}> are usually given in Å. It is also possible to give them with respect to the box dimensions with the keyword BOX and an operation (see this page).**screw|edge|edge_add|edge_rm|mixed**: character of the dislocation. The character "mixed" can be used only when using anisotropic elasticity (see below).**ξ**: direction of the dislocation line, must be x, y or z.**n**: direction normal to the plane of cut, must be x, y or z, and must be different from ξ.**b**: norm of the Burgers vector (in Å). For dislocations of type "edge", "edge_add", "edge_rm" and "screw", only one value must be given. For the type "mixed", the three components (b_{1},b_{2},b_{3}) must be provided.**ν**: Poisson ratio of the material ; it must be provided for dislocations of character "edge", "edge_add" or "edge_rm". For dislocations of type "screw" or "mixed", it must be omitted.

**Fig. 1** - *Illustration of the parameters of the option "-dislocation". ξ is the direction of the dislocation line (x, y or z). p _{1} and p_{2} are the coordinates of the dislocation in the plane normal to ξ, and b is the Burgers vector.*

By default, the dislocation is introduced using the **isotropic elastic solutions**.

For a **screw dislocation**, the Burgers vector ** b** is aligned with

`u`

_{3} = (*b*/2π) atan(x_{2}/x_{1})

where (x_{1},x_{2}) is the position of the atom in the plane normal to the dislocation line ξ.

For an **edge dislocation**, the Burgers vector ** b** is normal to

`u`

_{1} = (*b*/2π) [ atan(x_{2}/x_{1}) + x_{1}x_{2}/(2(1-ν)(x_{1}^{2}+x_{2}^{2})) ]

`u`

_{2} = (-*b*/2π) [ (1-2ν)ln(x_{1}^{2}+x_{2}^{2}))/(4(1-ν)) + (x_{1}^{2}-x_{2}^{2})/(4(1-ν)(x_{1}^{2}+x_{2}^{2})) ]

where ν is the Poisson ratio of the material, and must be provided. With this option, an edge dislocation can be constructed in three different ways, as illustrated in **Fig. 2**:

- With the first method, associated with the keyword
**edge**, the edge dislocation is constructed by conserving the total number of atoms in the system (also conserving the supercell vectors). This method results in the presence of a step at one edge of the supercell, possibly messing up the boundary conditions. - The second method, associated with the keyword
**edge_add**, consists in duplicating the half-plane of atoms located above the dislocation, and then applying atomic displacements corresponding to the elastic field of an edge dislocation to all other atoms. Subsequently the supercell vector in the direction of the Burgers vector is elongated by half of the Burgers vector magnitude, ||/2 -it is recommended to check it afterwards. Because this method changes the total number of atoms and the volume of the supercell, the comparison between the final and initial systems is made irrelevant. If auxiliary properties existed, then the new atoms inherit the auxiliary properties of the atoms that were duplicated.*b* - The third method, associated with the keyword
**edge_rm**, consists in removing the half-plane of atoms located below the dislocation, and then applying atomic displacements corresponding to the elastic field of an edge dislocation. Subsequently the supercell vector in the direction of the Burgers vector is shortened by half of the Burgers vector magnitude, ||/2, -it is recommended to check it afterwards. Again, beware that this method changes the total number of atoms and the volume of the supercell.*b*

Note that in all cases, atomic planes at the boundaries are distorted, so that boundary conditions cannot be 3-D periodic anymore.

After displacing atoms, Atomsk also computes the theoretical dislocation stresses (from the continuum theory). Since the shear modulus μ is unknown to this option, the stresses are normalized to it, i.e. all stresses are calculated with μ=1 (in other words the quantity computed is actually σ/μ). The six Voigt components σ_{xx}, σ_{yy}, σ_{zz}, σ_{yz}, σ_{xz} and σ_{xy} are saved as auxiliary properties for each atom. If several dislocations are introduced in the system then the corresponding theoretical stresses are summed. Note that they can be written only to some files formats, like CFG (see this page for a list of formats that support writing of auxiliary properties).

**Fig. 2** - *The three possible ways to construct an edge dislocation with this option. When using the keyword "*edge*", no new atom is introduced, but the insertion of the dislocation results in the formation of a step at one border of the cell. When using "*edge_add*", a new half-plane of atoms is introduced in the system (symbolized in orange), and the box is slightly elongated. When using "*edge_rm*", a half-plane of atoms is removed from the system (in gray), and the box is slightly shrinked.*

The use of **anisotropic elasticity** is automatically triggered when the elastic tensor is defined before calling the present option, e.g. through the option `-properties`

(see specifications of this option for details on the rotation of the elastic tensor). The dislocation can have a character "screw", "edge", "edge_add", or "edge_rm", as described above. In addition, it is also possible to create a dislocation of **mixed character**. In this case, the three components of the Burgers vector must be given, b_{3} being along the direction of <ξ> ("screw" direction), and b_{2} along <n> (normal to the glide plane). Then, the equations of anisotropic elasticity are solved to determine the coefficients *A _{k}(n)*,

`u`

ℜ{_{k} = ` (-2π`

}, k=1,3*i*)^{-1} **∑**_{(n=1,3)} *A _{k}(n) D(n)* ln(x

These coefficients are also used to compute the theoretical dislocation stresses:

`σ`

ℜ{_{ij} = ` (-2π`

}*i*)^{-1} **∑**_{(n=1,3)} *B _{ijk}(n) A_{k}(n) D(n)* / (x

Since the elastic tensor is known, in this case it is the exact stresses that are computed. As for the isotropic case, the Voigt components are saved as auxiliary properties for each atom, and if several dislocations are constructed then their contributions to the stresses are added.

**Dislocation loops** can be constructed by using "`-dislocation loop`

". In this case, the following parameters must be provided: the coordinates (x,y,z) of the center of the loop, the direction <n> normal to the plane of the loop (must be "X", "Y", or "Z"), the <radius> of the loop, the three components (b_{x},b_{y},b_{z}) of the Burgers vector, and the value of the material's Poisson ratio ν. The atomic displacements follow the description of D.M. Barnett, *Philos. Mag. A* **51** (1985) 383-387.

The coordinates (x,y,z) of the center of the loop can be provided in Å. It is also possible to give them with respect to the box dimensions with the keyword BOX and an operation (see this page). However, the <radius> of the loop and the Burgers vector components must be given in Å.

If the <radius> of the loop is negative, then instead of being circular, the loop will have a square shape. The side of the square will then have a length equal to twice the absolute value of the <radius>.

For dislocation loops, the theoretical stresses are not calculated.

Just like the previous types of dislocations, several loops can be introduced in the system by calling the present option several times.

**Fig. 3** - *Schematic for the construction of a dislocation loop. In this example, the dislocation loop is in a plane normal to the Cartesian Z axis (i.e. n is along Z). The dislocation loop appears in green, and its Burgers vector b in blue. Right-hand side figure: if the <radius> has a negative value, then the dislocation loop will have a square shape.*

Finally, dislocation lines of various shapes can be defined in a file. The file must contain a line with the keyword "dislocation" followed by the Cartesian components of the Burgers vector, followed by lines giving the Cartesian positions (x,y,z) of the dislocation line. Several dislocations can be defined in the same file, each definition starting with the keyword "dislocation" and the Burgers vector. The file must look like the following:

```
dislocation <b
```

_{x}> <b_{y}> <b_{z}>

<x_{1}> <y_{1}> <z_{1}>

<x_{2}> <y_{2}> <z_{2}>

<x_{3}> <y_{3}> <z_{3}>

...

dislocation <b'_{x}> <b'_{y}> <b'_{z}>

<x'_{1}> <y'_{1}> <z'_{1}>

<x'_{2}> <y'_{2}> <z'_{2}>

<x'_{3}> <y'_{3}> <z'_{3}>

...

Atomsk will introduce dislocation segments between the given points. The resulting dislocation will form a loop, i.e. the last point will be connected to the first point.

**IMPORTANT REMARK:** this method is similar to the one used for dislocation loop, therefore it is only capable of inserting *glide* dislocations where the dislocation line and Burgers vector belong to the same plane.

**Important remarks:** Atomsk does not "automagically" find nor adjust the Burgers vector of the dislocation, therefore a very accurate value of ** b** must be provided. Neither does the program find the optimal position for the dislocation center: a position

`(p`_{1},p_{2})

that exactly matches an atom position may result in unrealistic displacements, so you may have to play around with these coordinates to obtain proper results. As always, don't trust a program blindly -check your system before running any simulation, especially when building systems with dislocation(s).If a selection was defined (with the option `-select`

) then the displacements described above are applied only to selected atoms.

If the system contains shells (in the sense of an ionic core-shell model), then each shell is displaced by the same vector as its associated core.

After applying this option, some atoms may end up out of the box. If you want to wrap these atoms back into the simulation cell you may consider using the option `-wrap`

.

By default no dislocation is introduced at all.

`atomsk initial.cfg -dislocation 0.5*BOX 0.5*BOX screw z y 3.2 final.xyz`

This will read

`initial.cfg`

, and displace atoms so as to insert a screw dislocation of Burgers vector 3.2 Å lying along ξ=Z, in a plane normal to Y. The position (p_{1},p_{2}) is given in the plane normal to Z, i.e. in the (XY) plane: the dislocation is placed at the middle of the box along X (because p_{1}=0.5*BOX) and also in the middle along Y (because p_{2}=0.5*BOX). The result will be output to`final.xyz`

.`atomsk initial.cfg -disloc 0.25*BOX 0.5*BOX screw z y 3.2 -disloc 0.75*BOX 0.5*BOX screw z y -3.2 final.xyz`

This will read

`initial.cfg`

and insert two screw dislocations of opposite Burgers vectors, the first one at (0.25;0.5) and the second one at (0.75;0.5). The result will be output to`final.xyz`

.`atomsk unitcell.xyz -duplicate 30 2 20 -disloc 30 40.2 edge_add y x 2.8 0.28 dislocation.xsf`

This will read

`unitcell.xyz`

, duplicate it to form a 30x2x20 supercell, and then construct an edge dislocation by inserting a row of new atoms. The dislocation line will lie along Y, with a Burgers vector of 2.8 Å, using a Poisson ratio of 0.28, and the center of the dislocation will be placed at 30 Å along Z and 40.2 Å along X. The result will be output to`dislocation.xsf`

.`atomsk unitcell.xyz -duplicate 30 2 20 -disloc 30 40.2 edge y x 2.8 0.28 dislocation.cfg`

Similar to the previous example, except that the edge dislocation will be constructued by adding a surface step (i.e. without inserting new atoms).

##### ctensor.txt

`# The elastic tensor for [100] [010] [001]`

elastic Voigt

243.30 243.30 243.30

145.00 145.00 145.00

116.10 116.10 116.10

# The crystal orientation

orientation

110

1-10

001`atomsk initial.xyz -prop ctensor.txt -disloc 0.5*BOX 0.5*BOX screw y x 2.8 dislocation.cfg`

Assume we want to build a dislocation in a slab of iron with crystallographic orientation X=[110], Y=[110], Z=[001]. The original system (

`initial.xyz`

) has that orientation. In this example the option`-properties`

is used to read the elastic tensor and the system orientation from the file`ctensor.txt`

, therefore the anisotropic elasticity will be used to construct the dislocation. This is usually the most convenient way to use anisotropic elasticity for building a dislocation.##### ctensor.txt

`# The elastic tensor for [100] [010] [001]`

elastic Voigt

243.30 243.30 243.30

145.00 145.00 145.00

116.10 116.10 116.10`atomsk initial.xyz -orient 110 1-10 001 100 010 001 -prop ctensor.txt -orient 100 010 001 110 1-10 001 -disloc 0.5*BOX 0.5*BOX screw y x 2.8 dislocation.cfg`

This example illustrates another way of doing the same thing as the previous example. The original system (

`initial.xyz`

which is oriented X=[110], Y=[110], Z=[001]) is first rotated thanks to the option`-orient`

so that the [100] crystal direction lies along X, [010] along Y and [001] along Z. Then the elastic tensor, which corresponds to that orientation, is read. Then the system is rotated back to its original orientation (this could also be done by using the option`-alignx`

instead), which also rotates the elastic tensor accordingly. Finally the dislocation can be introduced.`atomsk supercell.cfg -dislocation loop 0.5*box 0.5*box 0.5*box Z 30 2.85 0 0 0.33 Loop.cfg`

In this example, a dislocation loop is introduced in the middle of the box, in a plane normal to Z, with a radius of 30 Å and a Burgers vector

=[2.85 0 0]. The Poisson ratio of the material is set to ν=0.33.*b*You may also want to look at the scripts in the "examples" folder provided with the program. The folder "

`Al_110dislocations`

" contains a bash script that builds two edge dislocations with opposite Burgers vectors in a slab of aluminium, using isotropic elasticity. The folder "`Fe_disloc_screw111_anisotropy`

" shows how to build a 1/2<111> screw dislocation in iron using anisotropic elasticity.