Lammps rerun error

Dear Community,

I’m trying to use rerun command to do single-site calculation, namely using a different set of parameters to calculcate forces based on existed trajectory. My package is lammps/02Aug2023. But when I tried to do the rerun, it keeps giving the error Read_dump triclinic status does not match simulation.

However, I think both my simulation box and dump snapshots give triclinic box. Here is the box dimesnison in my read_data file:
-12.341150 38.501150 xlo xhi
-0.118002 47.078001 ylo yhi
0.051495 44.898503 zlo zhi
2.88992e-15 -19.172298 4.16047e-15 xy xz yz

And here is the dimension of one frame of dump snapshots:
ITEM: BOX BOUNDS pp pp pp xy xz yz
-30.9722 39.1342 2.88787e-15
-0.916262 46.2463 -19.198
0.0184216 44.8616 4.16244e-15.

And the attached are all the scripts used in my command. Please tell me my mistakes, and if there are other potential errors, please inform me as well. I really appreciate your help.

am_mapping_slab2.lammpstrj (5.5 MB)
pyr.txt (311 Bytes)
tra.txt (458 Bytes)
cg_slab_start2.lmpdata (103.0 KB)
rerun.in (680 Bytes)
cocrystal.params (1.2 KB)

Try replacing:
ITEM: BOX BOUNDS pp pp pp xy xz yz
with:
ITEM: BOX BOUNDS xy xz yz
in the file am_mapping_slab2.lammpstrj. Besides that, I get unrelated errors using your input files.

Dear Dr. Roscioni,

Thank you for your help. This solves the problem. But I didn’t get other errors from it. Can you specify which? Also, can you please explain to me why changing “pp pp pp xy xz yz” to “xy xz yz” will solve the problem? I thought “pp” means periodic boundary.

Your dump file has a wrong format. It should be:
ITEM: BOX BOUNDS xy xz yz pp pp pp
and not
ITEM: BOX BOUNDS pp pp pp xy xz yz

It’s either a bug which was fixed in a later (than yours) LAMMPS version or you used some external tool which used wrong format.

Actually I used VMD “save trajectories” directly to transform an .xtc to .lammpstrj file. Never thought it would go wrong. :smiling_face_with_tear:

The VMD output corresponds to the output of LAMMPS versions from before 2011.

The current version can be made compatible with either format by making the following change:

  diff --git a/src/reader_native.cpp b/src/reader_native.cpp
  index 3e7d01550d..ca0f00d3bd 100644
  --- a/src/reader_native.cpp
  +++ b/src/reader_native.cpp
  @@ -259,7 +259,7 @@ bigint ReaderNative::read_header(double box[3][3], int &boxinfo, int &triclinic,
       triclinic = 0;
       box[0][2] = box[1][2] = box[2][2] = 0.0;
       read_lines(1);
  -    if (line[strlen("ITEM: BOX BOUNDS ")] == 'x') triclinic = 1;
  +    if (utils::strmatch(line,"ITEM: BOX BOUNDS.*xy\\s+xz\\s+yz")) triclinic = 1;
   
       try {
         read_lines(1);

This will be added to the current code and the final update for the stable version soon.

Dear Dr. Kohlmeyer,

I see. Thank you for your assistance. It is of great help!