forked from materialsproject/pymatgen
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pymatgen.analysis.surface_analysis.html
1133 lines (1064 loc) · 73.1 KB
/
pymatgen.analysis.surface_analysis.html
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
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<title>pymatgen.analysis.surface_analysis module — pymatgen 2019.5.1 documentation</title>
<link rel="stylesheet" href="_static/proBlue.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<script type="text/javascript" src="_static/language_data.js"></script>
<script async="async" type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>
<link rel="shortcut icon" href="_static/favicon.ico"/>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-33990148-1']);
_gaq.push(['_trackPageview']);
</script>
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">pymatgen 2019.5.1 documentation</a> »</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<div class="section" id="module-pymatgen.analysis.surface_analysis">
<span id="pymatgen-analysis-surface-analysis-module"></span><h1>pymatgen.analysis.surface_analysis module<a class="headerlink" href="#module-pymatgen.analysis.surface_analysis" title="Permalink to this headline">¶</a></h1>
<dl class="class">
<dt id="pymatgen.analysis.surface_analysis.NanoscaleStability">
<em class="property">class </em><code class="descname">NanoscaleStability</code><span class="sig-paren">(</span><em>se_analyzers</em>, <em>symprec=1e-05</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/analysis/surface_analysis.html#NanoscaleStability"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.analysis.surface_analysis.NanoscaleStability" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
<dl>
<dt>A class for analyzing the stability of nanoparticles of different</dt><dd><p>polymorphs with respect to size. The Wulff shape will be the
model for the nanoparticle. Stability will be determined by
an energetic competition between the weighted surface energy
(surface energy of the Wulff shape) and the bulk energy. A
future release will include a 2D phase diagram (e.g. wrt size
vs chempot for adsorbed or nonstoichiometric surfaces). Based
on the following work:</p>
<dl class="simple">
<dt>Kang, S., Mo, Y., Ong, S. P., & Ceder, G. (2014). Nanoscale</dt><dd><p>stabilization of sodium oxides: Implications for Na-O2
batteries. Nano Letters, 14(2), 1016–1020.
<a class="reference external" href="https://doi.org/10.1021/nl404557w">https://doi.org/10.1021/nl404557w</a></p>
</dd>
</dl>
</dd>
</dl>
<dl class="attribute">
<dt id="pymatgen.analysis.surface_analysis.NanoscaleStability.se_analyzers">
<code class="descname">se_analyzers</code><a class="headerlink" href="#pymatgen.analysis.surface_analysis.NanoscaleStability.se_analyzers" title="Permalink to this definition">¶</a></dt>
<dd><dl class="simple">
<dt>List of SurfaceEnergyPlotter objects. Each item corresponds to a</dt><dd><p>different polymorph.</p>
</dd>
</dl>
</dd></dl>
<dl class="attribute">
<dt id="pymatgen.analysis.surface_analysis.NanoscaleStability.symprec">
<code class="descname">symprec</code><a class="headerlink" href="#pymatgen.analysis.surface_analysis.NanoscaleStability.symprec" title="Permalink to this definition">¶</a></dt>
<dd><p>See WulffShape.</p>
</dd></dl>
<p>Analyzes the nanoscale stability of different polymorphs.</p>
<dl class="method">
<dt id="pymatgen.analysis.surface_analysis.NanoscaleStability.bulk_gform">
<code class="descname">bulk_gform</code><span class="sig-paren">(</span><em>bulk_entry</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/analysis/surface_analysis.html#NanoscaleStability.bulk_gform"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.analysis.surface_analysis.NanoscaleStability.bulk_gform" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the formation energy of the bulk
:param bulk_entry: Entry of the corresponding bulk.
:type bulk_entry: ComputedStructureEntry</p>
</dd></dl>
<dl class="method">
<dt id="pymatgen.analysis.surface_analysis.NanoscaleStability.plot_all_stability_map">
<code class="descname">plot_all_stability_map</code><span class="sig-paren">(</span><em>max_r</em>, <em>increments=50</em>, <em>delu_dict=None</em>, <em>delu_default=0</em>, <em>plt=None</em>, <em>labels=None</em>, <em>from_sphere_area=False</em>, <em>e_units='keV'</em>, <em>r_units='nanometers'</em>, <em>normalize=False</em>, <em>scale_per_atom=False</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/analysis/surface_analysis.html#NanoscaleStability.plot_all_stability_map"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.analysis.surface_analysis.NanoscaleStability.plot_all_stability_map" title="Permalink to this definition">¶</a></dt>
<dd><dl class="simple">
<dt>Returns the plot of the formation energy of a particles</dt><dd><p>of different polymorphs against its effect radius</p>
</dd>
</dl>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>max_r</strong> (<em>float</em>) – The maximum radius of the particle to plot up to.</p></li>
<li><p><strong>increments</strong> (<em>int</em>) – Number of plot points</p></li>
<li><p><strong>delu_dict</strong> (<em>Dict</em>) – Dictionary of the chemical potentials to be set as
constant. Note the key should be a sympy Symbol object of the
format: Symbol(“delu_el”) where el is the name of the element.</p></li>
<li><p><strong>delu_default</strong> (<em>float</em>) – Default value for all unset chemical potentials</p></li>
<li><p><strong>plt</strong> (<em>pylab</em>) – Plot</p></li>
<li><p><strong>labels</strong> (<em>list</em>) – List of labels for each plot, corresponds to the
list of se_analyzers</p></li>
<li><p><strong>from_sphere_area</strong> (<em>bool</em>) – There are two ways to calculate the bulk
formation energy. Either by treating the volume and thus surface
area of the particle as a perfect sphere, or as a Wulff shape.</p></li>
</ul>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="pymatgen.analysis.surface_analysis.NanoscaleStability.plot_one_stability_map">
<code class="descname">plot_one_stability_map</code><span class="sig-paren">(</span><em>analyzer</em>, <em>max_r</em>, <em>delu_dict=None</em>, <em>label=''</em>, <em>increments=50</em>, <em>delu_default=0</em>, <em>plt=None</em>, <em>from_sphere_area=False</em>, <em>e_units='keV'</em>, <em>r_units='nanometers'</em>, <em>normalize=False</em>, <em>scale_per_atom=False</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/analysis/surface_analysis.html#NanoscaleStability.plot_one_stability_map"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.analysis.surface_analysis.NanoscaleStability.plot_one_stability_map" title="Permalink to this definition">¶</a></dt>
<dd><dl class="simple">
<dt>Returns the plot of the formation energy of a particle against its</dt><dd><p>effect radius</p>
</dd>
</dl>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>analyzer</strong> (<a class="reference internal" href="#pymatgen.analysis.surface_analysis.SurfaceEnergyPlotter" title="pymatgen.analysis.surface_analysis.SurfaceEnergyPlotter"><em>SurfaceEnergyPlotter</em></a>) – Analyzer associated with the
first polymorph</p></li>
<li><p><strong>max_r</strong> (<em>float</em>) – The maximum radius of the particle to plot up to.</p></li>
<li><p><strong>delu_dict</strong> (<em>Dict</em>) – Dictionary of the chemical potentials to be set as
constant. Note the key should be a sympy Symbol object of the
format: Symbol(“delu_el”) where el is the name of the element.</p></li>
<li><p><strong>label</strong> (<em>str</em>) – Label of the plot for legend</p></li>
<li><p><strong>increments</strong> (<em>int</em>) – Number of plot points</p></li>
<li><p><strong>delu_default</strong> (<em>float</em>) – Default value for all unset chemical potentials</p></li>
<li><p><strong>plt</strong> (<em>pylab</em>) – Plot</p></li>
<li><p><strong>from_sphere_area</strong> (<em>bool</em>) – There are two ways to calculate the bulk
formation energy. Either by treating the volume and thus surface
area of the particle as a perfect sphere, or as a Wulff shape.</p></li>
<li><p><strong>r_units</strong> (<em>str</em>) – Can be nanometers or Angstrom</p></li>
<li><p><strong>e_units</strong> (<em>str</em>) – Can be keV or eV</p></li>
<li><p><strong>normalize</strong> (<em>str</em>) – Whether or not to normalize energy by volume</p></li>
</ul>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="pymatgen.analysis.surface_analysis.NanoscaleStability.scaled_wulff">
<code class="descname">scaled_wulff</code><span class="sig-paren">(</span><em>wulffshape</em>, <em>r</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/analysis/surface_analysis.html#NanoscaleStability.scaled_wulff"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.analysis.surface_analysis.NanoscaleStability.scaled_wulff" title="Permalink to this definition">¶</a></dt>
<dd><dl class="simple">
<dt>Scales the Wulff shape with an effective radius r. Note that the resulting</dt><dd><p>Wulff does not neccesarily have the same effective radius as the one
provided. The Wulff shape is scaled by its surface energies where first
the surface energies are scale by the minimum surface energy and then
multiplied by the given effective radius.</p>
</dd>
</dl>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>wulffshape</strong> (<a class="reference internal" href="pymatgen.analysis.wulff.html#pymatgen.analysis.wulff.WulffShape" title="pymatgen.analysis.wulff.WulffShape"><em>WulffShape</em></a>) – Initial, unscaled WulffShape</p></li>
<li><p><strong>r</strong> (<em>float</em>) – Arbitrary effective radius of the WulffShape</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>WulffShape (scaled by r)</p>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="pymatgen.analysis.surface_analysis.NanoscaleStability.solve_equilibrium_point">
<code class="descname">solve_equilibrium_point</code><span class="sig-paren">(</span><em>analyzer1</em>, <em>analyzer2</em>, <em>delu_dict={}</em>, <em>delu_default=0</em>, <em>units='nanometers'</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/analysis/surface_analysis.html#NanoscaleStability.solve_equilibrium_point"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.analysis.surface_analysis.NanoscaleStability.solve_equilibrium_point" title="Permalink to this definition">¶</a></dt>
<dd><dl class="simple">
<dt>Gives the radial size of two particles where equilibrium is reached</dt><dd><p>between both particles. NOTE: the solution here is not the same
as the solution visualized in the plot because solving for r
requires that both the total surface area and volume of the
particles are functions of r.</p>
</dd>
</dl>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>analyzer1</strong> (<a class="reference internal" href="#pymatgen.analysis.surface_analysis.SurfaceEnergyPlotter" title="pymatgen.analysis.surface_analysis.SurfaceEnergyPlotter"><em>SurfaceEnergyPlotter</em></a>) – Analyzer associated with the
first polymorph</p></li>
<li><p><strong>analyzer2</strong> (<a class="reference internal" href="#pymatgen.analysis.surface_analysis.SurfaceEnergyPlotter" title="pymatgen.analysis.surface_analysis.SurfaceEnergyPlotter"><em>SurfaceEnergyPlotter</em></a>) – Analyzer associated with the
second polymorph</p></li>
<li><p><strong>delu_dict</strong> (<em>Dict</em>) – Dictionary of the chemical potentials to be set as
constant. Note the key should be a sympy Symbol object of the
format: Symbol(“delu_el”) where el is the name of the element.</p></li>
<li><p><strong>delu_default</strong> (<em>float</em>) – Default value for all unset chemical potentials</p></li>
<li><p><strong>units</strong> (<em>str</em>) – Can be nanometers or Angstrom</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>Particle radius in nm</p>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="pymatgen.analysis.surface_analysis.NanoscaleStability.wulff_gform_and_r">
<code class="descname">wulff_gform_and_r</code><span class="sig-paren">(</span><em>wulffshape</em>, <em>bulk_entry</em>, <em>r</em>, <em>from_sphere_area=False</em>, <em>r_units='nanometers'</em>, <em>e_units='keV'</em>, <em>normalize=False</em>, <em>scale_per_atom=False</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/analysis/surface_analysis.html#NanoscaleStability.wulff_gform_and_r"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.analysis.surface_analysis.NanoscaleStability.wulff_gform_and_r" title="Permalink to this definition">¶</a></dt>
<dd><p>Calculates the formation energy of the particle with arbitrary radius r.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>wulffshape</strong> (<a class="reference internal" href="pymatgen.analysis.wulff.html#pymatgen.analysis.wulff.WulffShape" title="pymatgen.analysis.wulff.WulffShape"><em>WulffShape</em></a>) – Initial, unscaled WulffShape</p></li>
<li><p><strong>bulk_entry</strong> (<a class="reference internal" href="pymatgen.entries.computed_entries.html#pymatgen.entries.computed_entries.ComputedStructureEntry" title="pymatgen.entries.computed_entries.ComputedStructureEntry"><em>ComputedStructureEntry</em></a>) – Entry of the corresponding bulk.</p></li>
<li><p><strong>r</strong> (<em>float</em><em> (</em><em>Ang</em><em>)</em>) – Arbitrary effective radius of the WulffShape</p></li>
<li><p><strong>from_sphere_area</strong> (<em>bool</em>) – There are two ways to calculate the bulk
formation energy. Either by treating the volume and thus surface
area of the particle as a perfect sphere, or as a Wulff shape.</p></li>
<li><p><strong>r_units</strong> (<em>str</em>) – Can be nanometers or Angstrom</p></li>
<li><p><strong>e_units</strong> (<em>str</em>) – Can be keV or eV</p></li>
<li><p><strong>normalize</strong> (<em>bool</em>) – Whether or not to normalize energy by volume</p></li>
<li><p><strong>scale_per_atom</strong> (<em>True</em>) – Whether or not to normalize by number of
atoms in the particle</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>particle formation energy (float in keV), effective radius</p>
</dd>
</dl>
</dd></dl>
</dd></dl>
<dl class="class">
<dt id="pymatgen.analysis.surface_analysis.SlabEntry">
<em class="property">class </em><code class="descname">SlabEntry</code><span class="sig-paren">(</span><em>structure</em>, <em>energy</em>, <em>miller_index</em>, <em>correction=0.0</em>, <em>parameters=None</em>, <em>data=None</em>, <em>entry_id=None</em>, <em>label=None</em>, <em>adsorbates=None</em>, <em>clean_entry=None</em>, <em>marker=None</em>, <em>color=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/analysis/surface_analysis.html#SlabEntry"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.analysis.surface_analysis.SlabEntry" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="pymatgen.entries.computed_entries.html#pymatgen.entries.computed_entries.ComputedStructureEntry" title="pymatgen.entries.computed_entries.ComputedStructureEntry"><code class="xref py py-class docutils literal notranslate"><span class="pre">pymatgen.entries.computed_entries.ComputedStructureEntry</span></code></a></p>
<dl class="simple">
<dt>A ComputedStructureEntry object encompassing all data relevant to a</dt><dd><p>slab for analyzing surface thermodynamics.</p>
</dd>
</dl>
<dl class="attribute">
<dt id="pymatgen.analysis.surface_analysis.SlabEntry.miller_index">
<code class="descname">miller_index</code><a class="headerlink" href="#pymatgen.analysis.surface_analysis.SlabEntry.miller_index" title="Permalink to this definition">¶</a></dt>
<dd><p>Miller index of plane parallel to surface.</p>
</dd></dl>
<dl class="attribute">
<dt id="pymatgen.analysis.surface_analysis.SlabEntry.label">
<code class="descname">label</code><a class="headerlink" href="#pymatgen.analysis.surface_analysis.SlabEntry.label" title="Permalink to this definition">¶</a></dt>
<dd><p>Brief description for this slab.</p>
</dd></dl>
<dl class="attribute">
<dt id="pymatgen.analysis.surface_analysis.SlabEntry.adsorbates">
<code class="descname">adsorbates</code><a class="headerlink" href="#pymatgen.analysis.surface_analysis.SlabEntry.adsorbates" title="Permalink to this definition">¶</a></dt>
<dd><p>List of ComputedStructureEntry for the types of adsorbates</p>
</dd></dl>
<p>..attribute:: clean_entry</p>
<blockquote>
<div><p>SlabEntry for the corresponding clean slab for an adsorbed slab</p>
</div></blockquote>
<p>..attribute:: ads_entries_dict</p>
<blockquote>
<div><dl class="simple">
<dt>Dictionary where the key is the reduced composition of the</dt><dd><p>adsorbate entry and value is the entry itself</p>
</dd>
</dl>
</div></blockquote>
<p>Make a SlabEntry containing all relevant surface thermodynamics data.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>structure</strong> (<a class="reference internal" href="pymatgen.core.surface.html#pymatgen.core.surface.Slab" title="pymatgen.core.surface.Slab"><em>Slab</em></a>) – The primary slab associated with this entry.</p></li>
<li><p><strong>energy</strong> (<em>float</em>) – Energy from total energy calculation</p></li>
<li><p><strong>miller_index</strong> (<em>tuple</em><em>(</em><em>h</em><em>, </em><em>k</em><em>, </em><em>l</em><em>)</em>) – Miller index of plane parallel
to surface</p></li>
<li><p><strong>correction</strong> (<em>float</em>) – See ComputedSlabEntry</p></li>
<li><p><strong>parameters</strong> (<em>dict</em>) – See ComputedSlabEntry</p></li>
<li><p><strong>data</strong> (<em>dict</em>) – See ComputedSlabEntry</p></li>
<li><p><strong>entry_id</strong> (<em>str</em>) – See ComputedSlabEntry</p></li>
<li><p><strong>data</strong> – See ComputedSlabEntry</p></li>
<li><p><strong>entry_id</strong> – See ComputedSlabEntry</p></li>
<li><p><strong>label</strong> (<em>str</em>) – Any particular label for this slab, e.g. “Tasker 2”,
“non-stoichiometric”, “reconstructed”</p></li>
<li><p><strong>adsorbates</strong> (<em>[</em><a class="reference internal" href="pymatgen.entries.computed_entries.html#pymatgen.entries.computed_entries.ComputedStructureEntry" title="pymatgen.entries.computed_entries.ComputedStructureEntry"><em>ComputedStructureEntry</em></a><em>]</em>) – List of reference entries
for the adsorbates on the slab, can be an isolated molecule
(e.g. O2 for O or O2 adsorption), a bulk structure (eg. fcc
Cu for Cu adsorption) or anything.</p></li>
<li><p><strong>clean_entry</strong> (<a class="reference internal" href="pymatgen.entries.computed_entries.html#pymatgen.entries.computed_entries.ComputedStructureEntry" title="pymatgen.entries.computed_entries.ComputedStructureEntry"><em>ComputedStructureEntry</em></a>) – If the SlabEntry is for an
adsorbed slab, this is the corresponding SlabEntry for the
clean slab</p></li>
<li><p><strong>marker</strong> (<em>str</em>) – Custom marker for gamma plots (“–” and “-” are typical)</p></li>
<li><p><strong>color</strong> (<em>str</em><em> or </em><em>rgba</em>) – Custom color for gamma plots</p></li>
</ul>
</dd>
</dl>
<dl class="attribute">
<dt id="pymatgen.analysis.surface_analysis.SlabEntry.Nads_in_slab">
<code class="descname">Nads_in_slab</code><a class="headerlink" href="#pymatgen.analysis.surface_analysis.SlabEntry.Nads_in_slab" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the TOTAL number of adsorbates in the slab on BOTH sides</p>
</dd></dl>
<dl class="attribute">
<dt id="pymatgen.analysis.surface_analysis.SlabEntry.Nsurfs_ads_in_slab">
<code class="descname">Nsurfs_ads_in_slab</code><a class="headerlink" href="#pymatgen.analysis.surface_analysis.SlabEntry.Nsurfs_ads_in_slab" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the TOTAL number of adsorbed surfaces in the slab</p>
</dd></dl>
<dl class="method">
<dt id="pymatgen.analysis.surface_analysis.SlabEntry.as_dict">
<code class="descname">as_dict</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/analysis/surface_analysis.html#SlabEntry.as_dict"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.analysis.surface_analysis.SlabEntry.as_dict" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns dict which contains Slab Entry data.</p>
</dd></dl>
<dl class="attribute">
<dt id="pymatgen.analysis.surface_analysis.SlabEntry.cleaned_up_slab">
<code class="descname">cleaned_up_slab</code><a class="headerlink" href="#pymatgen.analysis.surface_analysis.SlabEntry.cleaned_up_slab" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns a slab with the adsorbates removed</p>
</dd></dl>
<dl class="attribute">
<dt id="pymatgen.analysis.surface_analysis.SlabEntry.create_slab_label">
<code class="descname">create_slab_label</code><a class="headerlink" href="#pymatgen.analysis.surface_analysis.SlabEntry.create_slab_label" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns a label (str) for this particular slab based
on composition, coverage and Miller index.</p>
</dd></dl>
<dl class="staticmethod">
<dt id="pymatgen.analysis.surface_analysis.SlabEntry.from_computed_structure_entry">
<em class="property">static </em><code class="descname">from_computed_structure_entry</code><span class="sig-paren">(</span><em>entry</em>, <em>miller_index</em>, <em>label=None</em>, <em>adsorbates=None</em>, <em>clean_entry=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/analysis/surface_analysis.html#SlabEntry.from_computed_structure_entry"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.analysis.surface_analysis.SlabEntry.from_computed_structure_entry" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns SlabEntry from a ComputedStructureEntry</p>
</dd></dl>
<dl class="classmethod">
<dt id="pymatgen.analysis.surface_analysis.SlabEntry.from_dict">
<em class="property">classmethod </em><code class="descname">from_dict</code><span class="sig-paren">(</span><em>d</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/analysis/surface_analysis.html#SlabEntry.from_dict"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.analysis.surface_analysis.SlabEntry.from_dict" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns a SlabEntry by reading in an dictionary</p>
</dd></dl>
<dl class="attribute">
<dt id="pymatgen.analysis.surface_analysis.SlabEntry.get_monolayer">
<code class="descname">get_monolayer</code><a class="headerlink" href="#pymatgen.analysis.surface_analysis.SlabEntry.get_monolayer" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the primitive unit surface area density of the
adsorbate.</p>
</dd></dl>
<dl class="attribute">
<dt id="pymatgen.analysis.surface_analysis.SlabEntry.get_unit_primitive_area">
<code class="descname">get_unit_primitive_area</code><a class="headerlink" href="#pymatgen.analysis.surface_analysis.SlabEntry.get_unit_primitive_area" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the surface area of the adsorbed system per
unit area of the primitive slab system.</p>
</dd></dl>
<dl class="method">
<dt id="pymatgen.analysis.surface_analysis.SlabEntry.gibbs_binding_energy">
<code class="descname">gibbs_binding_energy</code><span class="sig-paren">(</span><em>eads=False</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/analysis/surface_analysis.html#SlabEntry.gibbs_binding_energy"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.analysis.surface_analysis.SlabEntry.gibbs_binding_energy" title="Permalink to this definition">¶</a></dt>
<dd><dl class="simple">
<dt>Returns the adsorption energy or Gibb’s binding energy</dt><dd><p>of an adsorbate on a surface</p>
</dd>
</dl>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>eads</strong> (<em>bool</em>) – Whether to calculate the adsorption energy
(True) or the binding energy (False) which is just
adsorption energy normalized by number of adsorbates.</p>
</dd>
</dl>
</dd></dl>
<dl class="attribute">
<dt id="pymatgen.analysis.surface_analysis.SlabEntry.surface_area">
<code class="descname">surface_area</code><a class="headerlink" href="#pymatgen.analysis.surface_analysis.SlabEntry.surface_area" title="Permalink to this definition">¶</a></dt>
<dd><p>Calculates the surface area of the slab</p>
</dd></dl>
<dl class="method">
<dt id="pymatgen.analysis.surface_analysis.SlabEntry.surface_energy">
<code class="descname">surface_energy</code><span class="sig-paren">(</span><em>ucell_entry</em>, <em>ref_entries=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/analysis/surface_analysis.html#SlabEntry.surface_energy"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.analysis.surface_analysis.SlabEntry.surface_energy" title="Permalink to this definition">¶</a></dt>
<dd><p>Calculates the surface energy of this SlabEntry.
:param ucell_entry: An entry object for the bulk
:type ucell_entry: entry
:param ref_entries (list: [entry]): A list of entries for each type</p>
<blockquote>
<div><p>of element to be used as a reservoir for nonstoichiometric
systems. The length of this list MUST be n-1 where n is the
number of different elements in the bulk entry. The chempot
of the element ref_entry that is not in the list will be
treated as a variable.</p>
</div></blockquote>
<p>Returns (Add (Sympy class)): Surface energy</p>
</dd></dl>
</dd></dl>
<dl class="class">
<dt id="pymatgen.analysis.surface_analysis.SurfaceEnergyPlotter">
<em class="property">class </em><code class="descname">SurfaceEnergyPlotter</code><span class="sig-paren">(</span><em>all_slab_entries</em>, <em>ucell_entry</em>, <em>ref_entries=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/analysis/surface_analysis.html#SurfaceEnergyPlotter"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.analysis.surface_analysis.SurfaceEnergyPlotter" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
<dl class="simple">
<dt>A class used for generating plots to analyze the thermodynamics of surfaces</dt><dd><p>of a material. Produces stability maps of different slab configurations,
phases diagrams of two parameters to determine stability of configurations
(future release), and Wulff shapes.</p>
</dd>
</dl>
<dl class="attribute">
<dt id="pymatgen.analysis.surface_analysis.SurfaceEnergyPlotter.all_slab_entries">
<code class="descname">all_slab_entries</code><a class="headerlink" href="#pymatgen.analysis.surface_analysis.SurfaceEnergyPlotter.all_slab_entries" title="Permalink to this definition">¶</a></dt>
<dd><dl>
<dt>Either a list of SlabEntry objects (note for a list, the SlabEntry must</dt><dd><p>have the adsorbates and clean_entry parameter pulgged in) or a Nested
dictionary containing a list of entries for slab calculations as
items and the corresponding Miller index of the slab as the key.
To account for adsorption, each value is a sub-dictionary with the
entry of a clean slab calculation as the sub-key and a list of
entries for adsorption calculations as the sub-value. The sub-value
can contain different adsorption configurations such as a different
site or a different coverage, however, ordinarily only the most stable
configuration for a particular coverage will be considered as the
function of the adsorbed surface energy has an intercept dependent on
the adsorption energy (ie an adsorption site with a higher adsorption
energy will always provide a higher surface energy than a site with a
lower adsorption energy). An example parameter is provided:
{(h1,k1,l1): {clean_entry1: [ads_entry1, ads_entry2, …],</p>
<blockquote>
<div><p>clean_entry2: […], …}, (h2,k2,l2): {…}}</p>
</div></blockquote>
<p>where clean_entry1 can be a pristine surface and clean_entry2 can be a
reconstructed surface while ads_entry1 can be adsorption at site 1 with
a 2x2 coverage while ads_entry2 can have a 3x3 coverage. If adsorption
entries are present (i.e. if all_slab_entries[(h,k,l)][clean_entry1]), we
consider adsorption in all plots and analysis for this particular facet.</p>
</dd>
</dl>
</dd></dl>
<p>..attribute:: color_dict</p>
<blockquote>
<div><dl class="simple">
<dt>Dictionary of colors (r,g,b,a) when plotting surface energy stability. The</dt><dd><p>keys are individual surface entries where clean surfaces have a solid
color while the corresponding adsorbed surface will be transparent.</p>
</dd>
</dl>
</div></blockquote>
<dl class="attribute">
<dt id="pymatgen.analysis.surface_analysis.SurfaceEnergyPlotter.ucell_entry">
<code class="descname">ucell_entry</code><a class="headerlink" href="#pymatgen.analysis.surface_analysis.SurfaceEnergyPlotter.ucell_entry" title="Permalink to this definition">¶</a></dt>
<dd><p>ComputedStructureEntry of the bulk reference for this particular material.</p>
</dd></dl>
<dl class="attribute">
<dt id="pymatgen.analysis.surface_analysis.SurfaceEnergyPlotter.ref_entries">
<code class="descname">ref_entries</code><a class="headerlink" href="#pymatgen.analysis.surface_analysis.SurfaceEnergyPlotter.ref_entries" title="Permalink to this definition">¶</a></dt>
<dd><p>List of ComputedStructureEntries to be used for calculating chemical potential.</p>
</dd></dl>
<dl class="attribute">
<dt id="pymatgen.analysis.surface_analysis.SurfaceEnergyPlotter.color_dict">
<code class="descname">color_dict</code><a class="headerlink" href="#pymatgen.analysis.surface_analysis.SurfaceEnergyPlotter.color_dict" title="Permalink to this definition">¶</a></dt>
<dd><p>Randomly generated dictionary of colors associated with each facet.</p>
</dd></dl>
<dl class="simple">
<dt>Object for plotting surface energy in different ways for clean and</dt><dd><p>adsorbed surfaces.</p>
</dd>
</dl>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>all_slab_entries</strong> (<em>dict</em><em> or </em><em>list</em>) – Dictionary or list containing
all entries for slab calculations. See attributes.</p></li>
<li><p><strong>ucell_entry</strong> (<a class="reference internal" href="pymatgen.entries.computed_entries.html#pymatgen.entries.computed_entries.ComputedStructureEntry" title="pymatgen.entries.computed_entries.ComputedStructureEntry"><em>ComputedStructureEntry</em></a>) – ComputedStructureEntry
of the bulk reference for this particular material.</p></li>
<li><p><strong>ref_entries</strong> (<em>[</em><em>ComputedStructureEntries</em><em>]</em>) – A list of entries for
each type of element to be used as a reservoir for
nonstoichiometric systems. The length of this list MUST be
n-1 where n is the number of different elements in the bulk
entry. The bulk energy term in the grand surface potential can
be defined by a summation of the chemical potentials for each
element in the system. As the bulk energy is already provided,
one can solve for one of the chemical potentials as a function
of the other chemical potetinals and bulk energy. i.e. there
are n-1 variables (chempots). e.g. if your ucell_entry is for
LiFePO4 than your ref_entries should have an entry for Li, Fe,
and P if you want to use the chempot of O as the variable.</p></li>
</ul>
</dd>
</dl>
<dl class="method">
<dt id="pymatgen.analysis.surface_analysis.SurfaceEnergyPlotter.BE_vs_clean_SE">
<code class="descname">BE_vs_clean_SE</code><span class="sig-paren">(</span><em>delu_dict</em>, <em>delu_default=0</em>, <em>plot_eads=False</em>, <em>annotate_monolayer=True</em>, <em>JPERM2=False</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/analysis/surface_analysis.html#SurfaceEnergyPlotter.BE_vs_clean_SE"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.analysis.surface_analysis.SurfaceEnergyPlotter.BE_vs_clean_SE" title="Permalink to this definition">¶</a></dt>
<dd><dl class="simple">
<dt>For each facet, plot the clean surface energy against the most</dt><dd><p>stable binding energy.</p>
</dd>
</dl>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>delu_dict</strong> (<em>Dict</em>) – Dictionary of the chemical potentials to be set as
constant. Note the key should be a sympy Symbol object of the
format: Symbol(“delu_el”) where el is the name of the element.</p></li>
<li><p><strong>delu_default</strong> (<em>float</em>) – Default value for all unset chemical potentials</p></li>
<li><p><strong>plot_eads</strong> (<em>bool</em>) – Option to plot the adsorption energy (binding
energy multiplied by number of adsorbates) instead.</p></li>
<li><p><strong>annotate_monolayer</strong> (<em>bool</em>) – Whether or not to label each data point
with its monolayer (adsorbate density per unit primiitve area)</p></li>
<li><p><strong>JPERM2</strong> (<em>bool</em>) – Whether to plot surface energy in /m^2 (True) or
eV/A^2 (False)</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p><dl class="simple">
<dt>Plot of clean surface energy vs binding energy for</dt><dd><p>all facets.</p>
</dd>
</dl>
</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>(Plot)</p>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="pymatgen.analysis.surface_analysis.SurfaceEnergyPlotter.area_frac_vs_chempot_plot">
<code class="descname">area_frac_vs_chempot_plot</code><span class="sig-paren">(</span><em>ref_delu</em>, <em>chempot_range</em>, <em>delu_dict=None</em>, <em>delu_default=0</em>, <em>increments=10</em>, <em>no_clean=False</em>, <em>no_doped=False</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/analysis/surface_analysis.html#SurfaceEnergyPlotter.area_frac_vs_chempot_plot"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.analysis.surface_analysis.SurfaceEnergyPlotter.area_frac_vs_chempot_plot" title="Permalink to this definition">¶</a></dt>
<dd><p>1D plot. Plots the change in the area contribution
of each facet as a function of chemical potential.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>ref_delu</strong> (<em>sympy Symbol</em>) – The free variable chempot with the format:
Symbol(“delu_el”) where el is the name of the element.</p></li>
<li><p><strong>chempot_range</strong> (<em>list</em>) – Min/max range of chemical potential to plot along</p></li>
<li><p><strong>delu_dict</strong> (<em>Dict</em>) – Dictionary of the chemical potentials to be set as
constant. Note the key should be a sympy Symbol object of the
format: Symbol(“delu_el”) where el is the name of the element.</p></li>
<li><p><strong>delu_default</strong> (<em>float</em>) – Default value for all unset chemical potentials</p></li>
<li><p><strong>increments</strong> (<em>int</em>) – Number of data points between min/max or point
of intersection. Defaults to 10 points.</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p><dl class="simple">
<dt>Plot of area frac on the Wulff shape</dt><dd><p>for each facet vs chemical potential.</p>
</dd>
</dl>
</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>(Pylab)</p>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="pymatgen.analysis.surface_analysis.SurfaceEnergyPlotter.chempot_plot_addons">
<code class="descname">chempot_plot_addons</code><span class="sig-paren">(</span><em>plt, xrange, ref_el, axes, pad=2.4, rect=[-0.047, 0, 0.84, 1], ylim=[]</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/analysis/surface_analysis.html#SurfaceEnergyPlotter.chempot_plot_addons"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.analysis.surface_analysis.SurfaceEnergyPlotter.chempot_plot_addons" title="Permalink to this definition">¶</a></dt>
<dd><p>Helper function to a chempot plot look nicer.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>plt</strong> (<em>Plot</em>) – </p></li>
<li><p><strong>xrange</strong> (<em>list</em>) – xlim parameter</p></li>
<li><p><strong>ref_el</strong> (<em>str</em>) – Element of the referenced chempot.</p></li>
<li><p><strong>axes</strong> (<em>axes</em>) – </p></li>
<li><p><strong>pad</strong> (<em>float</em>) – </p></li>
<li><p><strong>rect</strong> (<em>list</em>) – For tight layout</p></li>
<li><p><strong>ylim</strong> (<em>ylim parameter</em>) – </p></li>
</ul>
</dd>
</dl>
<p>return (Plot): Modified plot with addons.
return (Plot): Modified plot with addons.</p>
</dd></dl>
<dl class="method">
<dt id="pymatgen.analysis.surface_analysis.SurfaceEnergyPlotter.chempot_vs_gamma">
<code class="descname">chempot_vs_gamma</code><span class="sig-paren">(</span><em>ref_delu</em>, <em>chempot_range</em>, <em>miller_index=()</em>, <em>delu_dict={}</em>, <em>delu_default=0</em>, <em>JPERM2=False</em>, <em>show_unstable=False</em>, <em>ylim=[]</em>, <em>plt=None</em>, <em>no_clean=False</em>, <em>no_doped=False</em>, <em>use_entry_labels=False</em>, <em>no_label=False</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/analysis/surface_analysis.html#SurfaceEnergyPlotter.chempot_vs_gamma"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.analysis.surface_analysis.SurfaceEnergyPlotter.chempot_vs_gamma" title="Permalink to this definition">¶</a></dt>
<dd><dl class="simple">
<dt>Plots the surface energy as a function of chemical potential.</dt><dd><p>Each facet will be associated with its own distinct colors.
Dashed lines will represent stoichiometries different from that
of the mpid’s compound. Transparent lines indicates adsorption.</p>
</dd>
</dl>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>ref_delu</strong> (<em>sympy Symbol</em>) – The range stability of each slab is based
on the chempot range of this chempot. Should be a sympy Symbol
object of the format: Symbol(“delu_el”) where el is the name of
the element</p></li>
<li><p><strong>chempot_range</strong> (<em>[</em><em>max_chempot</em><em>, </em><em>min_chempot</em><em>]</em>) – Range to consider the
stability of the slabs.</p></li>
<li><p><strong>miller_index</strong> (<em>list</em>) – Miller index for a specific facet to get a
dictionary for.</p></li>
<li><p><strong>delu_dict</strong> (<em>Dict</em>) – Dictionary of the chemical potentials to be set as
constant. Note the key should be a sympy Symbol object of the
format: Symbol(“delu_el”) where el is the name of the element.</p></li>
<li><p><strong>delu_default</strong> (<em>float</em>) – Default value for all unset chemical potentials</p></li>
<li><p><strong>JPERM2</strong> (<em>bool</em>) – Whether to plot surface energy in /m^2 (True) or
eV/A^2 (False)</p></li>
<li><p><strong>show_unstable</strong> (<em>bool</em>) – Whether or not to show parts of the surface
energy plot outside the region of stability.</p></li>
<li><p><strong>ylim</strong> (<em>[</em><em>ymax</em><em>, </em><em>ymin</em><em>]</em>) – Range of y axis</p></li>
<li><p><strong>no_doped</strong> (<em>bool</em>) – Whether to plot for the clean slabs only.</p></li>
<li><p><strong>no_clean</strong> (<em>bool</em>) – Whether to plot for the doped slabs only.</p></li>
<li><p><strong>use_entry_labels</strong> (<em>bool</em>) – If True, will label each slab configuration
according to their given label in the SlabEntry object.</p></li>
<li><p><strong>no_label</strong> (<em>bool</em>) – Option to turn off labels.</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>Plot of surface energy vs chempot for all entries.</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>(Plot)</p>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="pymatgen.analysis.surface_analysis.SurfaceEnergyPlotter.chempot_vs_gamma_plot_one">
<code class="descname">chempot_vs_gamma_plot_one</code><span class="sig-paren">(</span><em>plt</em>, <em>entry</em>, <em>ref_delu</em>, <em>chempot_range</em>, <em>delu_dict={}</em>, <em>delu_default=0</em>, <em>label=''</em>, <em>JPERM2=False</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/analysis/surface_analysis.html#SurfaceEnergyPlotter.chempot_vs_gamma_plot_one"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.analysis.surface_analysis.SurfaceEnergyPlotter.chempot_vs_gamma_plot_one" title="Permalink to this definition">¶</a></dt>
<dd><p>Helper function to help plot the surface energy of a
single SlabEntry as a function of chemical potential.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>plt</strong> (<em>Plot</em>) – A plot.</p></li>
<li><p><strong>entry</strong> (<a class="reference internal" href="#pymatgen.analysis.surface_analysis.SlabEntry" title="pymatgen.analysis.surface_analysis.SlabEntry"><em>SlabEntry</em></a>) – Entry of the slab whose surface energy we want
to plot</p></li>
<li><p><strong>ref_delu</strong> (<em>sympy Symbol</em>) – The range stability of each slab is based
on the chempot range of this chempot. Should be a sympy Symbol
object of the format: Symbol(“delu_el”) where el is the name of
the element</p></li>
<li><p><strong>chempot_range</strong> (<em>[</em><em>max_chempot</em><em>, </em><em>min_chempot</em><em>]</em>) – Range to consider the
stability of the slabs.</p></li>
<li><p><strong>delu_dict</strong> (<em>Dict</em>) – Dictionary of the chemical potentials to be set as
constant. Note the key should be a sympy Symbol object of the
format: Symbol(“delu_el”) where el is the name of the element.</p></li>
<li><p><strong>delu_default</strong> (<em>float</em>) – Default value for all unset chemical potentials</p></li>
<li><p><strong>label</strong> (<em>str</em>) – Label of the slab for the legend.</p></li>
<li><p><strong>JPERM2</strong> (<em>bool</em>) – Whether to plot surface energy in /m^2 (True) or
eV/A^2 (False)</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>Plot of surface energy vs chemical potential for one entry.</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>(Plot)</p>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="pymatgen.analysis.surface_analysis.SurfaceEnergyPlotter.color_palette_dict">
<code class="descname">color_palette_dict</code><span class="sig-paren">(</span><em>alpha=0.35</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/analysis/surface_analysis.html#SurfaceEnergyPlotter.color_palette_dict"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.analysis.surface_analysis.SurfaceEnergyPlotter.color_palette_dict" title="Permalink to this definition">¶</a></dt>
<dd><p>Helper function to assign each facet a unique color using a dictionary.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>alpha</strong> (<em>float</em>) – Degree of transparency</p>
</dd>
</dl>
<dl class="simple">
<dt>return (dict): Dictionary of colors (r,g,b,a) when plotting surface</dt><dd><p>energy stability. The keys are individual surface entries where
clean surfaces have a solid color while the corresponding adsorbed
surface will be transparent.</p>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="pymatgen.analysis.surface_analysis.SurfaceEnergyPlotter.get_stable_entry_at_u">
<code class="descname">get_stable_entry_at_u</code><span class="sig-paren">(</span><em>miller_index</em>, <em>delu_dict=None</em>, <em>delu_default=0</em>, <em>no_doped=False</em>, <em>no_clean=False</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/analysis/surface_analysis.html#SurfaceEnergyPlotter.get_stable_entry_at_u"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.analysis.surface_analysis.SurfaceEnergyPlotter.get_stable_entry_at_u" title="Permalink to this definition">¶</a></dt>
<dd><dl class="simple">
<dt>Returns the entry corresponding to the most stable slab for a particular</dt><dd><p>facet at a specific chempot. We assume that surface energy is constant
so all free variables must be set with delu_dict, otherwise they are
assumed to be equal to delu_default.</p>
</dd>
</dl>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>miller_index</strong> (<em>(</em><em>h</em><em>,</em><em>k</em><em>,</em><em>l</em><em>)</em>) – The facet to find the most stable slab in</p></li>
<li><p><strong>delu_dict</strong> (<em>Dict</em>) – Dictionary of the chemical potentials to be set as
constant. Note the key should be a sympy Symbol object of the
format: Symbol(“delu_el”) where el is the name of the element.</p></li>
<li><p><strong>delu_default</strong> (<em>float</em>) – Default value for all unset chemical potentials</p></li>
<li><p><strong>no_doped</strong> (<em>bool</em>) – Consider stability of clean slabs only.</p></li>
<li><p><strong>no_clean</strong> (<em>bool</em>) – Consider stability of doped slabs only.</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>SlabEntry, surface_energy (float)</p>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="pymatgen.analysis.surface_analysis.SurfaceEnergyPlotter.get_surface_equilibrium">
<code class="descname">get_surface_equilibrium</code><span class="sig-paren">(</span><em>slab_entries</em>, <em>delu_dict=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/analysis/surface_analysis.html#SurfaceEnergyPlotter.get_surface_equilibrium"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.analysis.surface_analysis.SurfaceEnergyPlotter.get_surface_equilibrium" title="Permalink to this definition">¶</a></dt>
<dd><dl class="simple">
<dt>Takes in a list of SlabEntries and calculates the chemical potentials</dt><dd><p>at which all slabs in the list coexists simultaneously. Useful for
building surface phase diagrams. Note that to solve for x equations
(x slab_entries), there must be x free variables (chemical potentials).
Adjust delu_dict as need be to get the correct number of free variables.</p>
</dd>
</dl>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>slab_entries</strong> (<em>array</em>) – The coefficients of the first equation</p></li>
<li><p><strong>delu_dict</strong> (<em>Dict</em>) – Dictionary of the chemical potentials to be set as
constant. Note the key should be a sympy Symbol object of the
format: Symbol(“delu_el”) where el is the name of the element.</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p><dl class="simple">
<dt>Array containing a solution to x equations with x</dt><dd><p>variables (x-1 chemical potential and 1 surface energy)</p>
</dd>
</dl>
</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>(array)</p>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="pymatgen.analysis.surface_analysis.SurfaceEnergyPlotter.monolayer_vs_BE">
<code class="descname">monolayer_vs_BE</code><span class="sig-paren">(</span><em>plot_eads=False</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/analysis/surface_analysis.html#SurfaceEnergyPlotter.monolayer_vs_BE"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.analysis.surface_analysis.SurfaceEnergyPlotter.monolayer_vs_BE" title="Permalink to this definition">¶</a></dt>
<dd><dl class="simple">
<dt>Plots the binding energy energy as a function of monolayers (ML), i.e.</dt><dd><p>the fractional area adsorbate density for all facets. For each
facet at a specific monlayer, only plot the lowest binding energy.</p>
</dd>
</dl>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>plot_eads</strong> (<em>bool</em>) – Option to plot the adsorption energy (binding
energy multiplied by number of adsorbates) instead.</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>Plot of binding energy vs monolayer for all facets.</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>(Plot)</p>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="pymatgen.analysis.surface_analysis.SurfaceEnergyPlotter.set_all_variables">
<code class="descname">set_all_variables</code><span class="sig-paren">(</span><em>delu_dict</em>, <em>delu_default</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/analysis/surface_analysis.html#SurfaceEnergyPlotter.set_all_variables"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.analysis.surface_analysis.SurfaceEnergyPlotter.set_all_variables" title="Permalink to this definition">¶</a></dt>
<dd><dl class="simple">
<dt>Sets all chemical potential values and returns a dictionary where</dt><dd><p>the key is a sympy Symbol and the value is a float (chempot).</p>
</dd>
</dl>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>entry</strong> (<a class="reference internal" href="#pymatgen.analysis.surface_analysis.SlabEntry" title="pymatgen.analysis.surface_analysis.SlabEntry"><em>SlabEntry</em></a>) – Computed structure entry of the slab</p></li>
<li><p><strong>delu_dict</strong> (<em>Dict</em>) – Dictionary of the chemical potentials to be set as
constant. Note the key should be a sympy Symbol object of the
format: Symbol(“delu_el”) where el is the name of the element.</p></li>
<li><p><strong>delu_default</strong> (<em>float</em>) – Default value for all unset chemical potentials</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>Dictionary of set chemical potential values</p>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="pymatgen.analysis.surface_analysis.SurfaceEnergyPlotter.stable_u_range_dict">
<code class="descname">stable_u_range_dict</code><span class="sig-paren">(</span><em>chempot_range</em>, <em>ref_delu</em>, <em>no_doped=True</em>, <em>no_clean=False</em>, <em>delu_dict={}</em>, <em>miller_index=()</em>, <em>dmu_at_0=False</em>, <em>return_se_dict=False</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/analysis/surface_analysis.html#SurfaceEnergyPlotter.stable_u_range_dict"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.analysis.surface_analysis.SurfaceEnergyPlotter.stable_u_range_dict" title="Permalink to this definition">¶</a></dt>
<dd><p>Creates a dictionary where each entry is a key pointing to a
chemical potential range where the surface of that entry is stable.
Does so by enumerating through all possible solutions (intersect)
for surface energies of a specific facet.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>chempot_range</strong> (<em>[</em><em>max_chempot</em><em>, </em><em>min_chempot</em><em>]</em>) – Range to consider the
stability of the slabs.</p></li>
<li><p><strong>ref_delu</strong> (<em>sympy Symbol</em>) – The range stability of each slab is based
on the chempot range of this chempot. Should be a sympy Symbol
object of the format: Symbol(“delu_el”) where el is the name of
the element</p></li>
<li><p><strong>no_doped</strong> (<em>bool</em>) – Consider stability of clean slabs only.</p></li>
<li><p><strong>no_clean</strong> (<em>bool</em>) – Consider stability of doped slabs only.</p></li>
<li><p><strong>delu_dict</strong> (<em>Dict</em>) – Dictionary of the chemical potentials to be set as
constant. Note the key should be a sympy Symbol object of the
format: Symbol(“delu_el”) where el is the name of the element.</p></li>
<li><p><strong>miller_index</strong> (<em>list</em>) – Miller index for a specific facet to get a
dictionary for.</p></li>
<li><p><strong>dmu_at_0</strong> (<em>bool</em>) – If True, if the surface energies corresponding to
the chemical potential range is between a negative and positive
value, the value is a list of three chemical potentials with the
one in the center corresponding a surface energy of 0. Uselful
in identifying unphysical ranges of surface energies and their
chemical potential range.</p></li>
<li><p><strong>return_se_dict</strong> (<em>bool</em>) – Whether or not to return the corresponding
dictionary of surface energies</p></li>
</ul>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="pymatgen.analysis.surface_analysis.SurfaceEnergyPlotter.surface_chempot_range_map">
<code class="descname">surface_chempot_range_map</code><span class="sig-paren">(</span><em>elements</em>, <em>miller_index</em>, <em>ranges</em>, <em>incr=50</em>, <em>no_doped=False</em>, <em>no_clean=False</em>, <em>delu_dict=None</em>, <em>plt=None</em>, <em>annotate=True</em>, <em>show_unphyiscal_only=False</em>, <em>fontsize=10</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/analysis/surface_analysis.html#SurfaceEnergyPlotter.surface_chempot_range_map"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.analysis.surface_analysis.SurfaceEnergyPlotter.surface_chempot_range_map" title="Permalink to this definition">¶</a></dt>
<dd><dl class="simple">
<dt>Adapted from the get_chempot_range_map() method in the PhaseDiagram</dt><dd><p>class. Plot the chemical potential range map based on surface
energy stability. Currently works only for 2-component PDs. At
the moment uses a brute force method by enumerating through the
range of the first element chempot with a specified increment
and determines the chempot rangeo fht e second element for each
SlabEntry. Future implementation will determine the chempot range
map first by solving systems of equations up to 3 instead of 2.</p>
</dd>
</dl>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>elements</strong> (<em>list</em>) – Sequence of elements to be considered as independent
variables. E.g., if you want to show the stability ranges of
all Li-Co-O phases wrt to duLi and duO, you will supply
[Element(“Li”), Element(“O”)]</p></li>
<li><p><strong>miller_index</strong> (<em>[</em><em>h</em><em>, </em><em>k</em><em>, </em><em>l</em><em>]</em>) – Miller index of the surface we are interested in</p></li>
<li><p><strong>ranges</strong> (<em>[</em><em>[</em><em>range1</em><em>]</em><em>, </em><em>[</em><em>range2</em><em>]</em><em>]</em>) – List of chempot ranges (max and min values)
for the first and second element.</p></li>
<li><p><strong>incr</strong> (<em>int</em>) – Number of points to sample along the range of the first chempot</p></li>
<li><p><strong>no_doped</strong> (<em>bool</em>) – Whether or not to include doped systems.</p></li>
<li><p><strong>no_clean</strong> (<em>bool</em>) – Whether or not to include clean systems.</p></li>
<li><p><strong>delu_dict</strong> (<em>Dict</em>) – Dictionary of the chemical potentials to be set as
constant. Note the key should be a sympy Symbol object of the
format: Symbol(“delu_el”) where el is the name of the element.</p></li>
<li><p><strong>annotate</strong> (<em>bool</em>) – Whether to annotate each “phase” with the label of
the entry. If no label, uses the reduced formula</p></li>
<li><p><strong>show_unphyiscal_only</strong> (<em>bool</em>) – Whether to only show the shaded region where
surface energy is negative. Useful for drawing other chempot range maps.</p></li>
</ul>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="pymatgen.analysis.surface_analysis.SurfaceEnergyPlotter.wulff_from_chempot">
<code class="descname">wulff_from_chempot</code><span class="sig-paren">(</span><em>delu_dict=None</em>, <em>delu_default=0</em>, <em>symprec=1e-05</em>, <em>no_clean=False</em>, <em>no_doped=False</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/analysis/surface_analysis.html#SurfaceEnergyPlotter.wulff_from_chempot"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.analysis.surface_analysis.SurfaceEnergyPlotter.wulff_from_chempot" title="Permalink to this definition">¶</a></dt>
<dd><p>Method to get the Wulff shape at a specific chemical potential.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>delu_dict</strong> (<em>Dict</em>) – Dictionary of the chemical potentials to be set as
constant. Note the key should be a sympy Symbol object of the
format: Symbol(“delu_el”) where el is the name of the element.</p></li>
<li><p><strong>delu_default</strong> (<em>float</em>) – Default value for all unset chemical potentials</p></li>
<li><p><strong>symprec</strong> (<em>float</em>) – See WulffShape.</p></li>
<li><p><strong>no_doped</strong> (<em>bool</em>) – Consider stability of clean slabs only.</p></li>
<li><p><strong>no_clean</strong> (<em>bool</em>) – Consider stability of doped slabs only.</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>The WulffShape at u_ref and u_ads.</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>(<a class="reference internal" href="pymatgen.analysis.wulff.html#pymatgen.analysis.wulff.WulffShape" title="pymatgen.analysis.wulff.WulffShape">WulffShape</a>)</p>
</dd>
</dl>
</dd></dl>
</dd></dl>
<dl class="class">
<dt id="pymatgen.analysis.surface_analysis.WorkFunctionAnalyzer">
<em class="property">class </em><code class="descname">WorkFunctionAnalyzer</code><span class="sig-paren">(</span><em>structure</em>, <em>locpot_along_c</em>, <em>efermi</em>, <em>shift=0</em>, <em>blength=3.5</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/analysis/surface_analysis.html#WorkFunctionAnalyzer"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.analysis.surface_analysis.WorkFunctionAnalyzer" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
<dl class="simple">
<dt>A class used for calculating the work function</dt><dd><p>from a slab model and visualizing the behavior
of the local potential along the slab.</p>
</dd>
</dl>
<dl class="attribute">
<dt id="pymatgen.analysis.surface_analysis.WorkFunctionAnalyzer.efermi">
<code class="descname">efermi</code><a class="headerlink" href="#pymatgen.analysis.surface_analysis.WorkFunctionAnalyzer.efermi" title="Permalink to this definition">¶</a></dt>
<dd><p>The Fermi energy</p>
</dd></dl>
<dl class="attribute">
<dt id="pymatgen.analysis.surface_analysis.WorkFunctionAnalyzer.locpot_along_c">
<code class="descname">locpot_along_c</code><a class="headerlink" href="#pymatgen.analysis.surface_analysis.WorkFunctionAnalyzer.locpot_along_c" title="Permalink to this definition">¶</a></dt>
<dd><p>Local potential in eV along points along the axis</p>
</dd></dl>
<dl class="attribute">
<dt id="pymatgen.analysis.surface_analysis.WorkFunctionAnalyzer.vacuum_locpot">
<code class="descname">vacuum_locpot</code><a class="headerlink" href="#pymatgen.analysis.surface_analysis.WorkFunctionAnalyzer.vacuum_locpot" title="Permalink to this definition">¶</a></dt>
<dd><dl class="simple">
<dt>The maximum local potential along the c direction for</dt><dd><p>the slab model, ie the potential at the vacuum</p>
</dd>
</dl>
</dd></dl>
<dl class="attribute">
<dt id="pymatgen.analysis.surface_analysis.WorkFunctionAnalyzer.work_function">
<code class="descname">work_function</code><a class="headerlink" href="#pymatgen.analysis.surface_analysis.WorkFunctionAnalyzer.work_function" title="Permalink to this definition">¶</a></dt>
<dd><dl class="simple">
<dt>The minimum energy needed to move an electron from the</dt><dd><p>surface to infinity. Defined as the difference between
the potential at the vacuum and the Fermi energy.</p>
</dd>
</dl>
</dd></dl>
<dl class="attribute">
<dt id="pymatgen.analysis.surface_analysis.WorkFunctionAnalyzer.slab">
<code class="descname">slab</code><a class="headerlink" href="#pymatgen.analysis.surface_analysis.WorkFunctionAnalyzer.slab" title="Permalink to this definition">¶</a></dt>
<dd><p>The slab structure model</p>
</dd></dl>
<dl class="attribute">
<dt id="pymatgen.analysis.surface_analysis.WorkFunctionAnalyzer.along_c">
<code class="descname">along_c</code><a class="headerlink" href="#pymatgen.analysis.surface_analysis.WorkFunctionAnalyzer.along_c" title="Permalink to this definition">¶</a></dt>
<dd><dl class="simple">
<dt>Points along the c direction with same</dt><dd><p>increments as the locpot in the c axis</p>
</dd>
</dl>
</dd></dl>
<dl class="attribute">
<dt id="pymatgen.analysis.surface_analysis.WorkFunctionAnalyzer.ave_locpot">
<code class="descname">ave_locpot</code><a class="headerlink" href="#pymatgen.analysis.surface_analysis.WorkFunctionAnalyzer.ave_locpot" title="Permalink to this definition">¶</a></dt>
<dd><p>Mean of the minimum and maximmum (vacuum) locpot along c</p>
</dd></dl>
<dl class="attribute">
<dt id="pymatgen.analysis.surface_analysis.WorkFunctionAnalyzer.sorted_sites">
<code class="descname">sorted_sites</code><a class="headerlink" href="#pymatgen.analysis.surface_analysis.WorkFunctionAnalyzer.sorted_sites" title="Permalink to this definition">¶</a></dt>
<dd><p>List of sites from the slab sorted along the c direction</p>
</dd></dl>
<dl class="attribute">
<dt id="pymatgen.analysis.surface_analysis.WorkFunctionAnalyzer.ave_bulk_p">
<code class="descname">ave_bulk_p</code><a class="headerlink" href="#pymatgen.analysis.surface_analysis.WorkFunctionAnalyzer.ave_bulk_p" title="Permalink to this definition">¶</a></dt>
<dd><p>The average locpot of the slab region along the c direction</p>
</dd></dl>
<p>Initializes the WorkFunctionAnalyzer class.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>structure</strong> (<a class="reference internal" href="pymatgen.core.structure.html#pymatgen.core.structure.Structure" title="pymatgen.core.structure.Structure"><em>Structure</em></a>) – Structure object modelling the surface</p></li>
<li><p><strong>locpot_along_c</strong> (<em>list</em>) – Local potential along the c direction</p></li>
<li><p><strong>outcar</strong> (<em>MSONable</em>) – Outcar vasp output object</p></li>
<li><p><strong>shift</strong> (<em>float</em>) – Parameter to translate the slab (and
therefore the vacuum) of the slab structure, thereby
translating the plot along the x axis.</p></li>
<li><p><strong>blength</strong> (<em>float</em><em> (</em><em>Ang</em><em>)</em>) – The longest bond length in the material.
Used to handle pbc for noncontiguous slab layers</p></li>
</ul>
</dd>
</dl>
<dl class="staticmethod">
<dt id="pymatgen.analysis.surface_analysis.WorkFunctionAnalyzer.from_files">
<em class="property">static </em><code class="descname">from_files</code><span class="sig-paren">(</span><em>poscar_filename</em>, <em>locpot_filename</em>, <em>outcar_filename</em>, <em>shift=0</em>, <em>blength=3.5</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/analysis/surface_analysis.html#WorkFunctionAnalyzer.from_files"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.analysis.surface_analysis.WorkFunctionAnalyzer.from_files" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="pymatgen.analysis.surface_analysis.WorkFunctionAnalyzer.get_labels">
<code class="descname">get_labels</code><span class="sig-paren">(</span><em>plt</em>, <em>label_fontsize=10</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/analysis/surface_analysis.html#WorkFunctionAnalyzer.get_labels"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.analysis.surface_analysis.WorkFunctionAnalyzer.get_labels" title="Permalink to this definition">¶</a></dt>
<dd><p>Handles the optional labelling of the plot with relevant quantities
:param plt: Plot of the locpot vs c axis
:type plt: plt
:param label_fontsize: Fontsize of labels
:type label_fontsize: float</p>
<p>Returns Labelled plt</p>
</dd></dl>
<dl class="method">
<dt id="pymatgen.analysis.surface_analysis.WorkFunctionAnalyzer.get_locpot_along_slab_plot">
<code class="descname">get_locpot_along_slab_plot</code><span class="sig-paren">(</span><em>label_energies=True</em>, <em>plt=None</em>, <em>label_fontsize=10</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/analysis/surface_analysis.html#WorkFunctionAnalyzer.get_locpot_along_slab_plot"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.analysis.surface_analysis.WorkFunctionAnalyzer.get_locpot_along_slab_plot" title="Permalink to this definition">¶</a></dt>
<dd><dl class="simple">
<dt>Returns a plot of the local potential (eV) vs the</dt><dd><p>position along the c axis of the slab model (Ang)</p>
</dd>
</dl>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>label_energies</strong> (<em>bool</em>) – Whether to label relevant energy
quantities such as the work function, Fermi energy,
vacuum locpot, bulk-like locpot</p></li>
<li><p><strong>plt</strong> (<em>plt</em>) – Matplotlib pylab object</p></li>
<li><p><strong>label_fontsize</strong> (<em>float</em>) – Fontsize of labels</p></li>
</ul>
</dd>
</dl>
<p>Returns plt of the locpot vs c axis</p>
</dd></dl>
<dl class="method">