1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384
|
<!DOCTYPE html>
<html class="writer-html5" lang="en" data-content_root="./">
<head>
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>pymatgen.analysis.ferroelectricity package — pymatgen 2025.1.24 documentation</title>
<link rel="stylesheet" type="text/css" href="assets/pygments.css?v=fa44fd50" />
<link rel="stylesheet" type="text/css" href="assets/css/theme.css?v=e59714d7" />
<link rel="stylesheet" type="text/css" href="assets/css/custom.css" />
<link rel="canonical" href="https://pymatgen.orgpymatgen.analysis.ferroelectricity.html"/>
<script src="assets/jquery.js?v=5d32c60e"></script>
<script src="assets/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="assets/documentation_options.js?v=d2bc030c"></script>
<script src="assets/doctools.js?v=9bcbadda"></script>
<script src="assets/sphinx_highlight.js?v=dc90522c"></script>
<script src="assets/js/theme.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" style="background: linear-gradient(0deg, rgba(23,63,162,1) 0%, rgba(0,70,192,1) 100%)" >
<a href="index.html">
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
<input type="text" name="q" placeholder="Search docs" aria-label="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<!-- Local TOC -->
<div class="local-toc"><ul>
<li><a class="reference internal" href="#">pymatgen.analysis.ferroelectricity package</a><ul>
<li><a class="reference internal" href="#submodules">Submodules</a></li>
<li><a class="reference internal" href="#module-pymatgen.analysis.ferroelectricity.polarization">pymatgen.analysis.ferroelectricity.polarization module</a><ul>
<li><a class="reference internal" href="#pymatgen.analysis.ferroelectricity.polarization.EnergyTrend"><code class="docutils literal notranslate"><span class="pre">EnergyTrend</span></code></a><ul>
<li><a class="reference internal" href="#pymatgen.analysis.ferroelectricity.polarization.EnergyTrend.endpoints_minima"><code class="docutils literal notranslate"><span class="pre">EnergyTrend.endpoints_minima()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.analysis.ferroelectricity.polarization.EnergyTrend.max_spline_jump"><code class="docutils literal notranslate"><span class="pre">EnergyTrend.max_spline_jump()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.analysis.ferroelectricity.polarization.EnergyTrend.smoothness"><code class="docutils literal notranslate"><span class="pre">EnergyTrend.smoothness()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.analysis.ferroelectricity.polarization.EnergyTrend.spline"><code class="docutils literal notranslate"><span class="pre">EnergyTrend.spline()</span></code></a></li>
</ul>
</li>
<li><a class="reference internal" href="#pymatgen.analysis.ferroelectricity.polarization.Polarization"><code class="docutils literal notranslate"><span class="pre">Polarization</span></code></a><ul>
<li><a class="reference internal" href="#pymatgen.analysis.ferroelectricity.polarization.Polarization.from_outcars_and_structures"><code class="docutils literal notranslate"><span class="pre">Polarization.from_outcars_and_structures()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.analysis.ferroelectricity.polarization.Polarization.get_lattice_quanta"><code class="docutils literal notranslate"><span class="pre">Polarization.get_lattice_quanta()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.analysis.ferroelectricity.polarization.Polarization.get_pelecs_and_pions"><code class="docutils literal notranslate"><span class="pre">Polarization.get_pelecs_and_pions()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.analysis.ferroelectricity.polarization.Polarization.get_polarization_change"><code class="docutils literal notranslate"><span class="pre">Polarization.get_polarization_change()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.analysis.ferroelectricity.polarization.Polarization.get_polarization_change_norm"><code class="docutils literal notranslate"><span class="pre">Polarization.get_polarization_change_norm()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.analysis.ferroelectricity.polarization.Polarization.get_same_branch_polarization_data"><code class="docutils literal notranslate"><span class="pre">Polarization.get_same_branch_polarization_data()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.analysis.ferroelectricity.polarization.Polarization.max_spline_jumps"><code class="docutils literal notranslate"><span class="pre">Polarization.max_spline_jumps()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.analysis.ferroelectricity.polarization.Polarization.same_branch_splines"><code class="docutils literal notranslate"><span class="pre">Polarization.same_branch_splines()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.analysis.ferroelectricity.polarization.Polarization.smoothness"><code class="docutils literal notranslate"><span class="pre">Polarization.smoothness()</span></code></a></li>
</ul>
</li>
<li><a class="reference internal" href="#pymatgen.analysis.ferroelectricity.polarization.calc_ionic"><code class="docutils literal notranslate"><span class="pre">calc_ionic()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.analysis.ferroelectricity.polarization.get_nearest_site"><code class="docutils literal notranslate"><span class="pre">get_nearest_site()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.analysis.ferroelectricity.polarization.get_total_ionic_dipole"><code class="docutils literal notranslate"><span class="pre">get_total_ionic_dipole()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.analysis.ferroelectricity.polarization.zval_dict_from_potcar"><code class="docutils literal notranslate"><span class="pre">zval_dict_from_potcar()</span></code></a></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" style="background: linear-gradient(0deg, rgba(23,63,162,1) 0%, rgba(0,70,192,1) 100%)" >
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="index.html">pymatgen</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content style-external-links">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="index.html" class="icon icon-home" aria-label="Home"></a></li>
<li class="breadcrumb-item active">pymatgen.analysis.ferroelectricity package</li>
<li class="wy-breadcrumbs-aside">
<a href="https://github.com/materialsproject/pymatgen/blob/master/docs_rst/pymatgen.analysis.ferroelectricity.rst" class="fa fa-github"> Edit on GitHub</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<section id="module-pymatgen.analysis.ferroelectricity">
<span id="pymatgen-analysis-ferroelectricity-package"></span><h1>pymatgen.analysis.ferroelectricity package<a class="headerlink" href="#module-pymatgen.analysis.ferroelectricity" title="Link to this heading"></a></h1>
<p>Package for analyzing ferroelectricity.</p>
<section id="submodules">
<h2>Submodules<a class="headerlink" href="#submodules" title="Link to this heading"></a></h2>
</section>
<section id="module-pymatgen.analysis.ferroelectricity.polarization">
<span id="pymatgen-analysis-ferroelectricity-polarization-module"></span><h2>pymatgen.analysis.ferroelectricity.polarization module<a class="headerlink" href="#module-pymatgen.analysis.ferroelectricity.polarization" title="Link to this heading"></a></h2>
<p>This module contains classes useful for analyzing ferroelectric candidates.
The Polarization class can recover the spontaneous polarization using
multiple calculations along a nonpolar to polar ferroelectric distortion.
The EnergyTrend class is useful for assessing the trend in energy across
the distortion.</p>
<p>See Nicola Spaldin’s “A beginner’s guide to the modern theory of polarization”
(<a class="reference external" href="https://arxiv.org/abs/1202.1831">https://arxiv.org/abs/1202.1831</a>) for an introduction to crystal polarization.</p>
<p>VASP reports dipole moment values (used to derive polarization) along Cartesian
directions (see pead.F around line 970 in the VASP source to confirm this).
However, it is most convenient to perform the adjustments necessary to recover
a same branch polarization by expressing the polarization along lattice directions.
For this reason, calc_ionic calculates ionic contributions to the polarization
along lattice directions. We provide the means to convert Cartesian direction
polarizations to lattice direction polarizations in the Polarization class.</p>
<p>We recommend using our calc_ionic function for calculating the ionic
polarization rather than the values from OUTCAR. We find that the ionic
dipole moment reported in OUTCAR differ from the naive calculation of
\sum_i Z_i r_i where i is the index of the atom, Z_i is the ZVAL from the
pseudopotential file, and r is the distance in Angstroms along the lattice vectors.
Note, this difference is not simply due to VASP using Cartesian directions and
calc_ionic using lattice direction but rather how the ionic polarization is
computed. Compare calc_ionic to VASP SUBROUTINE POINT_CHARGE_DIPOL in dipol.F in
the VASP source to see the differences. We are able to recover a smooth same
branch polarization more frequently using the naive calculation in calc_ionic
than using the ionic dipole moment reported in the OUTCAR.</p>
<p>Some definitions of terms used in the comments below:</p>
<p>A polar structure belongs to a polar space group. A polar space group has a
one of the 10 polar point group:</p>
<blockquote>
<div><p>(1, 2, m, mm2, 4, 4mm, 3, 3m, 6, 6m)</p>
</div></blockquote>
<p>Being nonpolar is not equivalent to being centrosymmetric (having inversion
symmetry). For example, any space group with point group 222 is nonpolar but
not centrosymmetric.</p>
<p>By symmetry the polarization of a nonpolar material modulo the quantum
of polarization can only be zero or 1/2. We use a nonpolar structure to help
determine the spontaneous polarization because it serves as a reference point.</p>
<dl class="py class">
<dt class="sig sig-object py" id="pymatgen.analysis.ferroelectricity.polarization.EnergyTrend">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">EnergyTrend</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">energies</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.1.24/src/pymatgen/core/../analysis/ferroelectricity/polarization.py#L427-L471"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.analysis.ferroelectricity.polarization.EnergyTrend" title="Link to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
<p>Analyze the trend in energy across a distortion path.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>energies</strong> – Energies.</p>
</dd>
</dl>
<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.analysis.ferroelectricity.polarization.EnergyTrend.endpoints_minima">
<span class="sig-name descname"><span class="pre">endpoints_minima</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">slope_cutoff</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">0.005</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.1.24/src/pymatgen/core/../analysis/ferroelectricity/polarization.py#L458-L471"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.analysis.ferroelectricity.polarization.EnergyTrend.endpoints_minima" title="Link to this definition"></a></dt>
<dd><p>Test if spline endpoints are at minima for a given slope cutoff.</p>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.analysis.ferroelectricity.polarization.EnergyTrend.max_spline_jump">
<span class="sig-name descname"><span class="pre">max_spline_jump</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.1.24/src/pymatgen/core/../analysis/ferroelectricity/polarization.py#L453-L456"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.analysis.ferroelectricity.polarization.EnergyTrend.max_spline_jump" title="Link to this definition"></a></dt>
<dd><p>Get maximum difference between spline and energy trend.</p>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.analysis.ferroelectricity.polarization.EnergyTrend.smoothness">
<span class="sig-name descname"><span class="pre">smoothness</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.1.24/src/pymatgen/core/../analysis/ferroelectricity/polarization.py#L441-L451"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.analysis.ferroelectricity.polarization.EnergyTrend.smoothness" title="Link to this definition"></a></dt>
<dd><p>Get rms average difference between spline and energy trend.</p>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.analysis.ferroelectricity.polarization.EnergyTrend.spline">
<span class="sig-name descname"><span class="pre">spline</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.1.24/src/pymatgen/core/../analysis/ferroelectricity/polarization.py#L437-L439"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.analysis.ferroelectricity.polarization.EnergyTrend.spline" title="Link to this definition"></a></dt>
<dd><p>Fit spline to energy trend data.</p>
</dd></dl>
</dd></dl>
<dl class="py class">
<dt class="sig sig-object py" id="pymatgen.analysis.ferroelectricity.polarization.Polarization">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">Polarization</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">p_elecs</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">p_ions</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">structures</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Sequence</span><span class="p"><span class="pre">[</span></span><a class="reference internal" href="pymatgen.core.html#pymatgen.core.structure.Structure" title="pymatgen.core.structure.Structure"><span class="pre">Structure</span></a><span class="p"><span class="pre">]</span></span></span></em>, <em class="sig-param"><span class="n"><span class="pre">p_elecs_in_cartesian</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">p_ions_in_cartesian</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.1.24/src/pymatgen/core/../analysis/ferroelectricity/polarization.py#L138-L424"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.analysis.ferroelectricity.polarization.Polarization" title="Link to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
<p>Recover the same branch polarization for a set of polarization
calculations along the nonpolar - polar distortion path of a ferroelectric.</p>
<p>p_elecs, p_ions, and structures lists should be given in order
of nonpolar to polar! For example, the structures returned from:</p>
<blockquote>
<div><p>nonpolar.interpolate(polar,interpolate_lattices=True)</p>
</div></blockquote>
<p>if nonpolar is the nonpolar Structure and polar is the polar structure.</p>
<p>It is assumed that the electronic and ionic dipole moment values are given in
electron Angstroms along the three lattice directions (a,b,c).</p>
<p>p_elecs (np.ndarray): electronic contribution to the polarization with shape [N, 3]
p_ions (np.ndarray): ionic contribution to the polarization with shape [N, 3]
p_elecs_in_cartesian: whether p_elecs is along Cartesian directions (rather than lattice directions).</p>
<blockquote>
<div><p>Default is True because that is the convention for VASP.</p>
</div></blockquote>
<dl class="simple">
<dt>p_ions_in_cartesian: whether p_ions is along Cartesian directions (rather than lattice directions).</dt><dd><p>Default is False because calc_ionic (which we recommend using for calculating the ionic
contribution to the polarization) uses lattice directions.</p>
</dd>
</dl>
<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.analysis.ferroelectricity.polarization.Polarization.from_outcars_and_structures">
<em class="property"><span class="pre">classmethod</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">from_outcars_and_structures</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">outcars</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">structures</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">calc_ionic_from_zval</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><span class="pre">Self</span></span></span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.1.24/src/pymatgen/core/../analysis/ferroelectricity/polarization.py#L183-L202"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.analysis.ferroelectricity.polarization.Polarization.from_outcars_and_structures" title="Link to this definition"></a></dt>
<dd><p>Create Polarization object from list of Outcars and Structures in order
of nonpolar to polar.</p>
<p>Note, we recommend calculating the ionic dipole moment using calc_ionic
than using the values in Outcar (see module comments). To do this set
calc_ionic_from_zval = True</p>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.analysis.ferroelectricity.polarization.Polarization.get_lattice_quanta">
<span class="sig-name descname"><span class="pre">get_lattice_quanta</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">convert_to_muC_per_cm2</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">all_in_polar</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.1.24/src/pymatgen/core/../analysis/ferroelectricity/polarization.py#L325-L354"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.analysis.ferroelectricity.polarization.Polarization.get_lattice_quanta" title="Link to this definition"></a></dt>
<dd><p>Get the dipole / polarization quanta along a, b, and c for
all structures.</p>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.analysis.ferroelectricity.polarization.Polarization.get_pelecs_and_pions">
<span class="sig-name descname"><span class="pre">get_pelecs_and_pions</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">convert_to_muC_per_cm2</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.1.24/src/pymatgen/core/../analysis/ferroelectricity/polarization.py#L204-L230"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.analysis.ferroelectricity.polarization.Polarization.get_pelecs_and_pions" title="Link to this definition"></a></dt>
<dd><p>Get the electronic and ionic dipole moments / polarizations.</p>
<dl class="simple">
<dt>convert_to_muC_per_cm2: Convert from electron * Angstroms to microCoulomb</dt><dd><p>per centimeter**2</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.analysis.ferroelectricity.polarization.Polarization.get_polarization_change">
<span class="sig-name descname"><span class="pre">get_polarization_change</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">convert_to_muC_per_cm2</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">all_in_polar</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.1.24/src/pymatgen/core/../analysis/ferroelectricity/polarization.py#L356-L363"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.analysis.ferroelectricity.polarization.Polarization.get_polarization_change" title="Link to this definition"></a></dt>
<dd><p>Get difference between nonpolar and polar same branch polarization.</p>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.analysis.ferroelectricity.polarization.Polarization.get_polarization_change_norm">
<span class="sig-name descname"><span class="pre">get_polarization_change_norm</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">convert_to_muC_per_cm2</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">all_in_polar</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.1.24/src/pymatgen/core/../analysis/ferroelectricity/polarization.py#L365-L375"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.analysis.ferroelectricity.polarization.Polarization.get_polarization_change_norm" title="Link to this definition"></a></dt>
<dd><p>Get magnitude of difference between nonpolar and polar same branch
polarization.</p>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.analysis.ferroelectricity.polarization.Polarization.get_same_branch_polarization_data">
<span class="sig-name descname"><span class="pre">get_same_branch_polarization_data</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">convert_to_muC_per_cm2</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">all_in_polar</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.1.24/src/pymatgen/core/../analysis/ferroelectricity/polarization.py#L232-L323"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.analysis.ferroelectricity.polarization.Polarization.get_same_branch_polarization_data" title="Link to this definition"></a></dt>
<dd><p>Get same branch dipole moment (convert_to_muC_per_cm2=False)
or polarization for given polarization data (convert_to_muC_per_cm2=True).</p>
<p>Polarization is a lattice vector, meaning it is only defined modulo the
quantum of polarization:</p>
<blockquote>
<div><p>P = P_0 + \sum_i \frac{n_i e R_i}{\Omega}</p>
</div></blockquote>
<p>where n_i is an integer, e is the charge of the electron in microCoulombs,
R_i is a lattice vector, and \Omega is the unit cell volume in cm**3
(giving polarization units of microCoulomb per centimeter**2).</p>
<p>The quantum of the dipole moment in electron Angstroms (as given by VASP) is:</p>
<blockquote>
<div><p>\sum_i n_i e R_i</p>
</div></blockquote>
<p>where e, the electron charge, is 1 and R_i is a lattice vector, and n_i is an integer.</p>
<p>Given N polarization calculations in order from nonpolar to polar, this algorithm
minimizes the distance between adjacent polarization images. To do this, it
constructs a polarization lattice for each polarization calculation using the
pymatgen.core.structure class and calls the get_nearest_site method to find the
image of a given polarization lattice vector that is closest to the previous polarization
lattice vector image.</p>
<p>Note, using convert_to_muC_per_cm2=True and all_in_polar=True calculates the “proper
polarization” (meaning the change in polarization does not depend on the choice of
polarization branch) while convert_to_muC_per_cm2=True and all_in_polar=False calculates
the “improper polarization” (meaning the change in polarization does depend on the choice
of branch). As one might guess from the names. We recommend calculating the “proper
polarization”.</p>
<dl class="simple">
<dt>convert_to_muC_per_cm2: convert polarization from electron * Angstroms to</dt><dd><p>microCoulomb per centimeter**2</p>
</dd>
</dl>
<p>all_in_polar: convert polarization to be in polar (final structure) polarization lattice</p>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.analysis.ferroelectricity.polarization.Polarization.max_spline_jumps">
<span class="sig-name descname"><span class="pre">max_spline_jumps</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">convert_to_muC_per_cm2</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">all_in_polar</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.1.24/src/pymatgen/core/../analysis/ferroelectricity/polarization.py#L399-L409"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.analysis.ferroelectricity.polarization.Polarization.max_spline_jumps" title="Link to this definition"></a></dt>
<dd><p>Get maximum difference between spline and same branch polarization data.</p>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.analysis.ferroelectricity.polarization.Polarization.same_branch_splines">
<span class="sig-name descname"><span class="pre">same_branch_splines</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">convert_to_muC_per_cm2</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">all_in_polar</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.1.24/src/pymatgen/core/../analysis/ferroelectricity/polarization.py#L377-L397"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.analysis.ferroelectricity.polarization.Polarization.same_branch_splines" title="Link to this definition"></a></dt>
<dd><p>Fit splines to same branch polarization. This is used to assess any jumps
in the same branch polarization.</p>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.analysis.ferroelectricity.polarization.Polarization.smoothness">
<span class="sig-name descname"><span class="pre">smoothness</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">convert_to_muC_per_cm2</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">all_in_polar</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.1.24/src/pymatgen/core/../analysis/ferroelectricity/polarization.py#L411-L424"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.analysis.ferroelectricity.polarization.Polarization.smoothness" title="Link to this definition"></a></dt>
<dd><p>Get rms average difference between spline and same branch polarization data.</p>
</dd></dl>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="pymatgen.analysis.ferroelectricity.polarization.calc_ionic">
<span class="sig-name descname"><span class="pre">calc_ionic</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">site</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="pymatgen.core.html#pymatgen.core.sites.PeriodicSite" title="pymatgen.core.sites.PeriodicSite"><span class="pre">PeriodicSite</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">structure</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="pymatgen.core.html#pymatgen.core.structure.Structure" title="pymatgen.core.structure.Structure"><span class="pre">Structure</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">zval</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">float</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><span class="pre">np.ndarray</span></span></span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.1.24/src/pymatgen/core/../analysis/ferroelectricity/polarization.py#L81-L92"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.analysis.ferroelectricity.polarization.calc_ionic" title="Link to this definition"></a></dt>
<dd><p>Calculate the ionic dipole moment using ZVAL from pseudopotential.</p>
<p>site: PeriodicSite
structure: Structure
zval: Charge value for ion (ZVAL for VASP pseudopotential)</p>
<p>Returns polarization in electron Angstroms.</p>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="pymatgen.analysis.ferroelectricity.polarization.get_nearest_site">
<span class="sig-name descname"><span class="pre">get_nearest_site</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">struct</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="pymatgen.core.html#pymatgen.core.structure.Structure" title="pymatgen.core.structure.Structure"><span class="pre">Structure</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">coords</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Sequence</span><span class="p"><span class="pre">[</span></span><span class="pre">float</span><span class="p"><span class="pre">]</span></span></span></em>, <em class="sig-param"><span class="n"><span class="pre">site</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="pymatgen.core.html#pymatgen.core.sites.PeriodicSite" title="pymatgen.core.sites.PeriodicSite"><span class="pre">PeriodicSite</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">r</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">float</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">None</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.1.24/src/pymatgen/core/../analysis/ferroelectricity/polarization.py#L110-L135"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.analysis.ferroelectricity.polarization.get_nearest_site" title="Link to this definition"></a></dt>
<dd><p>Given coords and a site, find closet site to coords.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>coords</strong> (<em>3x1 array</em>) – Cartesian coords of center of sphere</p></li>
<li><p><strong>site</strong> – site to find closest to coords</p></li>
<li><p><strong>r</strong> (<em>float</em>) – radius of sphere. Defaults to diagonal of unit cell</p></li>
</ul>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>Closest site and distance.</p>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="pymatgen.analysis.ferroelectricity.polarization.get_total_ionic_dipole">
<span class="sig-name descname"><span class="pre">get_total_ionic_dipole</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">structure</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">zval_dict</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.1.24/src/pymatgen/core/../analysis/ferroelectricity/polarization.py#L95-L107"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.analysis.ferroelectricity.polarization.get_total_ionic_dipole" title="Link to this definition"></a></dt>
<dd><p>Get the total ionic dipole moment for a structure.</p>
<p>structure: pymatgen Structure
zval_dict: specie, zval dictionary pairs
center (np.array with shape [3,1]) : dipole center used by VASP
tiny (float) : tolerance for determining boundary of calculation.</p>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="pymatgen.analysis.ferroelectricity.polarization.zval_dict_from_potcar">
<span class="sig-name descname"><span class="pre">zval_dict_from_potcar</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">potcar</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><span class="pre">dict</span><span class="p"><span class="pre">[</span></span><span class="pre">str</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">float</span><span class="p"><span class="pre">]</span></span></span></span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.1.24/src/pymatgen/core/../analysis/ferroelectricity/polarization.py#L72-L78"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.analysis.ferroelectricity.polarization.zval_dict_from_potcar" title="Link to this definition"></a></dt>
<dd><p>Create zval_dictionary for calculating the ionic polarization from
Potcar object.</p>
<p>potcar: Potcar object</p>
</dd></dl>
</section>
</section>
</div>
</div>
<footer>
<hr/>
<div role="contentinfo">
<p>© Copyright 2011, Pymatgen Development Team.</p>
</div>
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</body>
</html>
|