Back to main menu

Mode: density

Syntax

atomsk --density <file> <property> <1d|2d|3d> [<x|y|z>] <σ> [options]

Description

This mode computes the density of a given <property>.

The discrete (atomic) values of the given <property> are replaced by Gaussian functions of variance σ2 that are evaluated in a finite-element grid. The density of the <property> at a point of the grid is defined as the sum of Gaussian functions belonging to all atoms.

The parameters associated with this mode are:

The 1-D density profile will replace atoms by 1-D Gaussian functions, and compute the density along the specified <axis>. This can be used to determine the density of an element, or of a property (e.g. electric charge), along a given direction.

The 2-D density plot will replace atoms by 2-D Gaussian functions, and compute the density in the plane normal to the <axis>. This can be used to apply a Gaussian blur to atomic positions and produce an image comparable to a high-resolution transmission electron microscope image, or determine a density of a property (e.g. electric charge) in a plane.

The 3-D density plot will replace atoms by 3-D Gaussian functions, and compute the density in the whole volume. In addition, the positions where the density is significantly higher or lower than the average will be written into file(s) (see below). This can be useful to find the positions of interstitial atoms, or the positions of vacancies.

The system is considered to be periodic, and the periodic replicas of atoms will contribute to the density.

Output consists of the following files:

In the case of a 2-D density computation, the following file will be produced:

And in the case of a 3-D density computation, the following files will also be produced:

If this mode is used with one or several options they will be applied to the system before computing the density.

If a selection was defined (with the option -select) then only the selected atoms will be counted in the density.

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.

Examples

Back to main menu