forked from materialsproject/pymatgen
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pymatgen.alchemy.filters.html
331 lines (302 loc) · 21 KB
/
pymatgen.alchemy.filters.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
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<title>pymatgen.alchemy.filters 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.alchemy.filters">
<span id="pymatgen-alchemy-filters-module"></span><h1>pymatgen.alchemy.filters module<a class="headerlink" href="#module-pymatgen.alchemy.filters" title="Permalink to this headline">¶</a></h1>
<dl class="class">
<dt id="pymatgen.alchemy.filters.AbstractStructureFilter">
<em class="property">class </em><code class="descname">AbstractStructureFilter</code><a class="reference internal" href="_modules/pymatgen/alchemy/filters.html#AbstractStructureFilter"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.alchemy.filters.AbstractStructureFilter" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">monty.json.MSONable</span></code></p>
<p>AbstractStructureFilter that defines an API to perform testing of
Structures. Structures that return True to a test are retained during
transmutation while those that return False are removed.</p>
<dl class="method">
<dt id="pymatgen.alchemy.filters.AbstractStructureFilter.test">
<code class="descname">test</code><span class="sig-paren">(</span><em>structure</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/alchemy/filters.html#AbstractStructureFilter.test"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.alchemy.filters.AbstractStructureFilter.test" title="Permalink to this definition">¶</a></dt>
<dd><p>Method to execute the test.</p>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p>(bool) Structures that return true are kept in the Transmuter
object during filtering.</p>
</dd>
</dl>
</dd></dl>
</dd></dl>
<dl class="class">
<dt id="pymatgen.alchemy.filters.ChargeBalanceFilter">
<em class="property">class </em><code class="descname">ChargeBalanceFilter</code><a class="reference internal" href="_modules/pymatgen/alchemy/filters.html#ChargeBalanceFilter"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.alchemy.filters.ChargeBalanceFilter" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#pymatgen.alchemy.filters.AbstractStructureFilter" title="pymatgen.alchemy.filters.AbstractStructureFilter"><code class="xref py py-class docutils literal notranslate"><span class="pre">pymatgen.alchemy.filters.AbstractStructureFilter</span></code></a></p>
<p>This filter removes structures that are not charge balanced from the
transmuter. This only works if the structure is oxidation state
decorated, as structures with only elemental sites are automatically
assumed to have net charge of 0.</p>
<dl class="method">
<dt id="pymatgen.alchemy.filters.ChargeBalanceFilter.test">
<code class="descname">test</code><span class="sig-paren">(</span><em>structure</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/alchemy/filters.html#ChargeBalanceFilter.test"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.alchemy.filters.ChargeBalanceFilter.test" title="Permalink to this definition">¶</a></dt>
<dd><p>Method to execute the test.</p>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p>(bool) Structures that return true are kept in the Transmuter
object during filtering.</p>
</dd>
</dl>
</dd></dl>
</dd></dl>
<dl class="class">
<dt id="pymatgen.alchemy.filters.ContainsSpecieFilter">
<em class="property">class </em><code class="descname">ContainsSpecieFilter</code><span class="sig-paren">(</span><em>species</em>, <em>strict_compare=False</em>, <em>AND=True</em>, <em>exclude=False</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/alchemy/filters.html#ContainsSpecieFilter"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.alchemy.filters.ContainsSpecieFilter" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#pymatgen.alchemy.filters.AbstractStructureFilter" title="pymatgen.alchemy.filters.AbstractStructureFilter"><code class="xref py py-class docutils literal notranslate"><span class="pre">pymatgen.alchemy.filters.AbstractStructureFilter</span></code></a></p>
<p>Filter for structures containing certain elements or species.
By default compares by atomic number</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>species</strong> (<em>[</em><em>Specie/Element</em><em>]</em>) – list of species to look for</p></li>
<li><p><strong>AND</strong> – whether all species must be present to pass (or fail) filter.</p></li>
<li><p><strong>strict_compare</strong> – if true, compares objects by specie or element
object if false, compares atomic number</p></li>
<li><p><strong>exclude</strong> – If true, returns false for any structures with the specie
(excludes them from the Transmuter)</p></li>
</ul>
</dd>
</dl>
<dl class="method">
<dt id="pymatgen.alchemy.filters.ContainsSpecieFilter.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/alchemy/filters.html#ContainsSpecieFilter.as_dict"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.alchemy.filters.ContainsSpecieFilter.as_dict" title="Permalink to this definition">¶</a></dt>
<dd><p>A JSON serializable dict representation of an object.</p>
</dd></dl>
<dl class="classmethod">
<dt id="pymatgen.alchemy.filters.ContainsSpecieFilter.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/alchemy/filters.html#ContainsSpecieFilter.from_dict"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.alchemy.filters.ContainsSpecieFilter.from_dict" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="pymatgen.alchemy.filters.ContainsSpecieFilter.test">
<code class="descname">test</code><span class="sig-paren">(</span><em>structure</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/alchemy/filters.html#ContainsSpecieFilter.test"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.alchemy.filters.ContainsSpecieFilter.test" title="Permalink to this definition">¶</a></dt>
<dd><p>Method to execute the test.</p>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p>(bool) Structures that return true are kept in the Transmuter
object during filtering.</p>
</dd>
</dl>
</dd></dl>
</dd></dl>
<dl class="class">
<dt id="pymatgen.alchemy.filters.RemoveDuplicatesFilter">
<em class="property">class </em><code class="descname">RemoveDuplicatesFilter</code><span class="sig-paren">(</span><em>structure_matcher=<pymatgen.analysis.structure_matcher.StructureMatcher object></em>, <em>symprec=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/alchemy/filters.html#RemoveDuplicatesFilter"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.alchemy.filters.RemoveDuplicatesFilter" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#pymatgen.alchemy.filters.AbstractStructureFilter" title="pymatgen.alchemy.filters.AbstractStructureFilter"><code class="xref py py-class docutils literal notranslate"><span class="pre">pymatgen.alchemy.filters.AbstractStructureFilter</span></code></a></p>
<p>This filter removes exact duplicate structures from the transmuter.</p>
<p>Remove duplicate structures based on the structure matcher
and symmetry (if symprec is given).</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>structure_matcher</strong> – Provides a structure matcher to be used for
structure comparison.</p></li>
<li><p><strong>symprec</strong> – The precision in the symmetry finder algorithm if None (
default value), no symmetry check is performed and only the
structure matcher is used. A recommended value is 1e-5.</p></li>
</ul>
</dd>
</dl>
<dl class="method">
<dt id="pymatgen.alchemy.filters.RemoveDuplicatesFilter.test">
<code class="descname">test</code><span class="sig-paren">(</span><em>structure</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/alchemy/filters.html#RemoveDuplicatesFilter.test"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.alchemy.filters.RemoveDuplicatesFilter.test" title="Permalink to this definition">¶</a></dt>
<dd><p>Method to execute the test.</p>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p>(bool) Structures that return true are kept in the Transmuter
object during filtering.</p>
</dd>
</dl>
</dd></dl>
</dd></dl>
<dl class="class">
<dt id="pymatgen.alchemy.filters.RemoveExistingFilter">
<em class="property">class </em><code class="descname">RemoveExistingFilter</code><span class="sig-paren">(</span><em>existing_structures</em>, <em>structure_matcher=<pymatgen.analysis.structure_matcher.StructureMatcher object></em>, <em>symprec=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/alchemy/filters.html#RemoveExistingFilter"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.alchemy.filters.RemoveExistingFilter" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#pymatgen.alchemy.filters.AbstractStructureFilter" title="pymatgen.alchemy.filters.AbstractStructureFilter"><code class="xref py py-class docutils literal notranslate"><span class="pre">pymatgen.alchemy.filters.AbstractStructureFilter</span></code></a></p>
<p>This filter removes structures existing in a given list from the transmuter.</p>
<p>Remove existing structures based on the structure matcher
and symmetry (if symprec is given).</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>existing_structures</strong> – List of existing structures to compare with</p></li>
<li><p><strong>structure_matcher</strong> – Provides a structure matcher to be used for
structure comparison.</p></li>
<li><p><strong>symprec</strong> – The precision in the symmetry finder algorithm if None (
default value), no symmetry check is performed and only the
structure matcher is used. A recommended value is 1e-5.</p></li>
</ul>
</dd>
</dl>
<dl class="method">
<dt id="pymatgen.alchemy.filters.RemoveExistingFilter.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/alchemy/filters.html#RemoveExistingFilter.as_dict"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.alchemy.filters.RemoveExistingFilter.as_dict" title="Permalink to this definition">¶</a></dt>
<dd><p>A JSON serializable dict representation of an object.</p>
</dd></dl>
<dl class="method">
<dt id="pymatgen.alchemy.filters.RemoveExistingFilter.test">
<code class="descname">test</code><span class="sig-paren">(</span><em>structure</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/alchemy/filters.html#RemoveExistingFilter.test"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.alchemy.filters.RemoveExistingFilter.test" title="Permalink to this definition">¶</a></dt>
<dd><p>Method to execute the test.</p>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p>(bool) Structures that return true are kept in the Transmuter
object during filtering.</p>
</dd>
</dl>
</dd></dl>
</dd></dl>
<dl class="class">
<dt id="pymatgen.alchemy.filters.SpecieProximityFilter">
<em class="property">class </em><code class="descname">SpecieProximityFilter</code><span class="sig-paren">(</span><em>specie_and_min_dist_dict</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/alchemy/filters.html#SpecieProximityFilter"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.alchemy.filters.SpecieProximityFilter" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#pymatgen.alchemy.filters.AbstractStructureFilter" title="pymatgen.alchemy.filters.AbstractStructureFilter"><code class="xref py py-class docutils literal notranslate"><span class="pre">pymatgen.alchemy.filters.AbstractStructureFilter</span></code></a></p>
<p>This filter removes structures that have certain species that are too close
together.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>specie_and_min_dist_dict</strong> – A species string to float mapping. For
example, {“Na+”: 1} means that all Na+ ions must be at least 1
Angstrom away from each other. Multiple species criteria can be
applied. Note that the testing is done based on the actual object
. If you have a structure with Element, you must use {“Na”:1}
instead to filter based on Element and not Specie.</p>
</dd>
</dl>
<dl class="method">
<dt id="pymatgen.alchemy.filters.SpecieProximityFilter.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/alchemy/filters.html#SpecieProximityFilter.as_dict"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.alchemy.filters.SpecieProximityFilter.as_dict" title="Permalink to this definition">¶</a></dt>
<dd><p>A JSON serializable dict representation of an object.</p>
</dd></dl>
<dl class="classmethod">
<dt id="pymatgen.alchemy.filters.SpecieProximityFilter.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/alchemy/filters.html#SpecieProximityFilter.from_dict"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.alchemy.filters.SpecieProximityFilter.from_dict" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="pymatgen.alchemy.filters.SpecieProximityFilter.test">
<code class="descname">test</code><span class="sig-paren">(</span><em>structure</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/alchemy/filters.html#SpecieProximityFilter.test"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.alchemy.filters.SpecieProximityFilter.test" title="Permalink to this definition">¶</a></dt>
<dd><p>Method to execute the test.</p>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p>(bool) Structures that return true are kept in the Transmuter
object during filtering.</p>
</dd>
</dl>
</dd></dl>
</dd></dl>
<dl class="class">
<dt id="pymatgen.alchemy.filters.SpeciesMaxDistFilter">
<em class="property">class </em><code class="descname">SpeciesMaxDistFilter</code><span class="sig-paren">(</span><em>sp1</em>, <em>sp2</em>, <em>max_dist</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/alchemy/filters.html#SpeciesMaxDistFilter"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.alchemy.filters.SpeciesMaxDistFilter" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#pymatgen.alchemy.filters.AbstractStructureFilter" title="pymatgen.alchemy.filters.AbstractStructureFilter"><code class="xref py py-class docutils literal notranslate"><span class="pre">pymatgen.alchemy.filters.AbstractStructureFilter</span></code></a></p>
<p>This filter removes structures that do have two particular species that are
not nearest neighbors by a predefined max_dist. For instance, if you are
analyzing Li battery materials, you would expect that each Li+ would be
nearest neighbor to lower oxidation state transition metal for
electrostatic reasons. This only works if the structure is oxidation state
decorated, as structures with only elemental sites are automatically
assumed to have net charge of 0.</p>
<dl class="method">
<dt id="pymatgen.alchemy.filters.SpeciesMaxDistFilter.test">
<code class="descname">test</code><span class="sig-paren">(</span><em>structure</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/alchemy/filters.html#SpeciesMaxDistFilter.test"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.alchemy.filters.SpeciesMaxDistFilter.test" title="Permalink to this definition">¶</a></dt>
<dd><p>Method to execute the test.</p>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p>(bool) Structures that return true are kept in the Transmuter
object during filtering.</p>
</dd>
</dl>
</dd></dl>
</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.alchemy.filters.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>