forked from materialsproject/pymatgen
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pymatgen.io.lammps.data.html
583 lines (548 loc) · 31.9 KB
/
pymatgen.io.lammps.data.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<title>pymatgen.io.lammps.data 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.io.lammps.data">
<span id="pymatgen-io-lammps-data-module"></span><h1>pymatgen.io.lammps.data module<a class="headerlink" href="#module-pymatgen.io.lammps.data" title="Permalink to this headline">¶</a></h1>
<dl class="class">
<dt id="pymatgen.io.lammps.data.ForceField">
<em class="property">class </em><code class="descname">ForceField</code><span class="sig-paren">(</span><em>mass_info</em>, <em>nonbond_coeffs=None</em>, <em>topo_coeffs=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/io/lammps/data.html#ForceField"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.lammps.data.ForceField" 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>Class carrying most data in Masses and force field sections.</p>
<dl class="attribute">
<dt id="pymatgen.io.lammps.data.ForceField.masses">
<code class="descname">masses</code><a class="headerlink" href="#pymatgen.io.lammps.data.ForceField.masses" title="Permalink to this definition">¶</a></dt>
<dd><p>DataFrame for Masses section.</p>
<dl class="field-list simple">
<dt class="field-odd">Type</dt>
<dd class="field-odd"><p>pandas.DataFrame</p>
</dd>
</dl>
</dd></dl>
<dl class="attribute">
<dt id="pymatgen.io.lammps.data.ForceField.force_field">
<code class="descname">force_field</code><a class="headerlink" href="#pymatgen.io.lammps.data.ForceField.force_field" title="Permalink to this definition">¶</a></dt>
<dd><p>Force field section keywords (keys) and
data (values) as DataFrames.</p>
<dl class="field-list simple">
<dt class="field-odd">Type</dt>
<dd class="field-odd"><p>dict</p>
</dd>
</dl>
</dd></dl>
<dl class="attribute">
<dt id="pymatgen.io.lammps.data.ForceField.maps">
<code class="descname">maps</code><a class="headerlink" href="#pymatgen.io.lammps.data.ForceField.maps" title="Permalink to this definition">¶</a></dt>
<dd><p>Dict for labeling atoms and topologies.</p>
<dl class="field-list simple">
<dt class="field-odd">Type</dt>
<dd class="field-odd"><p>dict</p>
</dd>
</dl>
</dd></dl>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>mass_into</strong> (<em>list</em>) – List of atomic mass info. Elements,
strings (symbols) and floats are all acceptable for the
values, with the first two converted to the atomic mass
of an element. It is recommended to use
OrderedDict.items() to prevent key duplications.
[(“C”, 12.01), (“H”, Element(“H”)), (“O”, “O”), …]</p></li>
<li><p><strong>[</strong><strong>coeffs</strong><strong>]</strong> (<em>nonbond_coeffs</em>) – List of pair or pairij
coefficients, of which the sequence must be sorted
according to the species in mass_dict. Pair or PairIJ
determined by the length of list. Optional with default
to None.</p></li>
<li><p><strong>topo_coeffs</strong> (<em>dict</em>) – <p>Dict with force field coefficients for
molecular topologies. Optional with default
to None. All four valid keys listed below are optional.
Each value is a list of dicts with non optional keys
“coeffs” and “types”, and related class2 force field
keywords as optional keys.
{</p>
<blockquote>
<div><dl class="simple">
<dt>”Bond Coeffs”:</dt><dd><dl class="simple">
<dt>[{“coeffs”: [coeff],</dt><dd><p>”types”: [(“C”, “C”), …]}, …],</p>
</dd>
</dl>
</dd>
<dt>”Angle Coeffs”:</dt><dd><dl class="simple">
<dt>[{“coeffs”: [coeff],</dt><dd><p>”BondBond Coeffs”: [coeff],
“types”: [(“H”, “C”, “H”), …]}, …],</p>
</dd>
</dl>
</dd>
<dt>”Dihedral Coeffs”:</dt><dd><dl class="simple">
<dt>[{“coeffs”: [coeff],</dt><dd><p>”BondBond13 Coeffs”: [coeff],
“types”: [(“H”, “C”, “C”, “H”), …]}, …],</p>
</dd>
</dl>
</dd>
<dt>”Improper Coeffs”:</dt><dd><dl class="simple">
<dt>[{“coeffs”: [coeff],</dt><dd><p>”AngleAngle Coeffs”: [coeff],
“types”: [(“H”, “C”, “C”, “H”), …]}, …],</p>
</dd>
</dl>
</dd>
</dl>
</div></blockquote>
<p>}
Topology of same type or equivalent types (e.g.,
(“C”, “H”) and (“H”, “C”) bonds) are NOT ALLOWED to
be defined MORE THAN ONCE with DIFFERENT coefficients.</p>
</p></li>
</ul>
</dd>
</dl>
<dl class="classmethod">
<dt id="pymatgen.io.lammps.data.ForceField.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/io/lammps/data.html#ForceField.from_dict"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.lammps.data.ForceField.from_dict" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="classmethod">
<dt id="pymatgen.io.lammps.data.ForceField.from_file">
<em class="property">classmethod </em><code class="descname">from_file</code><span class="sig-paren">(</span><em>filename</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/io/lammps/data.html#ForceField.from_file"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.lammps.data.ForceField.from_file" title="Permalink to this definition">¶</a></dt>
<dd><p>Constructor that reads in a file in YAML format.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>filename</strong> (<em>str</em>) – Filename.</p>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="pymatgen.io.lammps.data.ForceField.to_file">
<code class="descname">to_file</code><span class="sig-paren">(</span><em>filename</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/io/lammps/data.html#ForceField.to_file"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.lammps.data.ForceField.to_file" title="Permalink to this definition">¶</a></dt>
<dd><p>Saves object to a file in YAML format.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>filename</strong> (<em>str</em>) – Filename.</p>
</dd>
</dl>
</dd></dl>
</dd></dl>
<dl class="class">
<dt id="pymatgen.io.lammps.data.LammpsBox">
<em class="property">class </em><code class="descname">LammpsBox</code><span class="sig-paren">(</span><em>bounds</em>, <em>tilt=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/io/lammps/data.html#LammpsBox"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.lammps.data.LammpsBox" 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>Object for representing a simulation box in LAMMPS settings.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>bounds</strong> – A (3, 2) array/list of floats setting the
boundaries of simulation box.</p></li>
<li><p><strong>tilt</strong> – A (3,) array/list of floats setting the tilt of
simulation box. Default to None, i.e., use an
orthogonal box.</p></li>
</ul>
</dd>
</dl>
<dl class="method">
<dt id="pymatgen.io.lammps.data.LammpsBox.get_box_shift">
<code class="descname">get_box_shift</code><span class="sig-paren">(</span><em>i</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/io/lammps/data.html#LammpsBox.get_box_shift"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.lammps.data.LammpsBox.get_box_shift" title="Permalink to this definition">¶</a></dt>
<dd><p>Calculates the coordinate shift due to PBC.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>i</strong> – A (n, 3) integer array containing the labels for box</p></li>
<li><p><strong>of n entries.</strong> (<em>images</em>) – </p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>Coorindate shift array with the same shape of i</p>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="pymatgen.io.lammps.data.LammpsBox.get_string">
<code class="descname">get_string</code><span class="sig-paren">(</span><em>significant_figures=6</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/io/lammps/data.html#LammpsBox.get_string"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.lammps.data.LammpsBox.get_string" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the string representation of simulation box in LAMMPS
data file format.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>significant_figures</strong> (<em>int</em>) – No. of significant figures to
output for box settings. Default to 6.</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>String representation</p>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="pymatgen.io.lammps.data.LammpsBox.to_lattice">
<code class="descname">to_lattice</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/io/lammps/data.html#LammpsBox.to_lattice"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.lammps.data.LammpsBox.to_lattice" title="Permalink to this definition">¶</a></dt>
<dd><p>Converts the simulation box to a more powerful Lattice backend.
Note that Lattice is always periodic in 3D space while a
simulation box is not necessarily periodic in all dimensions.</p>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p>Lattice</p>
</dd>
</dl>
</dd></dl>
<dl class="attribute">
<dt id="pymatgen.io.lammps.data.LammpsBox.volume">
<code class="descname">volume</code><a class="headerlink" href="#pymatgen.io.lammps.data.LammpsBox.volume" title="Permalink to this definition">¶</a></dt>
<dd><p>Volume of simulation box.</p>
</dd></dl>
</dd></dl>
<dl class="class">
<dt id="pymatgen.io.lammps.data.LammpsData">
<em class="property">class </em><code class="descname">LammpsData</code><span class="sig-paren">(</span><em>box</em>, <em>masses</em>, <em>atoms</em>, <em>velocities=None</em>, <em>force_field=None</em>, <em>topology=None</em>, <em>atom_style='full'</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/io/lammps/data.html#LammpsData"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.lammps.data.LammpsData" 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>Object for representing the data in a LAMMPS data file.</p>
<p>This is a low level constructor designed to work with parsed
data or other bridging objects (ForceField and Topology). Not
recommended to use directly.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>box</strong> (<a class="reference internal" href="#pymatgen.io.lammps.data.LammpsBox" title="pymatgen.io.lammps.data.LammpsBox"><em>LammpsBox</em></a>) – Simulation box.</p></li>
<li><p><strong>masses</strong> (<em>pandas.DataFrame</em>) – DataFrame with one column
[“mass”] for Masses section.</p></li>
<li><p><strong>atoms</strong> (<em>pandas.DataFrame</em>) – DataFrame with multiple columns
for Atoms section. Column names vary with atom_style.</p></li>
<li><p><strong>velocities</strong> (<em>pandas.DataFrame</em>) – DataFrame with three columns
[“vx”, “vy”, “vz”] for Velocities section. Optional
with default to None. If not None, its index should be
consistent with atoms.</p></li>
<li><p><strong>force_field</strong> (<em>dict</em>) – Data for force field sections. Optional
with default to None. Only keywords in force field and
class 2 force field are valid keys, and each value is a
DataFrame.</p></li>
<li><p><strong>topology</strong> (<em>dict</em>) – Data for topology sections. Optional with
default to None. Only keywords in topology are valid
keys, and each value is a DataFrame.</p></li>
<li><p><strong>atom_style</strong> (<em>str</em>) – Output atom_style. Default to “full”.</p></li>
</ul>
</dd>
</dl>
<dl class="method">
<dt id="pymatgen.io.lammps.data.LammpsData.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/io/lammps/data.html#LammpsData.as_dict"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.lammps.data.LammpsData.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.io.lammps.data.LammpsData.disassemble">
<code class="descname">disassemble</code><span class="sig-paren">(</span><em>atom_labels=None</em>, <em>guess_element=True</em>, <em>ff_label='ff_map'</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/io/lammps/data.html#LammpsData.disassemble"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.lammps.data.LammpsData.disassemble" title="Permalink to this definition">¶</a></dt>
<dd><p>Breaks down LammpsData to building blocks
(LammpsBox, ForceField and a series of Topology).
RESTRICTIONS APPLIED:</p>
<ol class="arabic simple">
<li><dl class="simple">
<dt>No complex force field defined not just on atom</dt><dd><p>types, where the same type or equivalent types of topology
may have more than one set of coefficients.</p>
</dd>
</dl>
</li>
<li><dl class="simple">
<dt>No intermolecular topologies (with atoms from different</dt><dd><p>molecule-ID) since a Topology object includes data for ONE
molecule or structure only.</p>
</dd>
</dl>
</li>
</ol>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>atom_labels</strong> (<em>[</em><em>str</em><em>]</em>) – List of strings (must be different
from one another) for labelling each atom type found in
Masses section. Default to None, where the labels are
automaticaly added based on either element guess or
dummy specie assignment.</p></li>
<li><p><strong>guess_element</strong> (<em>bool</em>) – Whether to guess the element based on
its atomic mass. Default to True, otherwise dummy
species “Qa”, “Qb”, … will be assigned to various
atom types. The guessed or assigned elements will be
reflected on atom labels if atom_labels is None, as
well as on the species of molecule in each Topology.</p></li>
<li><p><strong>ff_label</strong> (<em>str</em>) – Site property key for labeling atoms of
different types. Default to “ff_map”.</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>LammpsBox, ForceField, [Topology]</p>
</dd>
</dl>
</dd></dl>
<dl class="classmethod">
<dt id="pymatgen.io.lammps.data.LammpsData.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/io/lammps/data.html#LammpsData.from_dict"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.lammps.data.LammpsData.from_dict" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="classmethod">
<dt id="pymatgen.io.lammps.data.LammpsData.from_ff_and_topologies">
<em class="property">classmethod </em><code class="descname">from_ff_and_topologies</code><span class="sig-paren">(</span><em>box</em>, <em>ff</em>, <em>topologies</em>, <em>atom_style='full'</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/io/lammps/data.html#LammpsData.from_ff_and_topologies"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.lammps.data.LammpsData.from_ff_and_topologies" title="Permalink to this definition">¶</a></dt>
<dd><p>Constructor building LammpsData from a ForceField object and a
list of Topology objects. Do not support intermolecular
topologies since a Topology object includes data for ONE
molecule or structure only.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>box</strong> (<a class="reference internal" href="#pymatgen.io.lammps.data.LammpsBox" title="pymatgen.io.lammps.data.LammpsBox"><em>LammpsBox</em></a>) – Simulation box.</p></li>
<li><p><strong>ff</strong> (<a class="reference internal" href="#pymatgen.io.lammps.data.ForceField" title="pymatgen.io.lammps.data.ForceField"><em>ForceField</em></a>) – ForceField object with data for Masses and
force field sections.</p></li>
<li><p><strong>topologies</strong> (<em>[</em><a class="reference internal" href="#pymatgen.io.lammps.data.Topology" title="pymatgen.io.lammps.data.Topology"><em>Topology</em></a><em>]</em>) – List of Topology objects with data
for Atoms, Velocities and topology sections.</p></li>
<li><p><strong>atom_style</strong> (<em>str</em>) – Output atom_style. Default to “full”.</p></li>
</ul>
</dd>
</dl>
</dd></dl>
<dl class="classmethod">
<dt id="pymatgen.io.lammps.data.LammpsData.from_file">
<em class="property">classmethod </em><code class="descname">from_file</code><span class="sig-paren">(</span><em>filename</em>, <em>atom_style='full'</em>, <em>sort_id=False</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/io/lammps/data.html#LammpsData.from_file"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.lammps.data.LammpsData.from_file" title="Permalink to this definition">¶</a></dt>
<dd><p>Constructor that parses a file.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>filename</strong> (<em>str</em>) – Filename to read.</p></li>
<li><p><strong>atom_style</strong> (<em>str</em>) – Associated atom_style. Default to “full”.</p></li>
<li><p><strong>sort_id</strong> (<em>bool</em>) – Whether sort each section by id. Default to
True.</p></li>
</ul>
</dd>
</dl>
</dd></dl>
<dl class="classmethod">
<dt id="pymatgen.io.lammps.data.LammpsData.from_structure">
<em class="property">classmethod </em><code class="descname">from_structure</code><span class="sig-paren">(</span><em>structure</em>, <em>ff_elements=None</em>, <em>atom_style='charge'</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/io/lammps/data.html#LammpsData.from_structure"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.lammps.data.LammpsData.from_structure" title="Permalink to this definition">¶</a></dt>
<dd><p>Simple constructor building LammpsData from a structure without
force field parameters and topologies.</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>ff_elements</strong> (<em>[</em><em>str</em><em>]</em>) – List of strings of elements that must
be present due to force field settings but not
necessarily in the structure. Default to None.</p></li>
<li><p><strong>atom_style</strong> (<em>str</em>) – Choose between “atomic” (neutral) and</p></li>
<li><p><strong>"charge"</strong> (<em>charged</em>) – </p></li>
</ul>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="pymatgen.io.lammps.data.LammpsData.get_string">
<code class="descname">get_string</code><span class="sig-paren">(</span><em>distance=6</em>, <em>velocity=8</em>, <em>charge=3</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/io/lammps/data.html#LammpsData.get_string"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.lammps.data.LammpsData.get_string" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the string representation of LammpsData, essentially
the string to be written to a file.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>distance</strong> (<em>int</em>) – No. of significant figures to output for
box settings (bounds and tilt) and atomic coordinates.
Default to 6.</p></li>
<li><p><strong>velocity</strong> (<em>int</em>) – No. of significant figures to output for
velocities. Default to 8.</p></li>
<li><p><strong>charge</strong> (<em>int</em>) – No. of significant figures to output for
charges. Default to 3.</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>String representation</p>
</dd>
</dl>
</dd></dl>
<dl class="attribute">
<dt id="pymatgen.io.lammps.data.LammpsData.structure">
<code class="descname">structure</code><a class="headerlink" href="#pymatgen.io.lammps.data.LammpsData.structure" title="Permalink to this definition">¶</a></dt>
<dd><p>Exports a periodic structure object representing the simulation
box.</p>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p>Structure</p>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="pymatgen.io.lammps.data.LammpsData.write_file">
<code class="descname">write_file</code><span class="sig-paren">(</span><em>filename</em>, <em>distance=6</em>, <em>velocity=8</em>, <em>charge=3</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/io/lammps/data.html#LammpsData.write_file"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.lammps.data.LammpsData.write_file" title="Permalink to this definition">¶</a></dt>
<dd><p>Writes LammpsData to file.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>filename</strong> (<em>str</em>) – Filename.</p></li>
<li><p><strong>distance</strong> (<em>int</em>) – No. of significant figures to output for
box settings (bounds and tilt) and atomic coordinates.
Default to 6.</p></li>
<li><p><strong>velocity</strong> (<em>int</em>) – No. of significant figures to output for
velocities. Default to 8.</p></li>
<li><p><strong>charge</strong> (<em>int</em>) – No. of significant figures to output for
charges. Default to 3.</p></li>
</ul>
</dd>
</dl>
</dd></dl>
</dd></dl>
<dl class="class">
<dt id="pymatgen.io.lammps.data.Topology">
<em class="property">class </em><code class="descname">Topology</code><span class="sig-paren">(</span><em>sites</em>, <em>ff_label=None</em>, <em>charges=None</em>, <em>velocities=None</em>, <em>topologies=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/io/lammps/data.html#Topology"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.lammps.data.Topology" 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>Class carrying most data in Atoms, Velocities and molecular
topology sections for ONE SINGLE Molecule or Structure
object, or a plain list of Sites.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>sites</strong> (<em>[</em><a class="reference internal" href="pymatgen.core.sites.html#pymatgen.core.sites.Site" title="pymatgen.core.sites.Site"><em>Site</em></a><em>] or </em><a class="reference internal" href="pymatgen.core.structure.html#pymatgen.core.structure.SiteCollection" title="pymatgen.core.structure.SiteCollection"><em>SiteCollection</em></a>) – A group of sites in a
list or as a Molecule/Structure.</p></li>
<li><p><strong>ff_label</strong> (<em>str</em>) – Site property key for labeling atoms of
different types. Default to None, i.e., use
site.species_string.</p></li>
<li><p><strong>charges</strong> (<em>[</em><em>q</em><em>, </em><em>..</em><em>]</em>) – Charge of each site in a (n,)
array/list, where n is the No. of sites. Default to
None, i.e., search site property for charges.</p></li>
<li><p><strong>velocities</strong> (<em>[</em><em>[</em><em>vx</em><em>, </em><em>vy</em><em>, </em><em>vz</em><em>]</em><em>, </em><em>..</em><em>]</em>) – Velocity of each site in
a (n, 3) array/list, where n is the No. of sites.
Default to None, i.e., search site property for
velocities.</p></li>
<li><p><strong>topologies</strong> (<em>dict</em>) – <p>Bonds, angles, dihedrals and improper
dihedrals defined by site indices. Default to None,
i.e., no additional topology. All four valid keys
listed below are optional.
{</p>
<blockquote>
<div><p>”Bonds”: [[i, j], …],
“Angles”: [[i, j, k], …],
“Dihedrals”: [[i, j, k, l], …],
“Impropers”: [[i, j, k, l], …]</p>
</div></blockquote>
<p>}</p>
</p></li>
</ul>
</dd>
</dl>
<dl class="classmethod">
<dt id="pymatgen.io.lammps.data.Topology.from_bonding">
<em class="property">classmethod </em><code class="descname">from_bonding</code><span class="sig-paren">(</span><em>molecule</em>, <em>bond=True</em>, <em>angle=True</em>, <em>dihedral=True</em>, <em>tol=0.1</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/io/lammps/data.html#Topology.from_bonding"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.lammps.data.Topology.from_bonding" title="Permalink to this definition">¶</a></dt>
<dd><p>Another constructor that creates an instance from a molecule.
Covalent bonds and other bond-based topologies (angles and
dihedrals) can be automatically determined. Cannot be used for
non bond-based topologies, e.g., improper dihedrals.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>molecule</strong> (<a class="reference internal" href="pymatgen.core.structure.html#pymatgen.core.structure.Molecule" title="pymatgen.core.structure.Molecule"><em>Molecule</em></a>) – Input molecule.</p></li>
<li><p><strong>bond</strong> (<em>bool</em>) – Whether find bonds. If set to False, angle and
dihedral searching will be skipped. Default to True.</p></li>
<li><p><strong>angle</strong> (<em>bool</em>) – Whether find angles. Default to True.</p></li>
<li><p><strong>dihedral</strong> (<em>bool</em>) – Whether find dihedrals. Default to True.</p></li>
<li><p><strong>tol</strong> (<em>float</em>) – Bond distance tolerance. Default to 0.1.
Not recommended to alter.</p></li>
<li><p><strong>**kwargs</strong> – Other kwargs supported by Topology.</p></li>
</ul>
</dd>
</dl>
</dd></dl>
</dd></dl>
<dl class="function">
<dt id="pymatgen.io.lammps.data.lattice_2_lmpbox">
<code class="descname">lattice_2_lmpbox</code><span class="sig-paren">(</span><em>lattice</em>, <em>origin=(0</em>, <em>0</em>, <em>0)</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/io/lammps/data.html#lattice_2_lmpbox"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.io.lammps.data.lattice_2_lmpbox" title="Permalink to this definition">¶</a></dt>
<dd><p>Converts a lattice object to LammpsBox, and calculates the symmetry
operation used.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>lattice</strong> (<a class="reference internal" href="pymatgen.core.lattice.html#pymatgen.core.lattice.Lattice" title="pymatgen.core.lattice.Lattice"><em>Lattice</em></a>) – Input lattice.</p></li>
<li><p><strong>origin</strong> – A (3,) array/list of floats setting lower bounds of
simulation box. Default to (0, 0, 0).</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>LammpsBox, SymmOp</p>
</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.io.lammps.data.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>