forked from materialsproject/pymatgen
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pymatgen.analysis.bond_valence.html
256 lines (238 loc) · 13.9 KB
/
pymatgen.analysis.bond_valence.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
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<title>pymatgen.analysis.bond_valence 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.bond_valence">
<span id="pymatgen-analysis-bond-valence-module"></span><h1>pymatgen.analysis.bond_valence module<a class="headerlink" href="#module-pymatgen.analysis.bond_valence" title="Permalink to this headline">¶</a></h1>
<dl class="class">
<dt id="pymatgen.analysis.bond_valence.BVAnalyzer">
<em class="property">class </em><code class="descname">BVAnalyzer</code><span class="sig-paren">(</span><em>symm_tol=0.1</em>, <em>max_radius=4</em>, <em>max_permutations=100000</em>, <em>distance_scale_factor=1.015</em>, <em>charge_neutrality_tolerance=1e-05</em>, <em>forbidden_species=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/analysis/bond_valence.html#BVAnalyzer"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.analysis.bond_valence.BVAnalyzer" 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>
<p>This class implements a maximum a posteriori (MAP) estimation method to
determine oxidation states in a structure. The algorithm is as follows:
1) The bond valence sum of all symmetrically distinct sites in a structure
is calculated using the element-based parameters in M. O’Keefe, & N. Brese,
JACS, 1991, 113(9), 3226-3229. doi:10.1021/ja00009a002.
2) The posterior probabilities of all oxidation states is then calculated
using: P(oxi_state/BV) = K * P(BV/oxi_state) * P(oxi_state), where K is
a constant factor for each element. P(BV/oxi_state) is calculated as a
Gaussian with mean and std deviation determined from an analysis of
the ICSD. The posterior P(oxi_state) is determined from a frequency
analysis of the ICSD.
3) The oxidation states are then ranked in order of decreasing probability
and the oxidation state combination that result in a charge neutral cell
is selected.</p>
<p>Initializes the BV analyzer, with useful defaults.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>symm_tol</strong> – Symmetry tolerance used to determine which sites are
symmetrically equivalent. Set to 0 to turn off symmetry.</p></li>
<li><p><strong>max_radius</strong> – Maximum radius in Angstrom used to find nearest neighbors.</p></li>
<li><p><strong>max_permutations</strong> – The maximum number of permutations of oxidation states to test.</p></li>
<li><p><strong>distance_scale_factor</strong> – A scale factor to be applied. This is useful for scaling
distances, esp in the case of calculation-relaxed structures
which may tend to under (GGA) or over bind (LDA). The default
of 1.015 works for GGA. For experimental structure, set this to
1.</p></li>
<li><p><strong>charge_neutrality_tolerance</strong> – Tolerance on the charge neutrality when unordered structures
are at stake.</p></li>
<li><p><strong>forbidden_species</strong> – List of species that are forbidden (example : [“O-“] cannot be
used) It is used when e.g. someone knows that some oxidation
state cannot occur for some atom in a structure or list of
structures.</p></li>
</ul>
</dd>
</dl>
<dl class="attribute">
<dt id="pymatgen.analysis.bond_valence.BVAnalyzer.CHARGE_NEUTRALITY_TOLERANCE">
<code class="descname">CHARGE_NEUTRALITY_TOLERANCE</code><em class="property"> = 1e-05</em><a class="headerlink" href="#pymatgen.analysis.bond_valence.BVAnalyzer.CHARGE_NEUTRALITY_TOLERANCE" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="pymatgen.analysis.bond_valence.BVAnalyzer.get_oxi_state_decorated_structure">
<code class="descname">get_oxi_state_decorated_structure</code><span class="sig-paren">(</span><em>structure</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/analysis/bond_valence.html#BVAnalyzer.get_oxi_state_decorated_structure"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.analysis.bond_valence.BVAnalyzer.get_oxi_state_decorated_structure" title="Permalink to this definition">¶</a></dt>
<dd><p>Get an oxidation state decorated structure. This currently works only
for ordered structures only.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>structure</strong> – Structure to analyze</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>A modified structure that is oxidation state decorated.</p>
</dd>
<dt class="field-odd">Raises</dt>
<dd class="field-odd"><p><strong>ValueError if the valences cannot be determined.</strong> – </p>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="pymatgen.analysis.bond_valence.BVAnalyzer.get_valences">
<code class="descname">get_valences</code><span class="sig-paren">(</span><em>structure</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/analysis/bond_valence.html#BVAnalyzer.get_valences"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.analysis.bond_valence.BVAnalyzer.get_valences" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns a list of valences for the structure. This currently works only
for ordered structures only.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>structure</strong> – Structure to analyze</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>A list of valences for each site in the structure (for an ordered
structure), e.g., [1, 1, -2] or a list of lists with the
valences for each fractional element of each site in the
structure (for an unordered structure),
e.g., [[2, 4], [3], [-2], [-2], [-2]]</p>
</dd>
<dt class="field-odd">Raises</dt>
<dd class="field-odd"><p><strong>A ValueError if the valences cannot be determined.</strong> – </p>
</dd>
</dl>
</dd></dl>
</dd></dl>
<dl class="function">
<dt id="pymatgen.analysis.bond_valence.add_oxidation_state_by_site_fraction">
<code class="descname">add_oxidation_state_by_site_fraction</code><span class="sig-paren">(</span><em>structure</em>, <em>oxidation_states</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/analysis/bond_valence.html#add_oxidation_state_by_site_fraction"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.analysis.bond_valence.add_oxidation_state_by_site_fraction" title="Permalink to this definition">¶</a></dt>
<dd><p>Add oxidation states to a structure by fractional site.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>oxidation_states</strong> (<em>list</em>) – List of list of oxidation states for each
site fraction for each site.
E.g., [[2, 4], [3], [-2], [-2], [-2]]</p>
</dd>
</dl>
</dd></dl>
<dl class="function">
<dt id="pymatgen.analysis.bond_valence.calculate_bv_sum">
<code class="descname">calculate_bv_sum</code><span class="sig-paren">(</span><em>site</em>, <em>nn_list</em>, <em>scale_factor=1.0</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/analysis/bond_valence.html#calculate_bv_sum"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.analysis.bond_valence.calculate_bv_sum" title="Permalink to this definition">¶</a></dt>
<dd><p>Calculates the BV sum of a site.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>site</strong> – The site</p></li>
<li><p><strong>nn_list</strong> – List of nearest neighbors in the format [(nn_site, dist), …].</p></li>
<li><p><strong>scale_factor</strong> – A scale factor to be applied. This is useful for scaling distance,
esp in the case of calculation-relaxed structures which may tend
to under (GGA) or over bind (LDA).</p></li>
</ul>
</dd>
</dl>
</dd></dl>
<dl class="function">
<dt id="pymatgen.analysis.bond_valence.calculate_bv_sum_unordered">
<code class="descname">calculate_bv_sum_unordered</code><span class="sig-paren">(</span><em>site</em>, <em>nn_list</em>, <em>scale_factor=1</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/analysis/bond_valence.html#calculate_bv_sum_unordered"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.analysis.bond_valence.calculate_bv_sum_unordered" title="Permalink to this definition">¶</a></dt>
<dd><p>Calculates the BV sum of a site for unordered structures.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>site</strong> – The site</p></li>
<li><p><strong>nn_list</strong> – List of nearest neighbors in the format [(nn_site, dist), …].</p></li>
<li><p><strong>scale_factor</strong> – A scale factor to be applied. This is useful for scaling distance,
esp in the case of calculation-relaxed structures which may tend
to under (GGA) or over bind (LDA).</p></li>
</ul>
</dd>
</dl>
</dd></dl>
<dl class="function">
<dt id="pymatgen.analysis.bond_valence.get_z_ordered_elmap">
<code class="descname">get_z_ordered_elmap</code><span class="sig-paren">(</span><em>comp</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/analysis/bond_valence.html#get_z_ordered_elmap"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.analysis.bond_valence.get_z_ordered_elmap" title="Permalink to this definition">¶</a></dt>
<dd><p>Arbitrary ordered elmap on the elements/species of a composition of a
given site in an unordered structure. Returns a list of tuples (
element_or_specie: occupation) in the arbitrary order.</p>
<p>The arbitrary order is based on the Z of the element and the smallest
fractional occupations first.
Example : {“Ni3+”: 0.2, “Ni4+”: 0.2, “Cr3+”: 0.15, “Zn2+”: 0.34,
“Cr4+”: 0.11} will yield the species in the following order :
Cr4+, Cr3+, Ni3+, Ni4+, Zn2+ … or
Cr4+, Cr3+, Ni4+, Ni3+, Zn2+</p>
</dd></dl>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/pymatgen.analysis.bond_valence.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
<h3>Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="search.html" method="get">
<input type="text" name="q" />
<input type="submit" value="Go" />
</form>
</div>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<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"
>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="footer" role="contentinfo">
© Copyright 2011, Pymatgen Development Team.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 2.0.1.
</div>
<div class="footer">This page uses <a href="http://analytics.google.com/">
Google Analytics</a> to collect statistics. You can disable it by blocking
the JavaScript coming from www.google-analytics.com.
<script type="text/javascript">
(function() {
var ga = document.createElement('script');
ga.src = ('https:' == document.location.protocol ?
'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
ga.setAttribute('async', 'true');
document.documentElement.firstChild.appendChild(ga);
})();
</script>
</div>
</body>
</html>