atomsk --nye <file1> <file2> [options] [<outputfile>] [formats]
This mode computes the per-atom strain tensor, and then the Nye tensor, a quantity related to the strain gradient around an atom. The Nye tensor can be useful for visualizing lattice defects such as point defects, dislocations, or planar defects (stacking faults, twins, grain boundaries).
This mode requires two files: a <file1> containing the reference system, and a <file2> that contains the system to analyze. The reference system may be:
The two files <file1> and <file2> may be of the same format, or of different formats, as long as these formats are supported by Atomsk.
The calculation follows the method described in C.S. Hartley, Y. Mishin, Acta Mater. 53 (2005) 1313. Given a reference lattice defined by a set of atom positions P and a distorted lattice defined by Q, the lattice correspondance tensor is defined so as to transform one lattice into the other:
P = Q · G
Once the tensor G is computed for each atom, Atomsk uses it to compute the strain tensor for each atom (where the Kronecker symbol δij=1 if i=j, and 0 otherwise):
εij = ½ [ (δij − Gij) + (δji − Gji) ]
From there the strain invariants are also computed:
I1 = Trace(ε)
I2 = ½ [ Trace(ε)2 − Trace(ε2) ]
I3 = Det(ε)
From G, the per-atom rotation tensor is also computed:
Rij = ½ [ (δij − Gij) − (δji − Gji) ]
Finally, the Nye tensor α is computed from its spatial derivatives (εimk is the Levi-Civita permutation symbol):
αjk = εimk ∂mGij
Note that the original published article by Hartley and Mishin cited above contained a mistake in this equation. The equation implemented in Atomsk was verified to yield the correct Burgers vector after integration of the Nye tensor.
To perform the calculation, neighbors up to the distance NeighFactor × d3 are used, where d3 is the distance to the third neighbor, and NeighFactor is 1.25 by default. Moreover, a neighbor is used only its position vectors relative to the central atom, between the reference and analyzed systems, is smaller than a threshold value θmax. The default value is θmax = 27°, which Hartley and Mishin found appropriate for fcc lattices, as it is about half the angle between first neighbors (60°).
The values of the parameters NeighFactor and θmax can be modified by creating a configuration file named "atomsk.conf" in the working directory where the calculation is performed, and containing the following lines:
Nye NeighFactor 1.25
Nye theta_max 27
The values defined in this file will be used for the calculation, instead of the default ones.
This mode outputs several files containing the results:
All these quantities are output in Atomeye CFG format for easy visualization e.g. with OVITO.
If you use this mode with one or several options they will be applied to the <file1> and <file2> before the Nye tensor is computed.
Note that this mode assumes that the atom coordinates are wrapped, i.e. that all atoms are inside of the simulation box. If it is not the case then the calculation may be wrong. Coordinates can be wrapped thanks to the option -wrap
.
atomsk --nye reference.xsf dislocation.cfg nye.cfg
This will compute the Nye tensor due to the displacements in the file dislocation.cfg
, using reference.xsf
as a reference system. The positions and Nye tensors of atoms will be written to nye.cfg
.
atomsk --nye unitcell.xsf mysystem.cfg nye.cfg
In this example, a unit cell is provided as reference system. Atomsk will construct reference atomic environments from the file unitcell.xsf
, and then proceed with computing the Nye tensor. The final result will be written into nye.cfg
.
atomsk --nye NULL mysystem.cfg nye.cfg
In this example the reference system is specified as "NULL", i.e. no reference is provided. Atomsk will read atom positions from the file mysystem.cfg
, and average their environments to construct the reference. Then, it will compute the Nye tensor and write the result into nye.cfg
.
# Change values of parameters for Nye tensor calculation
Nye NeighFactor 1.2
Nye theta_max 45
If a file named "atomsk.conf" exists in current directory, then Atomsk will use the values of the parameters NeighFactor and theta_max defined in this file.