atomsk --density <file> <property> <1d|2d|3d> [<x|y|z>] <σ> [options]
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
.
atomsk --density myfile.cfg Fe 1d X 0.6
This will read the file myfile.cfg
, and compute the 1-D density profile of iron atoms (Fe) along the X axis. Each iron atom will be replaced by a Gaussian function of variance σ2=0.62. The results will be written in the file myfile_density.dat
.
atomsk --density Al.xsf mass 2d Z 2.0
This will read the file Al.xsf
, and compute the density of mass in the 2-D plane normal to the Z axis, using Gaussian functions with σ=2.0. The results will be written in the file Al_density.dat
. A gnuplot script named Al_density.gp
will also be produced to visualize the data.
atomsk --density MD_5000.lmc mass 3d 2.0
This will read the file MD_5000.lmc
, and compute the 3-D density of mass in the whole system, using Gaussian functions with σ=2.0. Note that no <axis> must be specified. The results will be written in the file MD_5000_density.dat
. In addition, if the variations of mass are significant then the positions where the density is high will be written into MD_5000_interstitials.xsf
, and the positions where it is low will be written into MD_5000_vacancies.xsf
.