# Entropy fingerprint¶

The entropy parameter was introduced by Piaggi et al for identification of defects and distinction between solid and liquid. The entropy paramater \(s_s^i\) is defined as,

where \(r_m\) is the upper bound of integration and \(g_m^i\) is radial distribution function centered on atom \(i\),

\(r_{ij}\) is the interatomic distance between atom \(i\) and its neighbors \(j\) and \(\sigma\) is a broadening parameter.

The averaged version of entropy parameters \(\bar{s}_s^i\) can be calculated in two ways, either using a simple averaging over the neighbors given by,

or using a switching function as described below,

\(f(r_{ij})\) is a switching parameter which depends on \(r_a\) which is the cutoff distance. The switching function shows a value of 1 for \(r_{ij} << r_a\) and 0 for \(r_{ij} >> r_a\). The switching function is given by,

Entropy parameters can be calculated in pyscal using the following code,

```
import pyscal.core as pc
sys = pc.System()
sys.read_inputfile('conf.dump')
sys.find_neighbors(method="cutoff", cutoff=0)
lattice_constant=4.00
sys.calculate_entropy(1.4*lattice_constant, averaged=True)
atoms = sys.atoms
entropy = [atom.entropy for atom in atoms]
average_entropy = [atom.avg_entropy for atom in atoms]
```

The value of \(r_m\) is provided in units of lattice constant. Further parameters shown above, such as \(\sigma\) can be specified using the various keyword arguments. The above code does a simple averaging over neighbors. The switching function can be used by,

```
sys.calculate_entropy(1.4*lattice_constant, ra=0.9*lattice_constant, switching_function=True, averaged=True)
```

In pyscal, a slightly different version of \(s_s^i\) is calculated. This is given by,

The prefactor \(2\pi k_B\) is dropped in the entropy values calculated in pyscal.