Question about dump label keyword.

Hello, LAMMPS community,

i have a question about dump command label keyword.

My LAMMPS version is 10 Feb 2015.

what is it that you want to achieve by this rather complex operation?
i have a hunch, that it can be done in a much simpler fashion.

axel

Hello, LAMMPS community,

i have a question about dump command label keyword.

My LAMMPS version is 10 Feb 2015.

---------------------------------
ITEM: TIMESTEP
0
ITEM: NUMBER OF ATOMS
1000
ITEM: BOX BOUNDS xy xz yz pp pp pp
0 27.3437 0
0 27.3437 0
27.3437 54.6875 0
ITEM: ATOMS id type v_tmp123 v_tmp456 x y z vx vy vz
1 1 1001 2 27.3426 27.3436 54.6844 -0.00373039 -0.075994 -0.0201735
2 1 1002 2 2.73528 2.73487 27.3459 -0.0491389 0.00677758 -0.0579249
3 1 1003 2 0.00509976 2.73503 30.0791 0.0761252 -0.0339311 -0.189419
4 1 1004 2 2.73193 27.3417 30.0766 -0.0636208 -0.0996961 -0.0265888
5 1 1005 2 1.36649 1.36608 28.7088 -0.0423002 -0.094341 -0.0667571
6 1 1006 2 1.36827 4.10192 31.4493 0.0714763 0.0963662 -0.139152
7 1 1007 2 4.10453 4.10052 28.7145 0.115588 0.0298164 -0.0625171
8 1 1008 2 4.09776 1.36533 31.4502 -0.0817335 0.263847 0.0561432
9 1 1009 2 5.46744 0.000278346 27.349 -0.0861687 0.248759 0.00913175


-------------------------------

i tried to read above atomic data by read_dump command,

with replace atom-ID and atom-type informations by column v_tmp123, v_tmp456
for each one.

Actual read_data command line in my script is like below,

--------
read_dump ./liqCells/liq(${count}).atom 200 x y z box no label id v_tmp123
label type v_tmp456
-------

In LAMMPS manual read_dump command section, there are clearly noticed that
‘label' keyword is possible for id and type field,

label value = field column
  field = one of the listed fields or id or type
  column = label on corresponding column in dump file

but error message ERROR: Illegal read_dump command (../read_dump.cpp:667)
keep annoying me.

Any help or comment will be grateful.

the error message is caused by an omission in the source code.
as indicated in the diff below, two lines need to be added to the
read_dump.cpp source to make the code do what the documentation says.

diff --git a/src/read_dump.cpp b/src/read_dump.cpp
index 330cf9a..59f5926 100644
--- a/src/read_dump.cpp
+++ b/src/read_dump.cpp
@@ -717,6 +717,8 @@ int ReadDump::whichtype(char *str)
   else if (strcmp(str,"ix") == 0) type = IX;
   else if (strcmp(str,"iy") == 0) type = IY;
   else if (strcmp(str,"iz") == 0) type = IZ;
+ else if (strcmp(str,"id") == 0) type = ID;
+ else if (strcmp(str,"type") == 0) type = TYPE;
   return type;
}

axel.

good catch - will be in next patch …

Steve