Use "read_dump" multiple times

Did anyone use “read_dump” multiple times to read a number of LAMMPS dump files where each file contain one snapshot?

Recently I found that only the 1st “read_dump” added atoms into the system; the rest of “read_dump” did not add atoms even though I used “add yes” keyword. I’ve pasted one example here

region box block {xlo} {xhi} {ylo} {yhi} {zlo} {zhi}
create_box 3 box

read_dump out.100.dump 100 x y z box no add yes
read_dump out.500.dump 500 x y z box no add yes

Another situation is, if I have “read_data” before “read_dump” at first, then none of the “read_dump” could actually add atoms in the system

the simulation box is already large enough to include all atoms in dump files

read_data LAMMPS_data1.dat
read_data LAMMPS_data2.dat add append

read_dump out.100.dump 100 x y z box no add yes
read_dump out.500.dump 500 x y z box no add yes

I​wonder if my setup is not right? Thanks for any feedback​

Did anyone use "read_dump" multiple times to read a number of LAMMPS dump
files where each file contain one snapshot?

Recently I found that only the 1st "read_dump" added atoms into the system;
the rest of "read_dump" did not add atoms even though I used "add yes"
keyword. I've pasted one example here

region box block \{xlo\} {xhi} \{ylo\} {yhi} \{zlo\} {zhi}
create_box 3 box

read_dump out.100.dump 100 x y z box no add yes
read_dump out.500.dump 500 x y z box no add yes
...

Another situation is, if I have "read_data" before "read_dump" at first,
then none of the "read_dump" could actually add atoms in the system

# the simulation box is already large enough to include all atoms in dump
files

read_data LAMMPS_data1.dat
read_data LAMMPS_data2.dat add append

read_dump out.100.dump 100 x y z box no add yes
read_dump out.500.dump 500 x y z box no add yes

I
wonder if my setup is not right? Thanks for any feedback

no, you simply didn't read the documentation careful enough.

with the add yes keyword included indeed new atoms are added, but
*only* if their atom id is different from one that already exists.
otherwise it will simply overwrite the the read in parameters, which
is exactly what it should be doing.

axel.

Thanks for pointing out my problem. But how to overcome this in “read_dump”? Thanks.

Thanks for pointing out my problem. But how to overcome this in
"read_dump"? Thanks.

what you are asking for doesn't make sense. if you are reading the
same atoms, read dump should assign the data to the same atoms. that
is what it does and that is how it should work.
if you want to create new atoms from the same system, you can use,
e.g. replicate or read_data. no point in complicating read_dump as it
is already problematic to use it to import atoms.

axel.

I am not trying to read the same atoms, but dump files from different simulations as initial conditions to prepare a simulation of a larger system.

read_dump out_simulation_A.100.dump 100 x y z box no add yes
read_dump out_simulation_B.500.dump 500 x y z box no add yes

read_dump out_simulation_C.400.dump 500 x y z box no add yes

​​
Since this way​ does not go through as I initially considered, I can use LAMMPS data files for the same purpose.​

Again, thanks for your help!

I am not trying to read the same atoms, but dump files from different
simulations as initial conditions to prepare a simulation of a larger
system.

if they have the same atom id, they are the same atoms to LAMMPS. that
is how read_dump operates. it is explained in the documentation for
the command.

read_dump out_simulation_A.100.dump 100 x y z box no add yes
read_dump out_simulation_B.500.dump 500 x y z box no add yes
read_dump out_simulation_C.400.dump 500 x y z box no add yes

Since this way
does not go through as I initially considered, I can use LAMMPS data files
for the same purpose.

read_data or replicate are the way to build larger systems.

axel.