forked from materialsproject/pymatgen
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pymatgen.alchemy.materials.html
329 lines (302 loc) · 19.8 KB
/
pymatgen.alchemy.materials.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
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<title>pymatgen.alchemy.materials 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.materials">
<span id="pymatgen-alchemy-materials-module"></span><h1>pymatgen.alchemy.materials module<a class="headerlink" href="#module-pymatgen.alchemy.materials" title="Permalink to this headline">¶</a></h1>
<dl class="class">
<dt id="pymatgen.alchemy.materials.TransformedStructure">
<em class="property">class </em><code class="descname">TransformedStructure</code><span class="sig-paren">(</span><em>structure</em>, <em>transformations=None</em>, <em>history=None</em>, <em>other_parameters=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/alchemy/materials.html#TransformedStructure"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.alchemy.materials.TransformedStructure" 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>Container object for new structures that include history of
transformations.</p>
<p>Each transformed structure is made up of a sequence of structures with
associated transformation history.</p>
<p>Initializes a transformed structure from a structure.</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>) – Input structure</p></li>
<li><p><strong>transformations</strong> (<em>[</em><em>Transformations</em><em>]</em>) – List of transformations to
apply.</p></li>
<li><p><strong>history</strong> (<em>list</em>) – Previous history.</p></li>
<li><p><strong>other_parameters</strong> (<em>dict</em>) – Additional parameters to be added.</p></li>
</ul>
</dd>
</dl>
<dl class="method">
<dt id="pymatgen.alchemy.materials.TransformedStructure.append_filter">
<code class="descname">append_filter</code><span class="sig-paren">(</span><em>structure_filter</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/alchemy/materials.html#TransformedStructure.append_filter"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.alchemy.materials.TransformedStructure.append_filter" title="Permalink to this definition">¶</a></dt>
<dd><p>Adds a filter.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>structure_filter</strong> (<em>StructureFilter</em>) – A filter implementating the
AbstractStructureFilter API. Tells transmuter waht structures
to retain.</p>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="pymatgen.alchemy.materials.TransformedStructure.append_transformation">
<code class="descname">append_transformation</code><span class="sig-paren">(</span><em>transformation</em>, <em>return_alternatives=False</em>, <em>clear_redo=True</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/alchemy/materials.html#TransformedStructure.append_transformation"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.alchemy.materials.TransformedStructure.append_transformation" title="Permalink to this definition">¶</a></dt>
<dd><p>Appends a transformation to the TransformedStructure.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>transformation</strong> – Transformation to append</p></li>
<li><p><strong>return_alternatives</strong> – Whether to return alternative
TransformedStructures for one-to-many transformations.
return_alternatives can be a number, which stipulates the
total number of structures to return.</p></li>
<li><p><strong>clear_redo</strong> – Boolean indicating whether to clear the redo list.
By default, this is True, meaning any appends clears the
history of undoing. However, when using append_transformation
to do a redo, the redo list should not be cleared to allow
multiple redos.</p></li>
</ul>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="pymatgen.alchemy.materials.TransformedStructure.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/materials.html#TransformedStructure.as_dict"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.alchemy.materials.TransformedStructure.as_dict" title="Permalink to this definition">¶</a></dt>
<dd><p>Dict representation of the TransformedStructure.</p>
</dd></dl>
<dl class="method">
<dt id="pymatgen.alchemy.materials.TransformedStructure.extend_transformations">
<code class="descname">extend_transformations</code><span class="sig-paren">(</span><em>transformations</em>, <em>return_alternatives=False</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/alchemy/materials.html#TransformedStructure.extend_transformations"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.alchemy.materials.TransformedStructure.extend_transformations" title="Permalink to this definition">¶</a></dt>
<dd><p>Extends a sequence of transformations to the TransformedStructure.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>transformations</strong> – Sequence of Transformations</p></li>
<li><p><strong>return_alternatives</strong> – Whether to return alternative
TransformedStructures for one-to-many transformations.
return_alternatives can be a number, which stipulates the
total number of structures to return.</p></li>
</ul>
</dd>
</dl>
</dd></dl>
<dl class="staticmethod">
<dt id="pymatgen.alchemy.materials.TransformedStructure.from_cif_string">
<em class="property">static </em><code class="descname">from_cif_string</code><span class="sig-paren">(</span><em>cif_string</em>, <em>transformations=None</em>, <em>primitive=True</em>, <em>occupancy_tolerance=1.0</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/alchemy/materials.html#TransformedStructure.from_cif_string"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.alchemy.materials.TransformedStructure.from_cif_string" title="Permalink to this definition">¶</a></dt>
<dd><p>Generates TransformedStructure from a cif string.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>cif_string</strong> (<em>str</em>) – Input cif string. Should contain only one
structure. For cifs containing multiple structures, please use
CifTransmuter.</p></li>
<li><p><strong>transformations</strong> (<em>[</em><em>Transformations</em><em>]</em>) – Sequence of transformations
to be applied to the input structure.</p></li>
<li><p><strong>primitive</strong> (<em>bool</em>) – Option to set if the primitive cell should be
extracted. Defaults to True. However, there are certain
instances where you might want to use a non-primitive cell,
e.g., if you are trying to generate all possible orderings of
partial removals or order a disordered structure.</p></li>
<li><p><strong>occupancy_tolerance</strong> (<em>float</em>) – If total occupancy of a site is
between 1 and occupancy_tolerance, the occupancies will be
scaled down to 1.</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>TransformedStructure</p>
</dd>
</dl>
</dd></dl>
<dl class="classmethod">
<dt id="pymatgen.alchemy.materials.TransformedStructure.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/materials.html#TransformedStructure.from_dict"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.alchemy.materials.TransformedStructure.from_dict" title="Permalink to this definition">¶</a></dt>
<dd><p>Creates a TransformedStructure from a dict.</p>
</dd></dl>
<dl class="staticmethod">
<dt id="pymatgen.alchemy.materials.TransformedStructure.from_poscar_string">
<em class="property">static </em><code class="descname">from_poscar_string</code><span class="sig-paren">(</span><em>poscar_string</em>, <em>transformations=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/alchemy/materials.html#TransformedStructure.from_poscar_string"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.alchemy.materials.TransformedStructure.from_poscar_string" title="Permalink to this definition">¶</a></dt>
<dd><p>Generates TransformedStructure from a poscar string.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>poscar_string</strong> (<em>str</em>) – Input POSCAR string.</p></li>
<li><p><strong>transformations</strong> (<em>[</em><em>Transformations</em><em>]</em>) – Sequence of transformations
to be applied to the input structure.</p></li>
</ul>
</dd>
</dl>
</dd></dl>
<dl class="classmethod">
<dt id="pymatgen.alchemy.materials.TransformedStructure.from_snl">
<em class="property">classmethod </em><code class="descname">from_snl</code><span class="sig-paren">(</span><em>snl</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/alchemy/materials.html#TransformedStructure.from_snl"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.alchemy.materials.TransformedStructure.from_snl" title="Permalink to this definition">¶</a></dt>
<dd><p>Create TransformedStructure from SNL.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>snl</strong> (<a class="reference internal" href="pymatgen.util.provenance.html#pymatgen.util.provenance.StructureNL" title="pymatgen.util.provenance.StructureNL"><em>StructureNL</em></a>) – Starting snl</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>TransformedStructure</p>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="pymatgen.alchemy.materials.TransformedStructure.get_vasp_input">
<code class="descname">get_vasp_input</code><span class="sig-paren">(</span><em>vasp_input_set=<class 'pymatgen.io.vasp.sets.MPRelaxSet'></em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/alchemy/materials.html#TransformedStructure.get_vasp_input"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.alchemy.materials.TransformedStructure.get_vasp_input" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns VASP input as a dict of vasp objects.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>vasp_input_set</strong> (<em>pymatgen.io.vaspio_set.VaspInputSet</em>) – input set
to create vasp input files from structures</p>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="pymatgen.alchemy.materials.TransformedStructure.redo_next_change">
<code class="descname">redo_next_change</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/alchemy/materials.html#TransformedStructure.redo_next_change"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.alchemy.materials.TransformedStructure.redo_next_change" title="Permalink to this definition">¶</a></dt>
<dd><p>Redo the last undone change in the TransformedStructure.</p>
<dl class="field-list simple">
<dt class="field-odd">Raises</dt>
<dd class="field-odd"><p><strong>IndexError</strong> – If already at the latest change.</p>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="pymatgen.alchemy.materials.TransformedStructure.set_parameter">
<code class="descname">set_parameter</code><span class="sig-paren">(</span><em>key</em>, <em>value</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/alchemy/materials.html#TransformedStructure.set_parameter"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.alchemy.materials.TransformedStructure.set_parameter" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="pymatgen.alchemy.materials.TransformedStructure.structures">
<code class="descname">structures</code><a class="headerlink" href="#pymatgen.alchemy.materials.TransformedStructure.structures" title="Permalink to this definition">¶</a></dt>
<dd><p>Copy of all structures in the TransformedStructure. A
structure is stored after every single transformation.</p>
</dd></dl>
<dl class="method">
<dt id="pymatgen.alchemy.materials.TransformedStructure.to_snl">
<code class="descname">to_snl</code><span class="sig-paren">(</span><em>authors</em>, <em>projects=None</em>, <em>references=''</em>, <em>remarks=None</em>, <em>data=None</em>, <em>created_at=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/alchemy/materials.html#TransformedStructure.to_snl"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.alchemy.materials.TransformedStructure.to_snl" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="pymatgen.alchemy.materials.TransformedStructure.undo_last_change">
<code class="descname">undo_last_change</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/alchemy/materials.html#TransformedStructure.undo_last_change"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.alchemy.materials.TransformedStructure.undo_last_change" title="Permalink to this definition">¶</a></dt>
<dd><p>Undo the last change in the TransformedStructure.</p>
<dl class="field-list simple">
<dt class="field-odd">Raises</dt>
<dd class="field-odd"><p><strong>IndexError</strong> – If already at the oldest change.</p>
</dd>
</dl>
</dd></dl>
<dl class="attribute">
<dt id="pymatgen.alchemy.materials.TransformedStructure.was_modified">
<code class="descname">was_modified</code><a class="headerlink" href="#pymatgen.alchemy.materials.TransformedStructure.was_modified" title="Permalink to this definition">¶</a></dt>
<dd><p>Boolean describing whether the last transformation on the structure
made any alterations to it one example of when this would return false
is in the case of performing a substitution transformation on the
structure when the specie to replace isn’t in the structure.</p>
</dd></dl>
<dl class="method">
<dt id="pymatgen.alchemy.materials.TransformedStructure.write_vasp_input">
<code class="descname">write_vasp_input</code><span class="sig-paren">(</span><em>vasp_input_set=<class 'pymatgen.io.vasp.sets.MPRelaxSet'></em>, <em>output_dir='.'</em>, <em>create_directory=True</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/alchemy/materials.html#TransformedStructure.write_vasp_input"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.alchemy.materials.TransformedStructure.write_vasp_input" title="Permalink to this definition">¶</a></dt>
<dd><p>Writes VASP input to an output_dir.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>vasp_input_set</strong> – pymatgen.io.vaspio_set.VaspInputSet like object that creates
vasp input files from structures</p></li>
<li><p><strong>output_dir</strong> – Directory to output files</p></li>
<li><p><strong>create_directory</strong> – Create the directory if not present. Defaults to
True.</p></li>
<li><p><strong>**kwargs</strong> – All keyword args supported by the VASP input set.</p></li>
</ul>
</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.materials.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>