forked from materialsproject/pymatgen
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pymatgen.vis.structure_vtk.html
490 lines (441 loc) · 34.7 KB
/
pymatgen.vis.structure_vtk.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
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<title>pymatgen.vis.structure_vtk 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.vis.structure_vtk">
<span id="pymatgen-vis-structure-vtk-module"></span><h1>pymatgen.vis.structure_vtk module<a class="headerlink" href="#module-pymatgen.vis.structure_vtk" title="Permalink to this headline">¶</a></h1>
<p>This module contains classes to wrap Python VTK to make nice molecular plots.</p>
<dl class="class">
<dt id="pymatgen.vis.structure_vtk.MultiStructuresInteractorStyle">
<em class="property">class </em><code class="descname">MultiStructuresInteractorStyle</code><span class="sig-paren">(</span><em>parent</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/vis/structure_vtk.html#MultiStructuresInteractorStyle"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.vis.structure_vtk.MultiStructuresInteractorStyle" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#pymatgen.vis.structure_vtk.StructureInteractorStyle" title="pymatgen.vis.structure_vtk.StructureInteractorStyle"><code class="xref py py-class docutils literal notranslate"><span class="pre">pymatgen.vis.structure_vtk.StructureInteractorStyle</span></code></a></p>
<dl class="method">
<dt id="pymatgen.vis.structure_vtk.MultiStructuresInteractorStyle.keyPressEvent">
<code class="descname">keyPressEvent</code><span class="sig-paren">(</span><em>obj</em>, <em>event</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/vis/structure_vtk.html#MultiStructuresInteractorStyle.keyPressEvent"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.vis.structure_vtk.MultiStructuresInteractorStyle.keyPressEvent" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="class">
<dt id="pymatgen.vis.structure_vtk.MultiStructuresVis">
<em class="property">class </em><code class="descname">MultiStructuresVis</code><span class="sig-paren">(</span><em>element_color_mapping=None</em>, <em>show_unit_cell=True</em>, <em>show_bonds=False</em>, <em>show_polyhedron=False</em>, <em>poly_radii_tol_factor=0.5</em>, <em>excluded_bonding_elements=None</em>, <em>animated_movie_options={'looping_type': 'restart'</em>, <em>'number_of_loops': 1</em>, <em>'time_between_frames': 0.1</em>, <em>'time_between_loops': 1.0}</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/vis/structure_vtk.html#MultiStructuresVis"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.vis.structure_vtk.MultiStructuresVis" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#pymatgen.vis.structure_vtk.StructureVis" title="pymatgen.vis.structure_vtk.StructureVis"><code class="xref py py-class docutils literal notranslate"><span class="pre">pymatgen.vis.structure_vtk.StructureVis</span></code></a></p>
<dl class="attribute">
<dt id="pymatgen.vis.structure_vtk.MultiStructuresVis.DEFAULT_ANIMATED_MOVIE_OPTIONS">
<code class="descname">DEFAULT_ANIMATED_MOVIE_OPTIONS</code><em class="property"> = {'looping_type': 'restart', 'number_of_loops': 1, 'time_between_frames': 0.1, 'time_between_loops': 1.0}</em><a class="headerlink" href="#pymatgen.vis.structure_vtk.MultiStructuresVis.DEFAULT_ANIMATED_MOVIE_OPTIONS" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="pymatgen.vis.structure_vtk.MultiStructuresVis.apply_tags">
<code class="descname">apply_tags</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/vis/structure_vtk.html#MultiStructuresVis.apply_tags"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.vis.structure_vtk.MultiStructuresVis.apply_tags" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="pymatgen.vis.structure_vtk.MultiStructuresVis.display_help">
<code class="descname">display_help</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/vis/structure_vtk.html#MultiStructuresVis.display_help"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.vis.structure_vtk.MultiStructuresVis.display_help" title="Permalink to this definition">¶</a></dt>
<dd><p>Display the help for various keyboard shortcuts.</p>
</dd></dl>
<dl class="method">
<dt id="pymatgen.vis.structure_vtk.MultiStructuresVis.display_info">
<code class="descname">display_info</code><span class="sig-paren">(</span><em>info</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/vis/structure_vtk.html#MultiStructuresVis.display_info"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.vis.structure_vtk.MultiStructuresVis.display_info" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="pymatgen.vis.structure_vtk.MultiStructuresVis.display_warning">
<code class="descname">display_warning</code><span class="sig-paren">(</span><em>warning</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/vis/structure_vtk.html#MultiStructuresVis.display_warning"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.vis.structure_vtk.MultiStructuresVis.display_warning" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="pymatgen.vis.structure_vtk.MultiStructuresVis.erase_info">
<code class="descname">erase_info</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/vis/structure_vtk.html#MultiStructuresVis.erase_info"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.vis.structure_vtk.MultiStructuresVis.erase_info" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="pymatgen.vis.structure_vtk.MultiStructuresVis.erase_warning">
<code class="descname">erase_warning</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/vis/structure_vtk.html#MultiStructuresVis.erase_warning"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.vis.structure_vtk.MultiStructuresVis.erase_warning" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="pymatgen.vis.structure_vtk.MultiStructuresVis.set_animated_movie_options">
<code class="descname">set_animated_movie_options</code><span class="sig-paren">(</span><em>animated_movie_options=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/vis/structure_vtk.html#MultiStructuresVis.set_animated_movie_options"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.vis.structure_vtk.MultiStructuresVis.set_animated_movie_options" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="pymatgen.vis.structure_vtk.MultiStructuresVis.set_structure">
<code class="descname">set_structure</code><span class="sig-paren">(</span><em>structure</em>, <em>reset_camera=True</em>, <em>to_unit_cell=False</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/vis/structure_vtk.html#MultiStructuresVis.set_structure"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.vis.structure_vtk.MultiStructuresVis.set_structure" title="Permalink to this definition">¶</a></dt>
<dd><p>Add a structure to the visualizer.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>structure</strong> – structure to visualize</p></li>
<li><p><strong>reset_camera</strong> – Set to True to reset the camera to a default
determined based on the structure.</p></li>
<li><p><strong>to_unit_cell</strong> – Whether or not to fall back sites into the unit cell.</p></li>
</ul>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="pymatgen.vis.structure_vtk.MultiStructuresVis.set_structures">
<code class="descname">set_structures</code><span class="sig-paren">(</span><em>structures</em>, <em>tags=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/vis/structure_vtk.html#MultiStructuresVis.set_structures"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.vis.structure_vtk.MultiStructuresVis.set_structures" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="class">
<dt id="pymatgen.vis.structure_vtk.StructureInteractorStyle">
<em class="property">class </em><code class="descname">StructureInteractorStyle</code><span class="sig-paren">(</span><em>parent</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/vis/structure_vtk.html#StructureInteractorStyle"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.vis.structure_vtk.StructureInteractorStyle" 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>A custom interactor style for visualizing structures.</p>
<dl class="method">
<dt id="pymatgen.vis.structure_vtk.StructureInteractorStyle.keyPressEvent">
<code class="descname">keyPressEvent</code><span class="sig-paren">(</span><em>obj</em>, <em>event</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/vis/structure_vtk.html#StructureInteractorStyle.keyPressEvent"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.vis.structure_vtk.StructureInteractorStyle.keyPressEvent" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="pymatgen.vis.structure_vtk.StructureInteractorStyle.leftButtonPressEvent">
<code class="descname">leftButtonPressEvent</code><span class="sig-paren">(</span><em>obj</em>, <em>event</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/vis/structure_vtk.html#StructureInteractorStyle.leftButtonPressEvent"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.vis.structure_vtk.StructureInteractorStyle.leftButtonPressEvent" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="pymatgen.vis.structure_vtk.StructureInteractorStyle.leftButtonReleaseEvent">
<code class="descname">leftButtonReleaseEvent</code><span class="sig-paren">(</span><em>obj</em>, <em>event</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/vis/structure_vtk.html#StructureInteractorStyle.leftButtonReleaseEvent"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.vis.structure_vtk.StructureInteractorStyle.leftButtonReleaseEvent" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="pymatgen.vis.structure_vtk.StructureInteractorStyle.mouseMoveEvent">
<code class="descname">mouseMoveEvent</code><span class="sig-paren">(</span><em>obj</em>, <em>event</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/vis/structure_vtk.html#StructureInteractorStyle.mouseMoveEvent"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.vis.structure_vtk.StructureInteractorStyle.mouseMoveEvent" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="class">
<dt id="pymatgen.vis.structure_vtk.StructureVis">
<em class="property">class </em><code class="descname">StructureVis</code><span class="sig-paren">(</span><em>element_color_mapping=None</em>, <em>show_unit_cell=True</em>, <em>show_bonds=False</em>, <em>show_polyhedron=True</em>, <em>poly_radii_tol_factor=0.5</em>, <em>excluded_bonding_elements=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/vis/structure_vtk.html#StructureVis"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.vis.structure_vtk.StructureVis" 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>Provides Structure object visualization using VTK.</p>
<p>Constructs a Structure Visualization.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>element_color_mapping</strong> – Optional color mapping for the elements,
as a dict of {symbol: rgb tuple}. For example, {“Fe”: (255,
123,0), ….} If None is specified, a default based on
Jmol”s color scheme is used.</p></li>
<li><p><strong>show_unit_cell</strong> – Set to False to not show the unit cell
boundaries. Defaults to True.</p></li>
<li><p><strong>show_bonds</strong> – Set to True to show bonds. Defaults to True.</p></li>
<li><p><strong>show_polyhedron</strong> – Set to True to show polyhedrons. Defaults to
False.</p></li>
<li><p><strong>poly_radii_tol_factor</strong> – The polyhedron and bonding code uses the
ionic radii of the elements or species to determine if two
atoms are bonded. This specifies a tolerance scaling factor
such that atoms which are (1 + poly_radii_tol_factor) * sum
of ionic radii apart are still considered as bonded.</p></li>
<li><p><strong>excluded_bonding_elements</strong> – List of atom types to exclude from
bonding determination. Defaults to an empty list. Useful
when trying to visualize a certain atom type in the
framework (e.g., Li in a Li-ion battery cathode material).</p></li>
</ul>
</dd>
</dl>
<dl class="simple">
<dt>Useful keyboard shortcuts implemented.</dt><dd><p>h : Show help
A/a : Increase/decrease cell by one unit vector in a-direction
B/b : Increase/decrease cell by one unit vector in b-direction
C/c : Increase/decrease cell by one unit vector in c-direction
# : Toggle showing of polyhedrons
- : Toggle showing of bonds
[ : Decrease poly_radii_tol_factor by 0.05
] : Increase poly_radii_tol_factor by 0.05
r : Reset camera direction
o : Orthogonalize structure
Up/Down : Rotate view along Up direction by 90 clock/anticlockwise
Left/right : Rotate view along camera direction by 90
clock/anticlockwise</p>
</dd>
</dl>
<dl class="method">
<dt id="pymatgen.vis.structure_vtk.StructureVis.add_bonds">
<code class="descname">add_bonds</code><span class="sig-paren">(</span><em>neighbors</em>, <em>center</em>, <em>color=None</em>, <em>opacity=None</em>, <em>radius=0.1</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/vis/structure_vtk.html#StructureVis.add_bonds"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.vis.structure_vtk.StructureVis.add_bonds" title="Permalink to this definition">¶</a></dt>
<dd><p>Adds bonds for a site.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>neighbors</strong> – Neighbors of the site.</p></li>
<li><p><strong>center</strong> – The site in the center for all bonds.</p></li>
<li><p><strong>color</strong> – Color of the tubes representing the bonds</p></li>
<li><p><strong>opacity</strong> – Opacity of the tubes representing the bonds</p></li>
<li><p><strong>radius</strong> – Radius of tube s representing the bonds</p></li>
</ul>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="pymatgen.vis.structure_vtk.StructureVis.add_edges">
<code class="descname">add_edges</code><span class="sig-paren">(</span><em>edges, type='line', linewidth=2, color=[0.0, 0.0, 0.0]</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/vis/structure_vtk.html#StructureVis.add_edges"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.vis.structure_vtk.StructureVis.add_edges" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="pymatgen.vis.structure_vtk.StructureVis.add_faces">
<code class="descname">add_faces</code><span class="sig-paren">(</span><em>faces</em>, <em>color</em>, <em>opacity=0.35</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/vis/structure_vtk.html#StructureVis.add_faces"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.vis.structure_vtk.StructureVis.add_faces" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="pymatgen.vis.structure_vtk.StructureVis.add_line">
<code class="descname">add_line</code><span class="sig-paren">(</span><em>start</em>, <em>end</em>, <em>color=(0.5</em>, <em>0.5</em>, <em>0.5)</em>, <em>width=1</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/vis/structure_vtk.html#StructureVis.add_line"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.vis.structure_vtk.StructureVis.add_line" title="Permalink to this definition">¶</a></dt>
<dd><p>Adds a line.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>start</strong> – Starting coordinates for line.</p></li>
<li><p><strong>end</strong> – Ending coordinates for line.</p></li>
<li><p><strong>color</strong> – Color for text as RGB. Defaults to grey.</p></li>
<li><p><strong>width</strong> – Width of line. Defaults to 1.</p></li>
</ul>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="pymatgen.vis.structure_vtk.StructureVis.add_partial_sphere">
<code class="descname">add_partial_sphere</code><span class="sig-paren">(</span><em>coords</em>, <em>radius</em>, <em>color</em>, <em>start=0</em>, <em>end=360</em>, <em>opacity=1.0</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/vis/structure_vtk.html#StructureVis.add_partial_sphere"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.vis.structure_vtk.StructureVis.add_partial_sphere" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="pymatgen.vis.structure_vtk.StructureVis.add_picker">
<code class="descname">add_picker</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/vis/structure_vtk.html#StructureVis.add_picker"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.vis.structure_vtk.StructureVis.add_picker" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="pymatgen.vis.structure_vtk.StructureVis.add_picker_fixed">
<code class="descname">add_picker_fixed</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/vis/structure_vtk.html#StructureVis.add_picker_fixed"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.vis.structure_vtk.StructureVis.add_picker_fixed" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="pymatgen.vis.structure_vtk.StructureVis.add_polyhedron">
<code class="descname">add_polyhedron</code><span class="sig-paren">(</span><em>neighbors, center, color, opacity=1.0, draw_edges=False, edges_color=[0.0, 0.0, 0.0], edges_linewidth=2</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/vis/structure_vtk.html#StructureVis.add_polyhedron"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.vis.structure_vtk.StructureVis.add_polyhedron" title="Permalink to this definition">¶</a></dt>
<dd><p>Adds a polyhedron.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>neighbors</strong> – Neighbors of the polyhedron (the vertices).</p></li>
<li><p><strong>center</strong> – The atom in the center of the polyhedron.</p></li>
<li><p><strong>color</strong> – Color for text as RGB.</p></li>
<li><p><strong>opacity</strong> – Opacity of the polyhedron</p></li>
<li><p><strong>draw_edges</strong> – If set to True, the a line will be drawn at each edge</p></li>
<li><p><strong>edges_color</strong> – Color of the line for the edges</p></li>
<li><p><strong>edges_linewidth</strong> – Width of the line drawn for the edges</p></li>
</ul>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="pymatgen.vis.structure_vtk.StructureVis.add_site">
<code class="descname">add_site</code><span class="sig-paren">(</span><em>site</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/vis/structure_vtk.html#StructureVis.add_site"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.vis.structure_vtk.StructureVis.add_site" title="Permalink to this definition">¶</a></dt>
<dd><p>Add a site to the render window. The site is displayed as a sphere, the
color of which is determined based on the element. Partially occupied
sites are displayed as a single element color, though the site info
still shows the partial occupancy.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>site</strong> – Site to add.</p>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="pymatgen.vis.structure_vtk.StructureVis.add_text">
<code class="descname">add_text</code><span class="sig-paren">(</span><em>coords</em>, <em>text</em>, <em>color=(0</em>, <em>0</em>, <em>0)</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/vis/structure_vtk.html#StructureVis.add_text"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.vis.structure_vtk.StructureVis.add_text" title="Permalink to this definition">¶</a></dt>
<dd><p>Add text at a coordinate.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>coords</strong> – Coordinates to add text at.</p></li>
<li><p><strong>text</strong> – Text to place.</p></li>
<li><p><strong>color</strong> – Color for text as RGB. Defaults to black.</p></li>
</ul>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="pymatgen.vis.structure_vtk.StructureVis.add_triangle">
<code class="descname">add_triangle</code><span class="sig-paren">(</span><em>neighbors, color, center=None, opacity=0.4, draw_edges=False, edges_color=[0.0, 0.0, 0.0], edges_linewidth=2</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/vis/structure_vtk.html#StructureVis.add_triangle"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.vis.structure_vtk.StructureVis.add_triangle" title="Permalink to this definition">¶</a></dt>
<dd><p>Adds a triangular surface between three atoms.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>atoms</strong> – Atoms between which a triangle will be drawn.</p></li>
<li><p><strong>color</strong> – Color for triangle as RGB.</p></li>
<li><p><strong>center</strong> – The “central atom” of the triangle</p></li>
<li><p><strong>opacity</strong> – opacity of the triangle</p></li>
<li><p><strong>draw_edges</strong> – If set to True, the a line will be drawn at each edge</p></li>
<li><p><strong>edges_color</strong> – Color of the line for the edges</p></li>
<li><p><strong>edges_linewidth</strong> – Width of the line drawn for the edges</p></li>
</ul>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="pymatgen.vis.structure_vtk.StructureVis.display_help">
<code class="descname">display_help</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/vis/structure_vtk.html#StructureVis.display_help"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.vis.structure_vtk.StructureVis.display_help" title="Permalink to this definition">¶</a></dt>
<dd><p>Display the help for various keyboard shortcuts.</p>
</dd></dl>
<dl class="method">
<dt id="pymatgen.vis.structure_vtk.StructureVis.orthongonalize_structure">
<code class="descname">orthongonalize_structure</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/vis/structure_vtk.html#StructureVis.orthongonalize_structure"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.vis.structure_vtk.StructureVis.orthongonalize_structure" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="pymatgen.vis.structure_vtk.StructureVis.redraw">
<code class="descname">redraw</code><span class="sig-paren">(</span><em>reset_camera=False</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/vis/structure_vtk.html#StructureVis.redraw"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.vis.structure_vtk.StructureVis.redraw" title="Permalink to this definition">¶</a></dt>
<dd><p>Redraw the render window.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>reset_camera</strong> – Set to True to reset the camera to a
pre-determined default for each structure. Defaults to False.</p>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="pymatgen.vis.structure_vtk.StructureVis.rotate_view">
<code class="descname">rotate_view</code><span class="sig-paren">(</span><em>axis_ind=0</em>, <em>angle=0</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/vis/structure_vtk.html#StructureVis.rotate_view"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.vis.structure_vtk.StructureVis.rotate_view" title="Permalink to this definition">¶</a></dt>
<dd><p>Rotate the camera view.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>axis_ind</strong> – Index of axis to rotate. Defaults to 0, i.e., a-axis.</p></li>
<li><p><strong>angle</strong> – Angle to rotate by. Defaults to 0.</p></li>
</ul>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="pymatgen.vis.structure_vtk.StructureVis.set_structure">
<code class="descname">set_structure</code><span class="sig-paren">(</span><em>structure</em>, <em>reset_camera=True</em>, <em>to_unit_cell=True</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/vis/structure_vtk.html#StructureVis.set_structure"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.vis.structure_vtk.StructureVis.set_structure" title="Permalink to this definition">¶</a></dt>
<dd><p>Add a structure to the visualizer.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>structure</strong> – structure to visualize</p></li>
<li><p><strong>reset_camera</strong> – Set to True to reset the camera to a default
determined based on the structure.</p></li>
<li><p><strong>to_unit_cell</strong> – Whether or not to fall back sites into the unit cell.</p></li>
</ul>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="pymatgen.vis.structure_vtk.StructureVis.show">
<code class="descname">show</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/vis/structure_vtk.html#StructureVis.show"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.vis.structure_vtk.StructureVis.show" title="Permalink to this definition">¶</a></dt>
<dd><p>Display the visualizer.</p>
</dd></dl>
<dl class="method">
<dt id="pymatgen.vis.structure_vtk.StructureVis.write_image">
<code class="descname">write_image</code><span class="sig-paren">(</span><em>filename='image.png'</em>, <em>magnification=1</em>, <em>image_format='png'</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/vis/structure_vtk.html#StructureVis.write_image"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.vis.structure_vtk.StructureVis.write_image" title="Permalink to this definition">¶</a></dt>
<dd><p>Save render window to an image.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>filename</strong> – filename to save to. Defaults to image.png.</p></li>
<li><p><strong>magnification</strong> – magnification. Use it to render high res images.</p></li>
<li><p><strong>image_format</strong> – choose between jpeg, png. Png is the default.</p></li>
</ul>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="pymatgen.vis.structure_vtk.StructureVis.zoom">
<code class="descname">zoom</code><span class="sig-paren">(</span><em>factor</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/vis/structure_vtk.html#StructureVis.zoom"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.vis.structure_vtk.StructureVis.zoom" title="Permalink to this definition">¶</a></dt>
<dd><p>Zoom the camera view by a factor.</p>
</dd></dl>
</dd></dl>
<dl class="function">
<dt id="pymatgen.vis.structure_vtk.make_movie">
<code class="descname">make_movie</code><span class="sig-paren">(</span><em>structures</em>, <em>output_filename='movie.mp4'</em>, <em>zoom=1.0</em>, <em>fps=20</em>, <em>bitrate='10000k'</em>, <em>quality=1</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/vis/structure_vtk.html#make_movie"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.vis.structure_vtk.make_movie" title="Permalink to this definition">¶</a></dt>
<dd><p>Generate a movie from a sequence of structures using vtk and ffmpeg.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>structures</strong> (<em>[</em><a class="reference internal" href="pymatgen.core.structure.html#pymatgen.core.structure.Structure" title="pymatgen.core.structure.Structure"><em>Structure</em></a><em>]</em>) – sequence of structures</p></li>
<li><p><strong>output_filename</strong> (<em>str</em>) – filename for structure output. defaults to
movie.mp4</p></li>
<li><p><strong>zoom</strong> (<em>float</em>) – A zoom to be applied to the visualizer. Defaults to 1.0.</p></li>
<li><p><strong>fps</strong> (<em>int</em>) – Frames per second for the movie. Defaults to 20.</p></li>
<li><p><strong>bitrate</strong> (<em>str</em>) – Video bitate. Defaults to “10000k” (fairly high
quality).</p></li>
<li><p><strong>quality</strong> (<em>int</em>) – A quality scale. Defaults to 1.</p></li>
<li><p><strong>**kwargs</strong> – Any kwargs supported by StructureVis to modify the images
generated.</p></li>
</ul>
</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.vis.structure_vtk.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>