File: data_format.html

package info (click to toggle)
liggghts 3.0.3%2Brepack-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 106,076 kB
  • ctags: 34,406
  • sloc: cpp: 363,723; python: 21,138; ansic: 9,146; perl: 3,687; sh: 2,841; fortran: 2,802; xml: 788; makefile: 485; objc: 238; lisp: 169; f90: 145; csh: 16; awk: 14
file content (250 lines) | stat: -rw-r--r-- 8,133 bytes parent folder | download | duplicates (11)
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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
    <META NAME="Generator" CONTENT="Cosmo Create 1.0.3">
</HEAD>
<BODY>
<H2>
LAMMPS Data Format</H2>
<P>
<A HREF="README.html">Return</A> to top-level of LAMMPS documentation</P>
<P>
This file describes the format of the data file read into LAMMPS with 
the &quot;read data&quot; command. The data file contains basic 
information about the size of the problem to be run, the initial atomic 
coordinates, molecular topology, and (optionally) force-field 
coefficients. It will be easiest to understand this file if you read it 
while looking at a sample data file from the examples.</P>
<P>
This page has 2 sections:</P>
<UL>
    <LI>
    <A HREF="#_cch3_930958962">Rules for formatting the Data File</A> 
    <LI>
    <A HREF="#_cch3_930958969">Sample file with Annotations</A> 
</UL>
<HR>
<H3>
<A NAME="_cch3_930958962">Rules for formatting the Data File: </A></H3>
<P>
Blank lines are important. After the header section, new entries are 
separated by blank lines. </P>
<P>
Indentation and space between words/numbers on one line is not 
important except that keywords (e.g. Masses, Bond Coeffs) must be 
left-justified and capitalized as shown. </P>
<P>
The header section (thru box bounds) must appear first in the file, the 
remaining entries (Masses, various Coeffs, Atoms, Bonds, etc) can come 
in any order. </P>
<P>
These entries must be in the file: header section, Masses, Atoms. </P>
<P>
These entries must be in the file if there are a non-zero number of
them: Bonds, Angles, Dihedrals, Impropers. Force field coefficients
can be specified in the input script, so do not have to appear in the
data file.  The one exception to this is class 2 force field
coefficients which can only be specified in the data file.
<P>
The Nonbond Coeffs entry contains one line for each atom type. These 
are the coefficients for an interaction between 2 atoms of the same 
type. The cross-type coeffs are computed by the appropriate class I or 
class II mixing rules, or can be specified explicitly using the 
&quot;nonbond coeff&quot; command in the input command script. See the <A
 HREF="force_fields.html">force_fields</A> page for more information. </P>
<P>
In the Atoms entry, the atoms can be in any order so long as there are 
N entries. The 1st number on the line is the atom-tag (number from 1 to 
N) which is used to identify the atom throughout the simulation. The 
molecule-tag is a second identifier which is attached to the atom; it 
can be 0, or a counter for the molecule the atom is part of, or any 
other number you wish. The q value is the charge of the atom in 
electron units (e.g. +1 for a proton). The xyz values are the initial 
position of the atom. For 2-d simulations specify z as 0.0.</P>
<P>
The final 3 nx,ny,nz values on a line of the Atoms entry are optional. 
LAMMPS only reads them if the &quot;true flag&quot; command is 
specified in the input command script. Otherwise they are initialized 
to 0 by LAMMPS. Their meaning, for each dimension, is that 
&quot;n&quot; box-lengths are added to xyz to get the atom's 
&quot;true&quot; un-remapped position. This can be useful in pre- or 
post-processing to enable the unwrapping of long-chained molecules 
which wind thru the periodic box one or more times. The value of 
&quot;n&quot; can be positive, negative, or zero. For 2-d simulations 
specify nz as 0. </P>
<P>
Atom velocities are initialized to 0.0 if there is no Velocities entry. 
In the Velocities entry, the atoms can be in any order so long as there 
are N entries. The 1st number on the line is the atom-tag (number from 
1 to N) which is used to identify the atom which the given velocity 
will be assigned to.</P>
<P>
Entries for Velocities, Bonds, Angles, Dihedrals, Impropers must appear 
in the file after an Atoms entry.</P>
<P>
For simulations with periodic boundary conditions, xyz coords are
remapped into the periodic box (from as far away as needed), so the
initial coordinates need not be inside the box. The nx,ny,nz values
(as read in or as set to zero by LAMMPS) are appropriately adjusted by
this remapping. </P>
<P>
The number of coefficients specified on each line of coefficient
entries (Nonbond Coeffs, Bond Coeffs, etc) depends on the
&quot;style&quot; of interaction. This must be specified in the input
command script before the "read data" command is issued, unless the
default is used. See the <A
 HREF="input_commands.html">input_commands</A> page for a description 
of the various style options. The <A HREF="input_commands.html">input_commands</A>
 and <A HREF="force_fields.html">force_fields</A> pages explain the 
meaning and valid values for each of the coefficients. </P>
<HR>
<H3>
<A NAME="_cch3_930958969">Sample file with Annotations</A></H3>
<P>
Here is a sample file with annotations in parenthesis and lengthy 
sections replaced by dots (...). Note that the blank lines are 
important in this example.</P>
<PRE>

LAMMPS Description           (1st line of file)

100 atoms         (this must be the 3rd line, 1st 2 lines are ignored)
95 bonds                (# of bonds to be simulated)
50 angles               (include these lines even if number = 0)
30 dihedrals
20 impropers

5 atom types           (# of nonbond atom types)
10 bond types          (# of bond types = sets of bond coefficients)
18 angle types         
20 dihedral types      (do not include a bond,angle,dihedral,improper type
2 improper types             line if number of bonds,angles,etc is 0)

-0.5 0.5 xlo xhi       (for periodic systems this is box size,
-0.5 0.5 ylo yhi        for non-periodic it is min/max extent of atoms)
-0.5 0.5 zlo zhi       (do not include this line for 2-d simulations)

Masses

  1 mass
  ...
  N mass                           (N = # of atom types)

Nonbond Coeffs

  1 coeff1 coeff2 ...
  ...
  N coeff1 coeff2 ...              (N = # of atom types)

Bond Coeffs

  1 coeff1 coeff2 ...
  ...
  N coeff1 coeff2 ...              (N = # of bond types)

Angle Coeffs

  1 coeff1 coeff2 ...
  ...
  N coeff1 coeff2 ...              (N = # of angle types)

Dihedral Coeffs

  1 coeff1 coeff2 ...
  ...
  N coeff1 coeff2 ...              (N = # of dihedral types)

Improper Coeffs

  1 coeff1 coeff2 ...
  ...
  N coeff1 coeff2 ...              (N = # of improper types)

BondBond Coeffs

  1 coeff1 coeff2 ...
  ...
  N coeff1 coeff2 ...              (N = # of angle types)

BondAngle Coeffs

  1 coeff1 coeff2 ...
  ...
  N coeff1 coeff2 ...              (N = # of angle types)

MiddleBondTorsion Coeffs

  1 coeff1 coeff2 ...
  ...
  N coeff1 coeff2 ...              (N = # of dihedral types)

EndBondTorsion Coeffs

  1 coeff1 coeff2 ...
  ...
  N coeff1 coeff2 ...              (N = # of dihedral types)

AngleTorsion Coeffs

  1 coeff1 coeff2 ...
  ...
  N coeff1 coeff2 ...              (N = # of dihedral types)

AngleAngleTorsion Coeffs

  1 coeff1 coeff2 ...
  ...
  N coeff1 coeff2 ...              (N = # of dihedral types)

BondBond13 Coeffs

  1 coeff1 coeff2 ...
  ...
  N coeff1 coeff2 ...              (N = # of dihedral types)

AngleAngle Coeffs

  1 coeff1 coeff2 ...
  ...
  N coeff1 coeff2 ...              (N = # of improper types)

Atoms

  1 molecule-tag atom-type q x y z nx ny nz  (nx,ny,nz are optional -
  ...                                    see &quot;true flag&quot; input command)
  ...                
  N molecule-tag atom-type q x y z nx ny nz  (N = # of atoms)

Velocities

  1 vx vy vz
  ...
  ...                
  N vx vy vz                        (N = # of atoms)

Bonds

  1 bond-type atom-1 atom-2
  ...
  N bond-type atom-1 atom-2         (N = # of bonds)

Angles

  1 angle-type atom-1 atom-2 atom-3  (atom-2 is the center atom in angle)
  ...
  N angle-type atom-1 atom-2 atom-3  (N = # of angles)

Dihedrals

  1 dihedral-type atom-1 atom-2 atom-3 atom-4  (atoms 2-3 form central bond)
  ...
  N dihedral-type atom-1 atom-2 atom-3 atom-4  (N = # of dihedrals)

Impropers

  1 improper-type atom-1 atom-2 atom-3 atom-4  (atom-2 is central atom)
  ...
  N improper-type atom-1 atom-2 atom-3 atom-4  (N = # of impropers)
</PRE>
</BODY>
</HTML>