{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Entropy - Enthalpy parameters" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Entropy fingerprint\n", "\n", "The entropy parameter was introduced by Piaggi et\n", "al {cite}`Piaggi2017` for identification of defects and\n", "distinction between solid and liquid. The entropy paramater $s_s^i$ is\n", "defined as,\n", "\n", "> $$s_s^i = -2\\pi\\rho k_B \\int_0^{r_m} [g_m^i(r)\\ln g_m^i(r) - g_m^i(r) + 1] r^2 dr$$\n", "\n", "where $r_m$ is the upper bound of integration and $g_m^i$ is radial\n", "distribution function centered on atom $i$,\n", "\n", "> $$g_m^i(r) = \\frac{1}{4\\pi\\rho r^2} \\sum_j \\frac{1}{\\sqrt{2\\pi\\sigma^2}} \\exp{-(r-r_{ij})^2/(2\\sigma^2)}$$\n", "\n", "$r_{ij}$ is the interatomic distance between atom $i$ and its neighbors\n", "$j$ and $\\sigma$ is a broadening parameter.\n", "\n", "The averaged version of entropy parameters $\\bar{s}_s^i$ can be\n", "calculated in two ways, either using a simple averaging over the\n", "neighbors given by,\n", "\n", "> $$\\bar{s}_s^i = \\frac{\\sum_j s_s^j + s_s^i}{N + 1}$$\n", "\n", "or using a switching function as described below,\n", "\n", "> $$\\bar{s}_s^i = \\frac{\\sum_j s_s^i f(r_{ij}) + s_s^i}{\\sum_j f(r_{ij}) + 1}$$\n", "\n", "$f(r_{ij})$ is a switching parameter which depends on $r_a$ which is the\n", "cutoff distance. The switching function shows a value of 1 for\n", "$r_{ij} << r_a$ and 0 for $r_{ij} >> r_a$. The switching function is\n", "given by,\n", "\n", "> $$f(r_{ij}) = \\frac{1-(r_{ij}/r_a)^N}{1-(r_{ij}/r_a)^M}$$\n", "\n", "Entropy parameters can be calculated in pyscal using the following code,\n", "\n", "``` python\n", "import pyscal.core as pc\n", "sys = pc.System()\n", "sys.read_inputfile('conf.dump')\n", "sys.find_neighbors(method=\"cutoff\", cutoff=0)\n", "lattice_constant=4.00\n", "sys.calculate_entropy(1.4*lattice_constant, averaged=True)\n", "atoms = sys.atoms\n", "entropy = [atom.entropy for atom in atoms]\n", "average_entropy = [atom.avg_entropy for atom in atoms]\n", "```\n", "\n", "The value of $r_m$ is provided in units of lattice constant. Further\n", "parameters shown above, such as $\\sigma$ can be specified using the\n", "various keyword arguments. The above code does a simple averaging over\n", "neighbors. The switching function can be used by,\n", "\n", "``` python\n", "sys.calculate_entropy(1.4*lattice_constant, ra=0.9*lattice_constant, switching_function=True, averaged=True)\n", "```\n", "\n", "In pyscal, a slightly different version of $s_s^i$ is calculated. This\n", "is given by,\n", "\n", "> $$s_s^i = -\\rho \\int_0^{r_m} [g_m^i(r)\\ln g_m^i(r) - g_m^i(r) + 1] r^2 dr$$\n", "\n", "The prefactor $2\\pi k_B$ is dropped in the entropy values calculated in\n", "pyscal.\n", "\n", "## References\n", "\n", "```{bibliography} ../references.bib\n", ":filter: docname in docnames\n", ":style: unsrt\n", "```" ] } ], "metadata": { "kernelspec": { "display_name": "py3", "language": "python", "name": "py3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.9.1" } }, "nbformat": 4, "nbformat_minor": 4 }