1.. index:: compute entropy/atom 2 3compute entropy/atom command 4============================ 5 6Syntax 7"""""" 8 9.. parsed-literal:: 10 11 compute ID group-ID entropy/atom sigma cutoff keyword value ... 12 13* ID, group-ID are documented in :doc:`compute <compute>` command 14* entropy/atom = style name of this compute command 15* sigma = width of gaussians used in the g(r) smoothing 16* cutoff = cutoff for the g(r) calculation 17* one or more keyword/value pairs may be appended 18 19.. parsed-literal:: 20 21 keyword = *avg* or *local* 22 *avg* values = *yes* or *no* cutoff2 23 *yes* = average the pair entropy over neighbors 24 *no* = do not average the pair entropy over neighbors 25 cutoff2 = cutoff for the averaging over neighbors 26 *local* values = *yes* or *no* = use the local density around each atom to normalize the g(r) 27 28Examples 29"""""""" 30 31.. code-block:: LAMMPS 32 33 compute 1 all entropy/atom 0.25 5. 34 compute 1 all entropy/atom 0.25 5. avg yes 5. 35 compute 1 all entropy/atom 0.125 7.3 avg yes 5.1 local yes 36 37Description 38""""""""""" 39 40Define a computation that calculates the pair entropy fingerprint for 41each atom in the group. The fingerprint is useful to distinguish between 42ordered and disordered environments, for instance liquid and solid-like 43environments, or glassy and crystalline-like environments. Some 44applications could be the identification of grain boundaries, a 45melt-solid interface, or a solid cluster emerging from the melt. 46The advantage of this parameter over others is that no a priori 47information about the solid structure is required. 48 49This parameter for atom i is computed using the following formula from 50:ref:`(Piaggi) <Piaggi>` and :ref:`(Nettleton) <Nettleton>` , 51 52.. math:: 53 54 s_S^i=-2\pi\rho k_B \int\limits_0^{r_m} \left [ g(r) \ln g(r) - g(r) + 1 \right ] r^2 dr 55 56where r is a distance, g(r) is the radial distribution function of atom 57i and rho is the density of the system. The g(r) computed for each 58atom i can be noisy and therefore it is smoothed using: 59 60.. math:: 61 62 g_m^i(r) = \frac{1}{4 \pi \rho r^2} \sum\limits_{j} \frac{1}{\sqrt{2 \pi \sigma^2}} e^{-(r-r_{ij})^2/(2\sigma^2)} 63 64where the sum in j goes through the neighbors of atom i, and :math:`\sigma` 65is a parameter to control the smoothing. 66 67The input parameters are *sigma* the smoothing parameter :math:`\sigma`, 68and the *cutoff* for the calculation of g(r). 69 70If the keyword *avg* has the setting *yes*, then this compute also 71averages the parameter over the neighbors of atom i according to: 72 73.. math:: 74 75 \left< s_S^i \right> = \frac{\sum_j s_S^j + s_S^i}{N + 1} 76 77where the sum j goes over the neighbors of atom i and N is the number 78of neighbors. This procedure provides a sharper distinction between 79order and disorder environments. In this case the input parameter 80*cutoff2* is the cutoff for the averaging over the neighbors and 81must also be specified. 82 83If the *avg yes* option is used, the effective cutoff of the neighbor 84list should be *cutoff*\ +\ *cutoff2* and therefore it might be necessary 85to increase the skin of the neighbor list with: 86 87.. parsed-literal:: 88 89 neighbor <skin distance> bin 90 91See :doc:`neighbor <neighbor>` for details. 92 93If the *local yes* option is used, the g(r) is normalized by the 94local density around each atom, that is to say the density around each 95atom is the number of neighbors within the neighbor list cutoff divided 96by the corresponding volume. This option can be useful when dealing with 97inhomogeneous systems such as those that have surfaces. 98 99Here are typical input parameters for fcc aluminum (lattice 100constant 4.05 Angstroms), 101 102.. parsed-literal:: 103 104 compute 1 all entropy/atom 0.25 5.7 avg yes 3.7 105 106and for bcc sodium (lattice constant 4.23 Angstroms), 107 108.. parsed-literal:: 109 110 compute 1 all entropy/atom 0.25 7.3 avg yes 5.1 111 112Output info 113""""""""""" 114 115By default, this compute calculates the pair entropy value for each 116atom as a per-atom vector, which can be accessed by any command that 117uses per-atom values from a compute as input. See the :doc:`Howto output <Howto_output>` page for an overview of LAMMPS output 118options. 119 120The pair entropy values have units of the Boltzmann constant. They are 121always negative, and lower values (lower entropy) correspond to more 122ordered environments. 123 124Restrictions 125"""""""""""" 126 127This compute is part of the EXTRA-COMPUTE package. It is only enabled if 128LAMMPS was built with that package. See the :doc:`Build package <Build_package>` page for more info. 129 130Related commands 131"""""""""""""""" 132 133:doc:`compute cna/atom <compute_cna_atom>` 134:doc:`compute centro/atom <compute_centro_atom>` 135 136Default 137""""""" 138 139The default values for the optional keywords are avg = no and local = no. 140 141---------- 142 143.. _Piaggi: 144 145**(Piaggi)** Piaggi and Parrinello, J Chem Phys, 147, 114112 (2017). 146 147.. _Nettleton: 148 149**(Nettleton)** Nettleton and Green, J Chem Phys, 29, 6 (1958). 150