File: read_data.html

package info (click to toggle)
liggghts 3.8.0%2Brepack1-7
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 27,240 kB
  • sloc: cpp: 151,239; javascript: 9,132; sh: 910; python: 676; makefile: 459; ansic: 411
file content (853 lines) | stat: -rw-r--r-- 38,046 bytes parent folder | download | duplicates (5)
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
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853


<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
  <meta charset="utf-8">
  
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  
  <title>read_data command &mdash; LIGGGHTS v3.X documentation</title>
  

  
  
  
  

  

  
  
    

  

  
  
    <link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
  

  

  
    <link rel="top" title="LIGGGHTS v3.X documentation" href="index.html"/> 

  
  <script src="_static/js/modernizr.min.js"></script>

</head>

<body class="wy-body-for-nav" role="document">

   
  <div class="wy-grid-for-nav">

    
    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
      <div class="wy-side-scroll">
        <div class="wy-side-nav-search">
          

          
            <a href="Manual.html" class="icon icon-home"> LIGGGHTS
          

          
          </a>

          
            
            
              <div class="version">
                v3.X
              </div>
            
          

          
<div role="search">
  <form id="rtd-search-form" class="wy-form" action="search.html" method="get">
    <input type="text" name="q" placeholder="Search docs" />
    <input type="hidden" name="check_keywords" value="yes" />
    <input type="hidden" name="area" value="default" />
  </form>
</div>

          
        </div>

        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
          
            
            
              
            
            
              <ul>
<li class="toctree-l1"><a class="reference internal" href="Section_intro.html">1. Introduction</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_start.html">2. Getting Started</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_input_script.html">3. Input Script</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_commands.html">4. Commands</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_gran_models.html">5. Contact models</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_mesh_modules.html">6. Mesh modules</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_packages.html">7. Packages</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_howto.html">8. How-to discussions</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_modify.html">9. Modifying &amp; extending LIGGGHTS(R)-PUBLIC</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_python.html">10. Python interface to LIGGGHTS(R)-PUBLIC</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_errors.html">11. Errors</a></li>
</ul>

            
          
        </div>
      </div>
    </nav>

    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">

      
      <nav class="wy-nav-top" role="navigation" aria-label="top navigation">
        
          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
          <a href="Manual.html">LIGGGHTS</a>
        
      </nav>


      
      <div class="wy-nav-content">
        <div class="rst-content">
          















<div role="navigation" aria-label="breadcrumbs navigation">

  <ul class="wy-breadcrumbs">
    
      <li><a href="Manual.html">Docs</a> &raquo;</li>
        
      <li>read_data command</li>
    
    
      <li class="wy-breadcrumbs-aside">
        
            
            <a href="_sources/read_data.txt" rel="nofollow"> View page source</a>
          
          <a href="http://www.cfdem.com"> Website</a>
          
            <a href="Section_commands.html#comm" rel="nofollow"> Commands</a>
            
          
        
      </li>
    
  </ul>

  
  <hr/>
  
</div>
          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
           <div itemprop="articleBody">
            
  <div class="section" id="read-data-command">
<span id="index-0"></span><h1>read_data command<a class="headerlink" href="#read-data-command" title="Permalink to this headline">¶</a></h1>
<div class="section" id="syntax">
<h2>Syntax<a class="headerlink" href="#syntax" title="Permalink to this headline">¶</a></h2>
<div class="highlight-python"><div class="highlight"><pre>read_data file keyword args ...
</pre></div>
</div>
<ul class="simple">
<li>file = name of data file to read in</li>
<li>zero or more keyword/arg pairs may be appended</li>
<li>keyword = <em>fix</em></li>
</ul>
<pre class="literal-block">
<em>fix</em> args = fix-ID header-string section-string
  fix-ID = ID of fix to process header lines and sections of data file
  header-string = header lines containing this string will be passed to fix
  section-string = section names with this string will be passed to fix
</pre>
</div>
<div class="section" id="examples">
<h2>Examples<a class="headerlink" href="#examples" title="Permalink to this headline">¶</a></h2>
<div class="highlight-python"><div class="highlight"><pre>read_data data.lj
read_data ../run7/data.polymer.gz
read_data data.protein fix mycmap crossterm CMAP
</pre></div>
</div>
</div>
<div class="section" id="description">
<h2>Description<a class="headerlink" href="#description" title="Permalink to this headline">¶</a></h2>
<p>Read in a data file containing information LIGGGHTS(R)-PUBLIC needs to run a
simulation.  The file can be ASCII text or a gzipped text file
(detected by a .gz suffix).  This is one of 3 ways to specify initial
atom coordinates; see the <a class="reference internal" href="read_restart.html"><em>read_restart</em></a> and
<a class="reference internal" href="create_atoms.html"><em>create_atoms</em></a> commands for alternative methods.</p>
<p>The structure of the data file is important, though many settings and
sections are optional or can come in any order.  See the examples
directory for sample data files for different problems.</p>
<p>A data file has a header and a body.  The header appears first.  The
first line of the header is always skipped; it typically contains a
description of the file.  Then lines are read one at a time.  Lines
can have a trailing comment starting with &#8216;#&#8217; that is ignored.  If the
line is blank (only whitespace after comment is deleted), it is
skipped.  If the line contains a header keyword, the corresponding
value(s) is read from the line.  If it doesn&#8217;t contain a header
keyword, the line begins the body of the file.</p>
<p>The body of the file contains zero or more sections.  The first line
of a section has only a keyword.  The next line is skipped.  The
remaining lines of the section contain values.  The number of lines
depends on the section keyword as described below.  Zero or more blank
lines can be used between sections.  Sections can appear in any order,
with a few exceptions as noted below.</p>
<p>The keyword <em>fix</em> can be used one or more times.  Each usage specifies
a fix that will be used to process a specific portion of the data
file.  Any header line containing <em>header-string</em> and any section with
a name containing <em>section-string</em> will be passed to the specified
fix.  See the <code class="xref doc docutils literal"><span class="pre">fix</span> <span class="pre">property/atom</span></code> command for
an example of a fix that operates in this manner.  The doc page for
the fix defines the syntax of the header line(s) and section(s) that
it reads from the data file.  Note that the <em>header-string</em> can be
specified as NULL, in which case no header lines are passed to the
fix.  This means that it can infer the length of its Section from
standard header settings, such as the number of atoms.</p>
<p>The formatting of individual lines in the data file (indentation,
spacing between words and numbers) is not important except that header
and section keywords (e.g. atoms, xlo xhi, Masses, Bond Coeffs) must
be capitalized as shown and can&#8217;t have extra white space between their
words - e.g. two spaces or a tab between the 2 words in &#8220;xlo xhi&#8221; or
the 2 words in &#8220;Bond Coeffs&#8221;, is not valid.</p>
<hr class="docutils" />
<p>These are the recognized header keywords.  Header lines can come in
any order.  The value(s) are read from the beginning of the line.
Thus the keyword <em>atoms</em> should be in a line like &#8220;1000 atoms&#8221;; the
keyword <em>ylo yhi</em> should be in a line like &#8220;-10.0 10.0 ylo yhi&#8221;; the
keyword <em>xy xz yz</em> should be in a line like &#8220;0.0 5.0 6.0 xy xz yz&#8221;.
All these settings have a default value of 0, except the lo/hi box
size defaults are -0.5 and 0.5.  A line need only appear if the value
is different than the default.</p>
<ul class="simple">
<li><em>atoms</em> = # of atoms in system</li>
<li><em>bonds</em> = # of bonds in system</li>
<li><em>atom types</em> = # of atom types in system</li>
<li><em>bond types</em> = # of bond types in system</li>
<li><em>extra bond per atom</em> = leave space for this many new bonds per atom</li>
<li><em>ellipsoids</em> = # of ellipsoids in system</li>
<li><em>lines</em> = # of line segments in system</li>
<li><em>xlo xhi</em> = simulation box boundaries in x dimension</li>
<li><em>ylo yhi</em> = simulation box boundaries in y dimension</li>
<li><em>zlo zhi</em> = simulation box boundaries in z dimension</li>
<li><em>xy xz yz</em> = simulation box tilt factors for triclinic system</li>
</ul>
<p>The initial simulation box size is determined by the lo/hi settings.
In any dimension, the system may be periodic or non-periodic; see the
<a class="reference internal" href="boundary.html"><em>boundary</em></a> command.</p>
<p>If the <em>xy xz yz</em> line does not appear, LIGGGHTS(R)-PUBLIC will set up an
axis-aligned (orthogonal) simulation box.  If the line does appear,
LIGGGHTS(R)-PUBLIC creates a non-orthogonal simulation domain shaped as a
parallelepiped with triclinic symmetry.  The parallelepiped has its
&#8220;origin&#8221; at (xlo,ylo,zlo) and is defined by 3 edge vectors starting
from the origin given by A = (xhi-xlo,0,0); B = (xy,yhi-ylo,0); C =
(xz,yz,zhi-zlo).  <em>Xy,xz,yz</em> can be 0.0 or positive or negative values
and are called &#8220;tilt factors&#8221; because they are the amount of
displacement applied to faces of an originally orthogonal box to
transform it into the parallelepiped.</p>
<p>The tilt factors (xy,xz,yz) can not skew the box more than half the
distance of the corresponding parallel box length.  For example, if
xlo = 2 and xhi = 12, then the x box length is 10 and the xy tilt
factor must be between -5 and 5.  Similarly, both xz and yz must be
between -(xhi-xlo)/2 and +(yhi-ylo)/2.  Note that this is not a
limitation, since if the maximum tilt factor is 5 (as in this
example), then configurations with tilt = ..., -15, -5, 5, 15, 25,
... are all geometrically equivalent.</p>
<p>See <span class="xref std std-ref">Section_howto 12</span> of the doc pages
for a geometric description of triclinic boxes, as defined by LIGGGHTS(R)-PUBLIC,
and how to transform these parameters to and from other commonly used
triclinic representations.</p>
<p>When a triclinic system is used, the simulation domain must be
periodic in any dimensions with a non-zero tilt factor, as defined by
the <a class="reference internal" href="boundary.html"><em>boundary</em></a> command.  I.e. if the xy tilt factor is
non-zero, then both the x and y dimensions must be periodic.
Similarly, x and z must be periodic if xz is non-zero and y and z must
be periodic if yz is non-zero.  Also note that if your simulation will
tilt the box, e.g. via the <a class="reference internal" href="fix_deform.html"><em>fix deform</em></a> command, the
simulation box must be defined as triclinic, even if the tilt factors
are initially 0.0.</p>
<p>For 2d simulations, the <em>zlo zhi</em> values should be set to bound the z
coords for atoms that appear in the file; the default of -0.5 0.5 is
valid if all z coords are 0.0.  For 2d triclinic simulations, the xz
and yz tilt factors must be 0.0.</p>
<p>If the system is periodic (in a dimension), then atom coordinates can
be outside the bounds (in that dimension); they will be remapped (in a
periodic sense) back inside the box.</p>
<div class="admonition warning">
<p class="first admonition-title">Warning</p>
<p class="last">If the system is non-periodic (in a dimension), then
all atoms in the data file must have coordinates (in that dimension)
that are &#8220;greater than or equal to&#8221; the lo value and &#8220;less than or
equal to&#8221; the hi value.  If the non-periodic dimension is of style
&#8220;fixed&#8221; (see the <a class="reference internal" href="boundary.html"><em>boundary</em></a> command), then the atom
coords must be strictly &#8220;less than&#8221; the hi value, due to the way
LIGGGHTS(R)-PUBLIC assign atoms to processors.  Note that you should not make the
lo/hi values radically smaller/larger than the extent of the atoms.
For example, if your atoms extend from 0 to 50, you should not specify
the box bounds as -10000 and 10000.  This is because LIGGGHTS(R)-PUBLIC uses the
specified box size to layout the 3d grid of processors.  A huge
(mostly empty) box will be sub-optimal for performance when using
&#8220;fixed&#8221; boundary conditions (see the <a class="reference internal" href="boundary.html"><em>boundary</em></a>
command).  When using &#8220;shrink-wrap&#8221; boundary conditions (see the
<a class="reference internal" href="boundary.html"><em>boundary</em></a> command), a huge (mostly empty) box may cause
a parallel simulation to lose atoms the first time that LIGGGHTS(R)-PUBLIC
shrink-wraps the box around the atoms.</p>
</div>
<p>The &#8220;extra bond per atom&#8221; setting should be used if new bonds will be
added to the system when a simulation runs, e.g. by using the <a class="reference internal" href="fix_bond_create.html"><em>fix bond/create</em></a> command.  This will pre-allocate
space in LIGGGHTS(R)-PUBLIC data structures for storing the new bonds.</p>
<hr class="docutils" />
<p>These are the section keywords for the body of the file.</p>
<ul class="simple">
<li><em>Atoms, Velocities, Masses, Ellipsoids, Lines</em> = atom-property sections</li>
<li><em>Bonds</em> = molecular topology sections</li>
<li><em>Pair Coeffs, PairIJ Coeffs, Bond Coeffs</em> = force field sections</li>
<li><em>BondBond Coeffs, BondAngle Coeffs, MiddleBondTorsion Coeffs,    EndBondTorsion Coeffs</em> = class 2 force field sections</li>
</ul>
<p>Each section is listed below in alphabetic order.  The format of each
section is described including the number of lines it must contain and
rules (if any) for where it can appear in the data file.</p>
<p>Any individual line in the various sections can have a trailing
comment starting with &#8220;#&#8221; for annotation purposes.  E.g. in the
Atoms section:</p>
<div class="highlight-python"><div class="highlight"><pre>10 1 17 -1.0 10.0 5.0 6.0   # salt ion
</pre></div>
</div>
<hr class="docutils" />
<p><em>Atoms</em> section:</p>
<ul class="simple">
<li>one line per atom</li>
<li>line syntax: depends on atom style</li>
</ul>
<p>An <em>Atoms</em> section must appear in the data file if natoms &gt; 0 in the
header section.  The atoms can be listed in any order.  These are the
line formats for each <a class="reference internal" href="atom_style.html"><em>atom style</em></a> in LIGGGHTS(R)-PUBLIC.  As
discussed below, each line can optionally have 3 flags (nx,ny,nz)
appended to it, which indicate which image of a periodic simulation
box the atom is in.  These may be important to include for some kinds
of analysis.</p>
<table border="1" class="docutils">
<colgroup>
<col width="17%" />
<col width="83%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td>bond</td>
<td>atom-ID molecule-ID atom-type x y z</td>
</tr>
<tr class="row-even"><td>ellipsoid</td>
<td>atom-ID atom-type ellipsoidflag density x y z</td>
</tr>
<tr class="row-odd"><td>sphere</td>
<td>atom-ID atom-type diameter density x y z</td>
</tr>
<tr class="row-even"><td>line</td>
<td>atom-ID molecule-ID atom-type lineflag density x y z</td>
</tr>
<tr class="row-odd"><td>molecular</td>
<td>atom-ID molecule-ID atom-type x y z</td>
</tr>
<tr class="row-even"><td>hybrid</td>
<td>atom-ID atom-type x y z sub-style1 sub-style2 ...</td>
</tr>
</tbody>
</table>
<p>The keywords have these meanings:</p>
<ul class="simple">
<li>atom-ID = integer ID of atom</li>
<li>molecule-ID = integer ID of molecule the atom belongs to</li>
<li>atom-type = type of atom (1-Ntype)</li>
<li>q = charge on atom (charge units)</li>
<li>diameter = diameter of spherical atom (distance units)</li>
<li>ellipsoidflag = 1 for ellipsoidal particles, 0 for point particles</li>
<li>lineflag = 1 for line segment particles, 0 for point particles</li>
<li>triangleflag = 1 for triangular particles, 0 for point particles</li>
<li>density = density of particle (mass/distance^3 or mass/distance^2 or mass/distance units, depending on dimensionality of particle)</li>
<li>mass = mass of particle (mass units)</li>
<li>volume = volume of particle (distance^3 units)</li>
<li>x,y,z = coordinates of atom</li>
</ul>
<p>The units for these quantities depend on the unit style; see the
<a class="reference internal" href="units.html"><em>units</em></a> command for details.</p>
<p>For 2d simulations specify z as 0.0, or a value within the <em>zlo zhi</em>
setting in the data file header.</p>
<p>The atom-ID is used to identify the atom throughout the simulation and
in dump files.  Normally, it is a unique value from 1 to Natoms for
each atom.  Unique values larger than Natoms can be used, but they
will cause extra memory to be allocated on each processor, if an atom
map array is used (see the <a class="reference internal" href="atom_modify.html"><em>atom_modify</em></a> command).
If an atom map array is not used (e.g. an atomic system with no
bonds), and velocities are not assigned in the data file, and you
don&#8217;t care if unique atom IDs appear in dump files, then the atom-IDs
can all be set to 0.</p>
<p>The molecule ID is a 2nd identifier attached to an atom.  Normally, it
is a number from 1 to N, identifying which molecule the atom belongs
to.  It can be 0 if it is an unbonded atom or if you don&#8217;t care to
keep track of molecule assignments.</p>
<p>The diameter specifies the size of a finite-size spherical particle.
It can be set to 0.0, which means that atom is a point particle.</p>
<p>The ellipsoidflag, lineflag, triangleflag determine
whether the particle is a finite-size ellipsoid or line or triangle or
body of finite size, or whether the particle is a point particle.
Additional attributes must be defined for each ellipsoid, line,
triangle, or body in the corresponding <em>Ellipsoids</em>, <em>Lines</em>,
<em>Triangles</em> section.</p>
<p>Some pair styles and fixes and computes that operate on finite-size
particles allow for a mixture of finite-size and point particles.  See
the doc pages of individual commands for details.</p>
<p>For finite-size particles, the density is used in conjunction with the
particle volume to set the mass of each particle as mass = density *
volume.  In this context, volume can be a 3d quantity (for spheres or
ellipsoids), a 2d quantity (for triangles), or a 1d quantity (for line
segments).  If the volume is 0.0, meaning a point particle, then the
density value is used as the mass.  One exception is for the body atom
style, in which case the mass of each particle (body or point
particle) is specified explicitly.  This is because the volume of the
body is unknown.</p>
<p>For atom_style hybrid, following the 5 initial values (ID,type,x,y,z),
specific values for each sub-style must be listed.  The order of the
sub-styles is the same as they were listed in the
<a class="reference internal" href="atom_style.html"><em>atom_style</em></a> command.  The sub-style specific values
are those that are not the 5 standard ones (ID,type,x,y,z).  For
example, for the &#8220;charge&#8221; sub-style, a &#8220;q&#8221; value would appear.  For
the &#8220;full&#8221; sub-style, a &#8220;molecule-ID&#8221; and &#8220;q&#8221; would appear.  These are
listed in the same order they appear as listed above.  Thus if</p>
<div class="highlight-python"><div class="highlight"><pre>atom_style hybrid charge sphere
</pre></div>
</div>
<p>were used in the input script, each atom line would have these fields:</p>
<div class="highlight-python"><div class="highlight"><pre>atom-ID atom-type x y z q diameter density
</pre></div>
</div>
<p>Note that if a non-standard value is defined by multiple sub-styles,
it must appear mutliple times in the atom line.  E.g. the atom line
for atom_style hybrid dipole full would list &#8220;q&#8221; twice:</p>
<div class="highlight-python"><div class="highlight"><pre>atom-ID atom-type x y z q mux muy myz molecule-ID q
</pre></div>
</div>
<p>Atom lines (all lines or none of them) can optionally list 3 trailing
integer values: nx,ny,nz.  For periodic dimensions, they specify which
image of the simulation box the atom is considered to be in.  An image
of 0 means it is inside the box as defined.  A value of 2 means add 2
box lengths to get the true value.  A value of -1 means subtract 1 box
length to get the true value.  LIGGGHTS(R)-PUBLIC updates these flags as atoms
cross periodic boundaries during the simulation.  The flags can be
output with atom snapshots via the <a class="reference internal" href="dump.html"><em>dump</em></a> command.</p>
<p>If nx,ny,nz values are not set in the data file, LIGGGHTS(R)-PUBLIC initializes
them to 0.  If image information is needed for later analysis and they
are not all initially 0, it&#8217;s important to set them correctly in the
data file.  Also, if you plan to use the <a class="reference internal" href="replicate.html"><em>replicate</em></a>
command to generate a larger system, these flags must be listed
correctly for bonded atoms when the bond crosses a periodic boundary.
I.e. the values of the image flags should be different by 1 (in the
appropriate dimension) for the two atoms in such a bond.</p>
<p>Atom velocities and other atom quantities not defined above are set to
0.0 when the <em>Atoms</em> section is read.  Velocities can be set later by
a <em>Velocities</em> section in the data file or by a
<a class="reference internal" href="velocity.html"><em>velocity</em></a> or <a class="reference internal" href="set.html"><em>set</em></a> command in the input
script.</p>
<hr class="docutils" />
<p><em>Bond Coeffs</em> section:</p>
<ul class="simple">
<li>one line per bond type</li>
<li>line syntax: ID coeffs</li>
</ul>
<div class="highlight-python"><div class="highlight"><pre>ID = bond type (1-N)
coeffs = list of coeffs
</pre></div>
</div>
<ul class="simple">
<li>example:</li>
</ul>
<div class="highlight-python"><div class="highlight"><pre>4 250 1.49
</pre></div>
</div>
<p>The number and meaning of the coefficients are specific to the defined
bond style.  See the <a class="reference internal" href="bond_style.html"><em>bond_style</em></a> and
<a class="reference internal" href="bond_coeff.html"><em>bond_coeff</em></a> commands for details.  Coefficients can
also be set via the <a class="reference internal" href="bond_coeff.html"><em>bond_coeff</em></a> command in the input
script.</p>
<hr class="docutils" />
<p><em>BondBond Coeffs</em> section:</p>
<ul class="simple">
<li>one line per angle type</li>
<li>line syntax: ID coeffs</li>
</ul>
<pre class="literal-block">
ID = angle type (1-N)
coeffs = list of coeffs (see class 2 section of <code class="xref doc docutils literal"><span class="pre">angle_coeff</span></code>)
</pre>
<hr class="docutils" />
<p><em>BondBond13 Coeffs</em> section:</p>
<ul class="simple">
<li>one line per dihedral type</li>
<li>line syntax: ID coeffs</li>
</ul>
<pre class="literal-block">
ID = dihedral type (1-N)
coeffs = list of coeffs (see class 2 section of <code class="xref doc docutils literal"><span class="pre">dihedral_coeff</span></code>)
</pre>
<hr class="docutils" />
<p><em>Bonds</em> section:</p>
<ul class="simple">
<li>one line per bond</li>
<li>line syntax: ID type atom1 atom2</li>
</ul>
<div class="highlight-python"><div class="highlight"><pre>ID = bond number (1-Nbonds)
type = bond type (1-Nbondtype)
atom1,atom2 = IDs of 1st,2nd atoms in bond
</pre></div>
</div>
<ul class="simple">
<li>example:</li>
</ul>
<div class="highlight-python"><div class="highlight"><pre>12 3 17 29
</pre></div>
</div>
<p>The <em>Bonds</em> section must appear after the <em>Atoms</em> section.  All values
in this section must be integers (1, not 1.0).</p>
<hr class="docutils" />
<p><em>Ellipsoids</em> section:</p>
<ul class="simple">
<li>one line per ellipsoid</li>
<li>line syntax: atom-ID shapex shapey shapez quatw quati quatj quatk</li>
</ul>
<div class="highlight-python"><div class="highlight"><pre>atom-ID = ID of atom which is an ellipsoid
shapex,shapey,shapez = 3 diameters of ellipsoid (distance units)
quatw,quati,quatj,quatk = quaternion components for orientation of atom
</pre></div>
</div>
<ul class="simple">
<li>example:</li>
</ul>
<div class="highlight-python"><div class="highlight"><pre>12 1 2 1 1 0 0 0
</pre></div>
</div>
<p>The <em>Ellipsoids</em> section must appear if <a class="reference internal" href="atom_style.html"><em>atom_style ellipsoid</em></a> is used and any atoms are listed in the
<em>Atoms</em> section with an ellipsoidflag = 1.  The number of ellipsoids
should be specified in the header section via the &#8220;ellipsoids&#8221;
keyword.</p>
<p>The 3 shape values specify the 3 diameters or aspect ratios of a
finite-size ellipsoidal particle, when it is oriented along the 3
coordinate axes.  They must all be non-zero values.</p>
<p>The values <em>quatw</em>, <em>quati</em>, <em>quatj</em>, and <em>quatk</em> set the orientation
of the atom as a quaternion (4-vector).  Note that the shape
attributes specify the aspect ratios of an ellipsoidal particle, which
is oriented by default with its x-axis along the simulation box&#8217;s
x-axis, and similarly for y and z.  If this body is rotated (via the
right-hand rule) by an angle theta around a unit vector (a,b,c), then
the quaternion that represents its new orientation is given by
(cos(theta/2), a*sin(theta/2), b*sin(theta/2), c*sin(theta/2)).  These
4 components are quatw, quati, quatj, and quatk as specified above.
LIGGGHTS(R)-PUBLIC normalizes each atom&#8217;s quaternion in case (a,b,c) is not
specified as a unit vector.</p>
<p>The <em>Ellipsoids</em> section must appear after the <em>Atoms</em> section.</p>
<hr class="docutils" />
<p><em>EndBondTorsion Coeffs</em> section:</p>
<ul class="simple">
<li>one line per dihedral type</li>
<li>line syntax: ID coeffs</li>
</ul>
<pre class="literal-block">
ID = dihedral type (1-N)
coeffs = list of coeffs (see class 2 section of <code class="xref doc docutils literal"><span class="pre">dihedral_coeff</span></code>)
</pre>
<hr class="docutils" />
<p><em>Lines</em> section:</p>
<ul class="simple">
<li>one line per line segment</li>
<li>line syntax: atom-ID x1 y1 x2 y2</li>
</ul>
<div class="highlight-python"><div class="highlight"><pre>atom-ID = ID of atom which is a line segment
x1,y1 = 1st end point
x2,y2 = 2nd end point
</pre></div>
</div>
<ul class="simple">
<li>example:</li>
</ul>
<div class="highlight-python"><div class="highlight"><pre>12 1.0 0.0 2.0 0.0
</pre></div>
</div>
<p>The <em>Lines</em> section must appear if <a class="reference internal" href="atom_style.html"><em>atom_style line</em></a>
is used and any atoms are listed in the <em>Atoms</em> section with a
lineflag = 1.  The number of lines should be specified in the header
section via the &#8220;lines&#8221; keyword.</p>
<p>The 2 end points are the end points of the line segment.  The ordering
of the 2 points should be such that using a right-hand rule to cross
the line segment with a unit vector in the +z direction, gives an
&#8220;outward&#8221; normal vector perpendicular to the line segment.
I.e. normal = (c2-c1) x (0,0,1).  This orientation may be important
for defining some interactions.</p>
<p>The <em>Lines</em> section must appear after the <em>Atoms</em> section.</p>
<hr class="docutils" />
<p><em>Masses</em> section:</p>
<ul class="simple">
<li>one line per atom type</li>
<li>line syntax: ID mass</li>
</ul>
<div class="highlight-python"><div class="highlight"><pre>ID = atom type (1-N)
mass = mass value
</pre></div>
</div>
<ul class="simple">
<li>example:</li>
</ul>
<div class="highlight-python"><div class="highlight"><pre>3 1.01
</pre></div>
</div>
<p>This defines the mass of each atom type.  This can also be set via the
<a class="reference internal" href="mass.html"><em>mass</em></a> command in the input script.  This section cannot be
used for atom styles that define a mass for individual atoms -
e.g. <a class="reference internal" href="atom_style.html"><em>atom_style sphere</em></a>.</p>
<hr class="docutils" />
<p><em>MiddleBondTorsion Coeffs</em> section:</p>
<ul class="simple">
<li>one line per dihedral type</li>
<li>line syntax: ID coeffs</li>
</ul>
<pre class="literal-block">
ID = dihedral type (1-N)
coeffs = list of coeffs (see class 2 section of <code class="xref doc docutils literal"><span class="pre">dihedral_coeff</span></code>)
</pre>
<hr class="docutils" />
<p><em>Pair Coeffs</em> section:</p>
<ul class="simple">
<li>one line per atom type</li>
<li>line syntax: ID coeffs</li>
</ul>
<div class="highlight-python"><div class="highlight"><pre>ID = atom type (1-N)
coeffs = list of coeffs
</pre></div>
</div>
<ul class="simple">
<li>example:</li>
</ul>
<div class="highlight-python"><div class="highlight"><pre>3 0.022 2.35197 0.022 2.35197
</pre></div>
</div>
<p>The number and meaning of the coefficients are specific to the defined
pair style.  See the <a class="reference internal" href="pair_style.html"><em>pair_style</em></a> and
<a class="reference internal" href="pair_coeff.html"><em>pair_coeff</em></a> commands for details.  Since pair
coefficients for types I != J are not specified, these will be
generated automatically by the pair style&#8217;s mixing rule.  See the
individual pair_style doc pages and the <code class="xref doc docutils literal"><span class="pre">pair_modify</span> <span class="pre">mix</span></code> command for details.  Pair coefficients can also
be set via the <a class="reference internal" href="pair_coeff.html"><em>pair_coeff</em></a> command in the input
script.</p>
<hr class="docutils" />
<p><em>PairIJ Coeffs</em> section:</p>
<ul class="simple">
<li>one line per pair of atom types for all I,J with I &lt;= J</li>
<li>line syntax: ID1 ID2 coeffs</li>
</ul>
<div class="highlight-python"><div class="highlight"><pre>ID1 = atom type I = 1-N
ID2 = atom type J = I-N, with I &lt;= J
coeffs = list of coeffs
</pre></div>
</div>
<ul class="simple">
<li>examples:</li>
</ul>
<div class="highlight-python"><div class="highlight"><pre>3 3 0.022 2.35197 0.022 2.35197
3 5 0.022 2.35197 0.022 2.35197
</pre></div>
</div>
<p>This section must have N*(N+1)/2 lines where N = # of atom types.  The
number and meaning of the coefficients are specific to the defined
pair style.  See the <a class="reference internal" href="pair_style.html"><em>pair_style</em></a> and
<a class="reference internal" href="pair_coeff.html"><em>pair_coeff</em></a> commands for details.  Since pair
coefficients for types I != J are all specified, these values will
turn off the default mixing rule defined by the pair style.  See the
individual pair_style doc pages and the <code class="xref doc docutils literal"><span class="pre">pair_modify</span> <span class="pre">mix</span></code> command for details.  Pair coefficients can also
be set via the <a class="reference internal" href="pair_coeff.html"><em>pair_coeff</em></a> command in the input
script.</p>
<hr class="docutils" />
<p><em>Triangles</em> section:</p>
<ul class="simple">
<li>one line per triangle</li>
<li>line syntax: atom-ID x1 y1 x2 y2</li>
</ul>
<div class="highlight-python"><div class="highlight"><pre>atom-ID = ID of atom which is a line segment
x1,y1,z1 = 1st corner point
x2,y2,z2 = 2nd corner point
x3,y3,z3 = 3rd corner point
</pre></div>
</div>
<ul class="simple">
<li>example:</li>
</ul>
<div class="highlight-python"><div class="highlight"><pre>12 0.0 0.0 0.0 2.0 0.0 1.0 0.0 2.0 1.0
</pre></div>
</div>
<p>The <em>Triangles</em> section must appear if <a class="reference internal" href="atom_style.html"><em>atom_style tri</em></a> is used and any atoms are listed in the <em>Atoms</em>
section with a triangleflag = 1.  The number of lines should be
specified in the header section via the &#8220;triangles&#8221; keyword.</p>
<p>The 3 corner points are the corner points of the triangle.  The
ordering of the 3 points should be such that using a right-hand rule
to go from point1 to point2 to point3 gives an &#8220;outward&#8221; normal vector
to the face of the triangle.  I.e. normal = (c2-c1) x (c3-c1).  This
orientation may be important for defining some interactions.</p>
<p>The <em>Triangles</em> section must appear after the <em>Atoms</em> section.</p>
<hr class="docutils" />
<p><em>Velocities</em> section:</p>
<ul class="simple">
<li>one line per atom</li>
<li>line syntax: depends on atom style</li>
</ul>
<table border="1" class="docutils">
<colgroup>
<col width="42%" />
<col width="58%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td>all styles except those listed</td>
<td>atom-ID vx vy vz</td>
</tr>
<tr class="row-even"><td>electron</td>
<td>atom-ID vx vy vz ervel</td>
</tr>
<tr class="row-odd"><td>ellipsoid</td>
<td>atom-ID vx vy vz lx ly lz</td>
</tr>
<tr class="row-even"><td>sphere</td>
<td>atom-ID vx vy vz wx wy wz</td>
</tr>
<tr class="row-odd"><td>hybrid</td>
<td>atom-ID vx vy vz sub-style1 sub-style2 ...</td>
</tr>
</tbody>
</table>
<p>where the keywords have these meanings:</p>
<p>vx,vy,vz = translational velocity of atom
lx,ly,lz = angular momentum of aspherical atom
wx,wy,wz = angular velocity of spherical atom
ervel = electron radial velocity (0 for fixed-core):ul</p>
<p>The velocity lines can appear in any order.  This section can only be
used after an <em>Atoms</em> section.  This is because the <em>Atoms</em> section
must have assigned a unique atom ID to each atom so that velocities
can be assigned to them.</p>
<p>Vx, vy, vz, and ervel are in <a class="reference internal" href="units.html"><em>units</em></a> of velocity.  Lx, ly,
lz are in units of angular momentum (distance-velocity-mass).  Wx, Wy,
Wz are in units of angular velocity (radians/time).</p>
<p>For atom_style hybrid, following the 4 initial values (ID,vx,vy,vz),
specific values for each sub-style must be listed.  The order of the
sub-styles is the same as they were listed in the
<a class="reference internal" href="atom_style.html"><em>atom_style</em></a> command.  The sub-style specific values
are those that are not the 5 standard ones (ID,vx,vy,vz).  For
example, for the &#8220;sphere&#8221; sub-style, &#8220;wx&#8221;, &#8220;wy&#8221;, &#8220;wz&#8221; values would
appear.  These are listed in the same order they appear as listed
above.  Thus if</p>
<div class="highlight-python"><div class="highlight"><pre>atom_style hybrid electron sphere
</pre></div>
</div>
<p>were used in the input script, each velocity line would have these
fields:</p>
<div class="highlight-python"><div class="highlight"><pre>atom-ID vx vy vz ervel wx wy wz
</pre></div>
</div>
<p>Translational velocities can also be set by the
<a class="reference internal" href="velocity.html"><em>velocity</em></a> command in the input script.</p>
</div>
<hr class="docutils" />
<div class="section" id="restrictions">
<h2>Restrictions<a class="headerlink" href="#restrictions" title="Permalink to this headline">¶</a></h2>
<p>To read gzipped data files, you must compile LIGGGHTS(R)-PUBLIC with the
-DLAMMPS_GZIP option - see the <span class="xref std std-ref">Making LIGGGHTS(R)-PUBLIC</span> section of the documentation.</p>
</div>
<div class="section" id="related-commands">
<h2>Related commands<a class="headerlink" href="#related-commands" title="Permalink to this headline">¶</a></h2>
<p><a class="reference internal" href="read_dump.html"><em>read_dump</em></a>, <a class="reference internal" href="read_restart.html"><em>read_restart</em></a>,
<a class="reference internal" href="create_atoms.html"><em>create_atoms</em></a>, <a class="reference internal" href="write_data.html"><em>write_data</em></a></p>
<p><strong>Default:</strong> none</p>
</div>
</div>


           </div>
           <div class="articleComments">
            
           </div>
          </div>
          <footer>
  

  <hr/>

  <div role="contentinfo">
    <p>
        &copy; Copyright 2016, DCS Computing GmbH, JKU Linz and Sandia Corporation.

    </p>
  </div>
  Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>. 

</footer>

        </div>
      </div>

    </section>

  </div>
  


  

    <script type="text/javascript">
        var DOCUMENTATION_OPTIONS = {
            URL_ROOT:'./',
            VERSION:'v3.X',
            LANGUAGE:'None',
            COLLAPSE_INDEX:false,
            FILE_SUFFIX:'.html',
            HAS_SOURCE:  true,
            SOURCELINK_SUFFIX: ''
        };
    </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/js/theme.js"></script>
  

  
  
  <script type="text/javascript">
      jQuery(function () {
          SphinxRtdTheme.StickyNav.enable();
      });
  </script>
   

</body>
</html>