The read_data format

Dear LAMMPS-Users,

I wonder to know does the read_data format effect on LAMMPS running?

Because I tested a same small simulation model with two different read_data files. Through 1st data_file (written by myself) I got “nan” values for Temp, Pot and … . But via the 2nd data_file (generated by topotools) everything goes fine. Please take a look at below;

1st read_data format (written by myself)

LAMMPS data file. written by m.shahbabaei@…24…
110 atoms
40 bonds
20 angles
0 dihedrals
0 impropers
3 atom types
1 bond types
1 angle types
0 dihedral types
0 improper types
0.000 10.000 xlo xhi
0.000 10.000 ylo yhi
-5.000 15.000 zlo zhi

Masses

1 12.01100
2 1.008000
3 15.99900

Atoms

1 1 1 0.000000 2.000000 2.000000 10.000000
2 1 1 0.000000 2.000000 4.000000 10.000000
3 1 1 0.000000 2.000000 6.000000 10.000000
4 1 1 0.000000 2.000000 8.000000 10.000000
5 1 1 0.000000 2.000000 10.000000 10.000000

OUTPUTS
Step Temp PotEng TotEng Press Volume
1 162.38532 -nan -nan -nan 2000
100 -nan -nan -nan -nan 2000
200 -nan -nan -nan -nan 2000
300 -nan -nan -nan -nan 2000
400 -nan -nan -nan -nan 2000
500 -nan -nan -nan -nan 2000

2nd read_data (generated by topotools)

LAMMPS data file. CGCMM style. atom_style full generated by VMD/TopoTools v1.5 on Mon Feb 23 14:16:04 KST 2015
110 atoms
40 bonds
20 angles
0 dihedrals
0 impropers
3 atom types
1 bond types
1 angle types
0 dihedral types
0 improper types
0.000000 10.00000 xlo xhi
0.000000 10.000000 ylo yhi
-5.000000 15.000000 zlo zhi

Pair Coeffs

Of course the content of the read data file could

affect the simulation. You should investigate

what is the difference between the 2 files.

Steve

My guess is that you have two or more atoms at the same location.
This can happen due to periodic boundary conditions, atoms get
"wrapped" onto each other, however the periodic boundary settings in
the header section of the two files appears to be the same. Are the
coordinates in your two data files different?

  Try copying the "Atoms" section from your working data file into the
"Atoms" section of your broken file and see if the error goes away.

  Or try visualizing the data files in VMD:
http://lammps.sandia.gov/threads/msg47488.html
(be sure to select the "Graphics->Representations..." menu option,
click on the "Periodic" tab, and click on the +x,-x,+y,-y,+z,-z check
boxes).

Finally, try "diff". "diff" is your friend.

diff file1.data file2.data

  # or strip the comments out before comparing them:
awk '{sub("[ \t]*[#;].*$","",0\); print;\}&#39; &lt; file1\.data &gt; terse\_file1\.data awk &#39;\{sub\(&quot;\[ \\t\]\*\[\#;\]\.\*","",$0); print;}' < file2.data > terse_file2.data
  # and then use "diff" on the new files:
diff terse_file1.data terse_file1.data

http://rosettacode.org/wiki/Strip_comments_from_a_string#AWK
Cheers