[lammps-users] reading data issues

Hello:

I recently generated external data files (lattice info) for LAMMPS to read in. I am attaching 2 data files, which are to my eye identical. When I read in the data3.eam file, all goes well, i.e. the box size, atom coordinates, etc, are all read in correctly, i.e.:

LAMMPS (22 Jun 2007)
Reading data file ...
   orthogonal box = (-1 -1 -1) to (1700 1700 1700)
   1 by 1 by 1 processor grid
   673241 atoms
Lattice spacing in x,y,z = 4.08 4.08 4.08

However, when I read in the si.txt file, I get the following error:

LAMMPS (22 Jun 2007)
Reading data file ...
   orthogonal box = (-0.5 -0.5 -0.5) to (0.5 0.5 0.5)
   1 by 1 by 1 processor grid
ERROR: Unknown section in data file: -5.432000e+00 5.975200e+01 xlo xhi

I looked at both input files (because the files are large, I truncated the coordinates), and the format appears identical to me. I also looked at both in vi to make sure that there were no odd characters in the files. However, for some reason, even though I have defined the box dimensions in the si.txt file, it is being read in incorrectly (-0.5, etc) instead of (-5.432 to 59.7), as seen above.

Any suggestions as to what might be wrong would be greatly appreciated.

Thanks,

Harold

data3.eam (747 Bytes)

si.txt (658 Bytes)

Hello:

I recently generated external data files (lattice info) for LAMMPS to read
in. I am attaching 2 data files, which are to my eye identical. When I
read in the data3.eam file, all goes well, i.e. the box size, atom
coordinates, etc, are all read in correctly, i.e.:

LAMMPS (22 Jun 2007)
Reading data file ...
orthogonal box = (-1 -1 -1) to (1700 1700 1700)
1 by 1 by 1 processor grid
673241 atoms
Lattice spacing in x,y,z = 4.08 4.08 4.08

However, when I read in the si.txt file, I get the following error:

LAMMPS (22 Jun 2007)
Reading data file ...
orthogonal box = (-0.5 -0.5 -0.5) to (0.5 0.5 0.5)
1 by 1 by 1 processor grid
ERROR: Unknown section in data file: -5.432000e+00 5.975200e+01 xlo xhi

harold,

there may only be one blank between 'xlo' and 'xhi'
the parser in read_data.cpp looks for 'xlo xhi' and
not the individual keywords.

cheers,
   axel.

Hi, harold,

This error is cause by your format of data file. In the Si.txt the “xlo xhi”, have ‘two space’ rather than “one space” between xlo and xhi, so the program think it as default (-0.5 -0.5 -0.5) to (0.5 0.5 0.5), not you specified. The keywords like these are very senstive. This problem I also encontered before. So I know this trival difference is very hard to detect.

AC